1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00
Files
opencv_contrib/modules/mcc/include/opencv2/mcc.hpp
riskiest 478cc124f5 Merge pull request #2671 from riskiest:color-calibration
Color Calibration Algorithm Implementation Revised

* Add utils, io helpers, the operations for linearization and distance

* Add the code for color, colorspace, linearization and ccm computation

* Add sample code for color correction

* Add the dependency to opencv_imgcodes in CMakeLists.txt

* Add the color correction tutorial, introducing build steps and
parameters

* Add sample code to color correction tutorial

* Add color correction algorithms introductions

* Update color_correction_model.markdown

* Fix warnings of whitespace, undeclared function, shadow variables.

* Fix the warnings of shadow variables, unused variable in base class.
Fix the error whitespace and 'EOF' on the docs.

* Fix the warnnings on win & macos

* Fix bugs & support Vinyl ColorChecker

* fix shadow variables warning & code style

* update document for sample

* update license

* fix linearize.hpp

* Add basic io, utils, operations helpers.
Implement color distance.

* Implement color, colorspace, linearization and ccm features.

* Add the dependencies to opencv_imgcodecs in CMakeLists.txt

* Add color correction model sample code.
Co-authored-by: Chenqi Shan <shanchenqi@huawei.com>

* Add the index markdown of color correction tutorial.

Co-authored-by: Chenqi Shan <shanchenqi@huawei.com>

* Add the introduction for color correction sample.

* Split operations into .hpp and .cpp

* Split mcc, color, colorspace and linearize into .cpp & .hpp

* Update test cases

* Split distance, io and utils into cpp & hpp.
Refer ccm.hpp in entrypoint header and update realted refs in sampe & tutorial

* add static method

* fix shared_ptr

* fix markdown for new version

* delete useless include message

* update unittests

* update docs & fix bugs for InitialwhiteBalance()

* update doc for doxygen

* update doc&DigitalSG

* replace whitespace for utils.hpp&color.hpp

* update getilluminants,imgcodes,

* Fix Mat wrapper over data from C arrays, fix doxygen's @snippet instead of direct code.

* remove array from color.h

* remove hpp from include/mcc/

* add hpp to opencv/model/mcc/

* dst unsolved

* remove bugs about dst

* add make passed

* update codes using the structure "impl"

* update documents

* update ccm member for class ColorCorrectionModel

* remove  macro CV_EXPORTS_W for codes in src/*.hpp

* move class Impl private

* remove unnesasary notice

* remove trailing whitespace

* update documents&samples

* move typedef MatFunc into class and move dead codes

* minimize list of required headers, add getCCM() method

* move type: information for parameters

* move underscores _ in public headers

* add @defgroup for ccm

* move <iostream> and add getloss() method for class ColorCorrection Model

* update sample/color_correction_model.cpp

* add getIOs() function for minimize initialization of IO variables

* mcc(ccm): apply clang-format

* mcc(ccm): fix documentation, code style

* remove duplicate enum values

* add prefixes for enum values

* update codes using cv_Error

* update test_ccm file

* update test_ccm file

* update sample --help

* mcc: reduce global initializers

* update function naming style

* update formulas and note for ccm.hpp

* add const value

Co-authored-by: Chenqi Shan <shanchenqi@huawei.com>
Co-authored-by: Jinheng Zhang <zhangjinheng1@huawei.com>
Co-authored-by: Zhen Ju <juzhen@huawei.com>
Co-authored-by: Longbu Wang <wanglongbu@huawei.com.com>
Co-authored-by: shanchenqi <582533558@qq.com>
2020-11-23 12:39:32 +00:00

60 lines
2.2 KiB
C++

// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
/*
* MIT License
*
* Copyright (c) 2018 Pedro Diamel Marrero Fernández
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef __OPENCV_MCC_HPP__
#define __OPENCV_MCC_HPP__
#include "mcc/checker_detector.hpp"
#include "mcc/checker_model.hpp"
#include "mcc/ccm.hpp"
/** @defgroup mcc Macbeth Chart module
@{
@defgroup color_correction Color Correction Model
@}
@addtogroup mcc
Introduction
------------
ColorCharts are a tool for calibrating the color profile of camera, which not
only depends on the intrinsic and extrinsic parameters of camera but also on the
lighting conditions. This is done by taking the image of a chart, such that the
value of its colors present in it known, in the image the color values changes
depeding on many variables, this gives us the colors initially present and the
colors that are present in the image, based on this information we can apply any
suitable algorithm to find the actual color of all the objects present in the
image.
*/
#endif