Core class of ccm model.
More...
#include <opencv2/mcc/ccm.hpp>
Core class of ccm model.
Produce a ColorCorrectionModel instance for inference
◆ ColorCorrectionModel() [1/3]
cv::ccm::ColorCorrectionModel::ColorCorrectionModel |
( |
const Mat & | src, |
|
|
CONST_COLOR | constcolor ) |
Python: |
---|
| cv.ccm.ColorCorrectionModel( | src, constcolor | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs, colored | ) -> | <ccm_ColorCorrectionModel object> |
Color Correction Model.
Supported list of color cards:
- Parameters
-
src | detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; |
constcolor | the Built-in color card |
◆ ColorCorrectionModel() [2/3]
cv::ccm::ColorCorrectionModel::ColorCorrectionModel |
( |
const Mat & | src, |
|
|
Mat | colors, |
|
|
COLOR_SPACE | ref_cs ) |
Python: |
---|
| cv.ccm.ColorCorrectionModel( | src, constcolor | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs, colored | ) -> | <ccm_ColorCorrectionModel object> |
Color Correction Model.
- Parameters
-
src | detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; |
colors | the reference color values, the color values are in [0, 1].
|
ref_cs | the corresponding color space If the color type is some RGB, the format is RGB not BGR;
|
◆ ColorCorrectionModel() [3/3]
cv::ccm::ColorCorrectionModel::ColorCorrectionModel |
( |
const Mat & | src, |
|
|
Mat | colors, |
|
|
COLOR_SPACE | ref_cs, |
|
|
Mat | colored ) |
Python: |
---|
| cv.ccm.ColorCorrectionModel( | src, constcolor | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs | ) -> | <ccm_ColorCorrectionModel object> |
| cv.ccm.ColorCorrectionModel( | src, colors, ref_cs, colored | ) -> | <ccm_ColorCorrectionModel object> |
Color Correction Model.
- Parameters
-
src | detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; |
colors | the reference color values, the color values are in [0, 1]. |
ref_cs | the corresponding color space If the color type is some RGB, the format is RGB not BGR; |
colored | mask of colored color |
◆ get_dst_rgbl()
Mat cv::ccm::ColorCorrectionModel::get_dst_rgbl |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.get_dst_rgbl( | | ) -> | retval |
◆ get_src_rgbl()
Mat cv::ccm::ColorCorrectionModel::get_src_rgbl |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.get_src_rgbl( | | ) -> | retval |
◆ getCCM()
Mat cv::ccm::ColorCorrectionModel::getCCM |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.getCCM( | | ) -> | retval |
◆ getLoss()
double cv::ccm::ColorCorrectionModel::getLoss |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.getLoss( | | ) -> | retval |
◆ getMask()
Mat cv::ccm::ColorCorrectionModel::getMask |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.getMask( | | ) -> | retval |
◆ getWeights()
Mat cv::ccm::ColorCorrectionModel::getWeights |
( |
| ) |
const |
Python: |
---|
| cv.ccm.ColorCorrectionModel.getWeights( | | ) -> | retval |
◆ infer()
Mat cv::ccm::ColorCorrectionModel::infer |
( |
const Mat & | img, |
|
|
bool | islinear = false ) |
Python: |
---|
| cv.ccm.ColorCorrectionModel.infer( | img[, islinear] | ) -> | retval |
Infer using fitting ccm.
- Parameters
-
img | the input image. |
islinear | default false. |
- Returns
- the output array.
◆ run()
void cv::ccm::ColorCorrectionModel::run |
( |
| ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.run( | | ) -> | None |
◆ setCCM_TYPE()
void cv::ccm::ColorCorrectionModel::setCCM_TYPE |
( |
CCM_TYPE | ccm_type | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setCCM_TYPE( | ccm_type | ) -> | None |
set ccm_type
- Parameters
-
ccm_type | the shape of color correction matrix(CCM);
default: CCM_3x3 |
◆ setColorSpace()
void cv::ccm::ColorCorrectionModel::setColorSpace |
( |
COLOR_SPACE | cs | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setColorSpace( | cs | ) -> | None |
set ColorSpace
- Note
- It should be some RGB color space; Supported list of color cards:
- Parameters
-
cs | the absolute color space that detected colors convert to;
default: COLOR_SPACE_sRGB |
◆ setDistance()
void cv::ccm::ColorCorrectionModel::setDistance |
( |
DISTANCE_TYPE | distance | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setDistance( | distance | ) -> | None |
◆ setEpsilon()
void cv::ccm::ColorCorrectionModel::setEpsilon |
( |
const double & | epsilon | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setEpsilon( | epsilon | ) -> | None |
set Epsilon
- Parameters
-
epsilon | used in MinProblemSolver-DownhillSolver;
Terminal criteria to the algorithm;
default: 1e-4; |
◆ setInitialMethod()
void cv::ccm::ColorCorrectionModel::setInitialMethod |
( |
INITIAL_METHOD_TYPE | initial_method_type | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setInitialMethod( | initial_method_type | ) -> | None |
set InitialMethod
- Parameters
-
initial_method_type | the method of calculating CCM initial value;
default: INITIAL_METHOD_LEAST_SQUARE |
◆ setLinear()
void cv::ccm::ColorCorrectionModel::setLinear |
( |
LINEAR_TYPE | linear_type | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setLinear( | linear_type | ) -> | None |
◆ setLinearDegree()
void cv::ccm::ColorCorrectionModel::setLinearDegree |
( |
const int & | deg | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setLinearDegree( | deg | ) -> | None |
set degree
- Note
- only valid when linear is set to
- Parameters
-
deg | the degree of linearization polynomial;
default: 3 |
◆ setLinearGamma()
void cv::ccm::ColorCorrectionModel::setLinearGamma |
( |
const double & | gamma | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setLinearGamma( | gamma | ) -> | None |
set Gamma
- Note
- only valid when linear is set to "gamma";
- Parameters
-
gamma | the gamma value of gamma correction;
default: 2.2; |
◆ setMaxCount()
void cv::ccm::ColorCorrectionModel::setMaxCount |
( |
const int & | max_count | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setMaxCount( | max_count | ) -> | None |
set MaxCount
- Parameters
-
max_count | used in MinProblemSolver-DownhillSolver;
Terminal criteria to the algorithm;
default: 5000; |
◆ setSaturatedThreshold()
void cv::ccm::ColorCorrectionModel::setSaturatedThreshold |
( |
const double & | lower, |
|
|
const double & | upper ) |
Python: |
---|
| cv.ccm.ColorCorrectionModel.setSaturatedThreshold( | lower, upper | ) -> | None |
set SaturatedThreshold. The colors in the closed interval [lower, upper] are reserved to participate in the calculation of the loss function and initialization parameters
- Parameters
-
lower | the lower threshold to determine saturation;
default: 0; |
upper | the upper threshold to determine saturation;
default: 0 |
◆ setWeightCoeff()
void cv::ccm::ColorCorrectionModel::setWeightCoeff |
( |
const double & | weights_coeff | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setWeightCoeff( | weights_coeff | ) -> | None |
set WeightCoeff
- Parameters
-
weights_coeff | the exponent number of L* component of the reference color in CIE Lab color space;
default: 0 |
◆ setWeightsList()
void cv::ccm::ColorCorrectionModel::setWeightsList |
( |
const Mat & | weights_list | ) |
|
Python: |
---|
| cv.ccm.ColorCorrectionModel.setWeightsList( | weights_list | ) -> | None |
set WeightsList
- Parameters
-
weights_list | the list of weight of each color;
default: empty array |
The documentation for this class was generated from the following file: