Color Correction module#
Detailed Description#
Classes#
Name |
Description |
|---|---|
Core class of ccm model. View details |
Enumerations#
Enum of the possible types of ccm. View details
Macbeth and Vinyl ColorChecker with 2deg D50. View details
enum cv::ccm::ColorSpace {
cv::ccm::COLOR_SPACE_SRGB,
cv::ccm::COLOR_SPACE_SRGBL,
cv::ccm::COLOR_SPACE_ADOBE_RGB,
cv::ccm::COLOR_SPACE_ADOBE_RGBL,
cv::ccm::COLOR_SPACE_WIDE_GAMUT_RGB,
cv::ccm::COLOR_SPACE_WIDE_GAMUT_RGBL,
cv::ccm::COLOR_SPACE_PRO_PHOTO_RGB,
cv::ccm::COLOR_SPACE_PRO_PHOTO_RGBL,
cv::ccm::COLOR_SPACE_DCI_P3_RGB,
cv::ccm::COLOR_SPACE_DCI_P3_RGBL,
cv::ccm::COLOR_SPACE_APPLE_RGB,
cv::ccm::COLOR_SPACE_APPLE_RGBL,
cv::ccm::COLOR_SPACE_REC_709_RGB,
cv::ccm::COLOR_SPACE_REC_709_RGBL,
cv::ccm::COLOR_SPACE_REC_2020_RGB,
cv::ccm::COLOR_SPACE_REC_2020_RGBL,
cv::ccm::COLOR_SPACE_XYZ_D65_2,
cv::ccm::COLOR_SPACE_XYZ_D50_2,
cv::ccm::COLOR_SPACE_XYZ_D65_10,
cv::ccm::COLOR_SPACE_XYZ_D50_10,
cv::ccm::COLOR_SPACE_XYZ_A_2,
cv::ccm::COLOR_SPACE_XYZ_A_10,
cv::ccm::COLOR_SPACE_XYZ_D55_2,
cv::ccm::COLOR_SPACE_XYZ_D55_10,
cv::ccm::COLOR_SPACE_XYZ_D75_2,
cv::ccm::COLOR_SPACE_XYZ_D75_10,
cv::ccm::COLOR_SPACE_XYZ_E_2,
cv::ccm::COLOR_SPACE_XYZ_E_10,
cv::ccm::COLOR_SPACE_LAB_D65_2,
cv::ccm::COLOR_SPACE_LAB_D50_2,
cv::ccm::COLOR_SPACE_LAB_D65_10,
cv::ccm::COLOR_SPACE_LAB_D50_10,
cv::ccm::COLOR_SPACE_LAB_A_2,
cv::ccm::COLOR_SPACE_LAB_A_10,
cv::ccm::COLOR_SPACE_LAB_D55_2,
cv::ccm::COLOR_SPACE_LAB_D55_10,
cv::ccm::COLOR_SPACE_LAB_D75_2,
cv::ccm::COLOR_SPACE_LAB_D75_10,
cv::ccm::COLOR_SPACE_LAB_E_2,
cv::ccm::COLOR_SPACE_LAB_E_10
}Enum of possible functions to calculate the distance between colors. View details
Enum of the possible types of initial method. View details
Linearization transformation type. View details
Enumeration Type Documentation#
CcmType#
enum cv::ccm::CcmType
#include <opencv2/photo/ccm.hpp>
Enum of the possible types of ccm.
Enumerator:
|
Uses a \(3\times3\) matrix to linearly transform RGB values without offsets. |
|
Uses a \(4\times3\) matrix to affine transform RGB values with both scaling and offset terms. |
ColorCheckerType#
enum cv::ccm::ColorCheckerType
#include <opencv2/photo/ccm.hpp>
Macbeth and Vinyl ColorChecker with 2deg D50.
Enumerator:
|
Macbeth ColorChecker. |
|
DKK ColorChecker. |
|
DigitalSG ColorChecker with 140 squares. |
ColorSpace#
enum cv::ccm::ColorSpace
#include <opencv2/photo/ccm.hpp>
Enumerator:
|
https://en.wikipedia.org/wiki/SRGB , RGB color space |
|
https://en.wikipedia.org/wiki/SRGB , linear RGB color space |
|
https://en.wikipedia.org/wiki/Adobe_RGB_color_space , RGB color space |
|
https://en.wikipedia.org/wiki/Adobe_RGB_color_space , linear RGB color space |
|
https://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space , RGB color space |
|
https://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space , linear RGB color space |
|
https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space , RGB color space |
|
https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space , linear RGB color space |
|
https://en.wikipedia.org/wiki/DCI-P3 , RGB color space |
|
https://en.wikipedia.org/wiki/DCI-P3 , linear RGB color space |
|
http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html , RGB color space |
|
http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html , linear RGB color space |
|
https://en.wikipedia.org/wiki/Rec._709 , RGB color space |
|
https://en.wikipedia.org/wiki/Rec._709 , linear RGB color space |
|
https://en.wikipedia.org/wiki/Rec._2020 , RGB color space |
|
https://en.wikipedia.org/wiki/Rec._2020 , linear RGB color space |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D65 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D50 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D65 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D50 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, A illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, A illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D55 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D55 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D75 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, D75 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, E illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIE_1931_color_space , XYZ color space, E illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D65 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D50 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D65 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D50 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, A illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, A illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D55 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D55 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D75 illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, D75 illuminant, 10 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, E illuminant, 2 degree |
|
https://en.wikipedia.org/wiki/CIELAB_color_space , Lab color space, E illuminant, 10 degree |
DistanceType#
#include <opencv2/photo/ccm.hpp>
Enum of possible functions to calculate the distance between colors.
See https://en.wikipedia.org/wiki/Color_difference for details
Enumerator:
|
The 1976 formula is the first formula that related a measured color difference to a known set of CIELAB coordinates. |
|
The 1976 definition was extended to address perceptual non-uniformities. |
|
|
|
|
|
In 1984, the Colour Measurement Committee of the Society of Dyers and Colourists defined a difference measure, also based on the LCh color model. |
|
|
|
Euclidean distance of rgb color space. |
|
Euclidean distance of rgbl color space. |
InitialMethodType#
enum cv::ccm::InitialMethodType
#include <opencv2/photo/ccm.hpp>
Enum of the possible types of initial method.
Enumerator:
|
The white balance method. The initial value is: $
M_{CCM}=
\begin{bmatrix}
k_R & 0 & 0\\
0 & k_G & 0\\
0 & 0 & k_B\\
\end{bmatrix}
$
where $
k_R=mean(R_{li}')/mean(R_{li})\\
k_G=mean(G_{li}')/mean(G_{li})\\
k_B=mean(B_{li}')/mean(B_{li})
$
|
|
The least square method is an optimal solution under the linear RGB distance function. |
LinearizationType#
enum cv::ccm::LinearizationType
#include <opencv2/photo/ccm.hpp>
Linearization transformation type.
Enumerator:
|
no change is made |
|
gamma correction; Need assign a value to gamma simultaneously |
|
polynomial fitting channels respectively; Need assign a value to deg simultaneously |
|
logarithmic polynomial fitting channels respectively; Need assign a value to deg simultaneously |
|
grayscale polynomial fitting; Need assign a value to deg and dst_whites simultaneously |
|
grayscale Logarithmic polynomial fitting; Need assign a value to deg and dst_whites simultaneously |
Function Documentation#
gammaCorrection()#
void cv::ccm::gammaCorrection(
InputArray src,
OutputArray dst,
double gamma )
#include <opencv2/photo/ccm.hpp>
Python:
cv.ccm.gammaCorrection(src, gamma[, dst]) -> dst
Applies gamma correction to the input image.
Parameters
src— Input image.dst— Output image.gamma— Gamma correction greater than zero.
read()#
void cv::ccm::read(
const cv::FileNode & node,
ColorCorrectionModel & ccm,
const ColorCorrectionModel & defaultValue = ColorCorrectionModel() )
#include <opencv2/photo/ccm.hpp>
write()#
void cv::ccm::write(
cv::FileStorage & fs,
const std::string & ,
const ColorCorrectionModel & ccm )
#include <opencv2/photo/ccm.hpp>