OpenCV 4.5.3(日本語機械翻訳)
ccm.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4 //
5 //
6 // License Agreement
7 // For Open Source Computer Vision Library
8 //
9 // Copyright(C) 2020, Huawei Technologies Co.,Ltd. All rights reserved.
10 // Third party copyrights are property of their respective owners.
11 //
12 // Licensed under the Apache License, Version 2.0 (the "License");
13 // you may not use this file except in compliance with the License.
14 // You may obtain a copy of the License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the License is distributed on an "AS IS" BASIS,
20 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 // See the License for the specific language governing permissions and
22 // limitations under the License.
23 //
24 // Author: Longbu Wang <wanglongbu@huawei.com.com>
25 // Jinheng Zhang <zhangjinheng1@huawei.com>
26 // Chenqi Shan <shanchenqi@huawei.com>
27
28 #ifndef __OPENCV_MCC_CCM_HPP__
29 #define __OPENCV_MCC_CCM_HPP__
30
31 #include <opencv2/core.hpp>
32 #include <opencv2/imgproc.hpp>
33
34 namespace cv
35{
36 namespace ccm
37{
60{
63};
64
68{
85};
92};
134};
135
330{
331
338 };
339
345{
348 DISTANCE_CIE94_TEXTILES,
349 DISTANCE_CIE2000,
351 DISTANCE_CMC_2TO1,
354 };
355
360 class CV_EXPORTS_W ColorCorrectionModel
361{
362 public:
374 CV_WRAP ColorCorrectionModel(const Mat& src, CONST_COLOR constcolor);
375
383 CV_WRAP ColorCorrectionModel(const Mat& src, Mat colors, COLOR_SPACE ref_cs);
384
393 CV_WRAP ColorCorrectionModel(const Mat& src, Mat colors, COLOR_SPACE ref_cs, Mat colored);
394
409 CV_WRAP void setColorSpace(COLOR_SPACE cs);
410
415 CV_WRAP void setCCM_TYPE(CCM_TYPE ccm_type);
416
421 CV_WRAP void setDistance(DISTANCE_TYPE distance);
422
427 CV_WRAP void setLinear(LINEAR_TYPE linear_type);
428
436 CV_WRAP void setLinearGamma(const double& gamma);
437
449 CV_WRAP void setLinearDegree(const int& deg);
450
459 CV_WRAP void setSaturatedThreshold(const double& lower, const double& upper);
460
465 CV_WRAP void setWeightsList(const Mat& weights_list);
466
471 CV_WRAP void setWeightCoeff(const double& weights_coeff);
472
477 CV_WRAP void setInitialMethod(INITIAL_METHOD_TYPE initial_method_type);
478
484 CV_WRAP void setMaxCount(const int& max_count);
485
491 CV_WRAP void setEpsilon(const double& epsilon);
492
494 CV_WRAP void run();
495
496 CV_WRAP Mat getCCM() const;
497 CV_WRAP double getLoss() const;
498 CV_WRAP Mat get_src_rgbl() const;
499 CV_WRAP Mat get_dst_rgbl() const;
500 CV_WRAP Mat getMask() const;
501 CV_WRAP Mat getWeights() const;
502
508 CV_WRAP Mat infer(const Mat& img, bool islinear = false);
509
510 class Impl;
511 private:
512 std::shared_ptr<Impl> p;
513};
514
516} // namespace ccm
517} // namespace cv
518
519 #endif
n-dimensional dense array class
Definition: mat.hpp:802
Core class of ccm model
Definition: ccm.hpp:361
COLOR_SPACE
Definition: ccm.hpp:93
CCM_TYPE
Enum of the possible types of ccm.
Definition: ccm.hpp:60
INITIAL_METHOD_TYPE
Enum of the possible types of initial method.
Definition: ccm.hpp:68
CONST_COLOR
Macbeth and Vinyl ColorChecker with 2deg D50
Definition: ccm.hpp:88
DISTANCE_TYPE
Enum of possible functions to calculate the distance between colors.
Definition: ccm.hpp:345
LINEAR_TYPE
Linearization transformation type
Definition: ccm.hpp:330
@ COLOR_SPACE_REC_709_RGBL
https://en.wikipedia.org/wiki/Rec._709 , linear RGB color space
Definition: ccm.hpp:107
@ COLOR_SPACE_WideGamutRGBL
https://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space , linear RGB color space
Definition: ccm.hpp:99
@ COLOR_SPACE_XYZ_D65_10
non-RGB color space
Definition: ccm.hpp:111
@ COLOR_SPACE_WideGamutRGB
https://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space , RGB color space
Definition: ccm.hpp:98
@ COLOR_SPACE_Lab_D55_10
non-RGB color space
Definition: ccm.hpp:129
@ COLOR_SPACE_XYZ_E_10
non-RGB color space
Definition: ccm.hpp:121
@ COLOR_SPACE_XYZ_A_10
non-RGB color space
Definition: ccm.hpp:115
@ COLOR_SPACE_AdobeRGBL
https://en.wikipedia.org/wiki/Adobe_RGB_color_space , linear RGB color space
Definition: ccm.hpp:97
@ COLOR_SPACE_XYZ_D50_2
non-RGB color space
Definition: ccm.hpp:112
@ COLOR_SPACE_REC_2020_RGBL
https://en.wikipedia.org/wiki/Rec._2020 , linear RGB color space
Definition: ccm.hpp:109
@ COLOR_SPACE_Lab_D50_10
non-RGB color space
Definition: ccm.hpp:125
@ COLOR_SPACE_Lab_D55_2
non-RGB color space
Definition: ccm.hpp:128
@ COLOR_SPACE_XYZ_D65_2
https://en.wikipedia.org/wiki/CIE_1931_color_space , non-RGB color space
Definition: ccm.hpp:110
@ COLOR_SPACE_AppleRGB
https://en.wikipedia.org/wiki/RGB_color_space , RGB color space
Definition: ccm.hpp:104
@ COLOR_SPACE_DCI_P3_RGBL
https://en.wikipedia.org/wiki/DCI-P3 , linear RGB color space
Definition: ccm.hpp:103
@ COLOR_SPACE_Lab_D65_10
non-RGB color space
Definition: ccm.hpp:123
@ COLOR_SPACE_XYZ_E_2
non-RGB color space
Definition: ccm.hpp:120
@ COLOR_SPACE_DCI_P3_RGB
https://en.wikipedia.org/wiki/DCI-P3 , RGB color space
Definition: ccm.hpp:102
@ COLOR_SPACE_Lab_A_10
non-RGB color space
Definition: ccm.hpp:127
@ COLOR_SPACE_Lab_D75_10
non-RGB color space
Definition: ccm.hpp:131
@ COLOR_SPACE_Lab_D65_2
https://en.wikipedia.org/wiki/CIELAB_color_space , non-RGB color space
Definition: ccm.hpp:122
@ COLOR_SPACE_REC_2020_RGB
https://en.wikipedia.org/wiki/Rec._2020 , RGB color space
Definition: ccm.hpp:108
@ COLOR_SPACE_Lab_D50_2
non-RGB color space
Definition: ccm.hpp:124
@ COLOR_SPACE_XYZ_A_2
non-RGB color space
Definition: ccm.hpp:114
@ COLOR_SPACE_sRGBL
https://en.wikipedia.org/wiki/SRGB , linear RGB color space
Definition: ccm.hpp:95
@ COLOR_SPACE_REC_709_RGB
https://en.wikipedia.org/wiki/Rec._709 , RGB color space
Definition: ccm.hpp:106
@ COLOR_SPACE_AdobeRGB
https://en.wikipedia.org/wiki/Adobe_RGB_color_space , RGB color space
Definition: ccm.hpp:96
@ COLOR_SPACE_ProPhotoRGBL
https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space , linear RGB color space
Definition: ccm.hpp:101
@ COLOR_SPACE_Lab_D75_2
non-RGB color space
Definition: ccm.hpp:130
@ COLOR_SPACE_XYZ_D55_2
non-RGB color space
Definition: ccm.hpp:116
@ COLOR_SPACE_ProPhotoRGB
https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space , RGB color space
Definition: ccm.hpp:100
@ COLOR_SPACE_Lab_A_2
non-RGB color space
Definition: ccm.hpp:126
@ COLOR_SPACE_sRGB
https://en.wikipedia.org/wiki/SRGB , RGB color space
Definition: ccm.hpp:94
@ COLOR_SPACE_XYZ_D50_10
non-RGB color space
Definition: ccm.hpp:113
@ COLOR_SPACE_AppleRGBL
https://en.wikipedia.org/wiki/RGB_color_space , linear RGB color space
Definition: ccm.hpp:105
@ COLOR_SPACE_Lab_E_10
non-RGB color space
Definition: ccm.hpp:133
@ COLOR_SPACE_Lab_E_2
non-RGB color space
Definition: ccm.hpp:132
@ COLOR_SPACE_XYZ_D55_10
non-RGB color space
Definition: ccm.hpp:117
@ COLOR_SPACE_XYZ_D75_2
non-RGB color space
Definition: ccm.hpp:118
@ COLOR_SPACE_XYZ_D75_10
non-RGB color space
Definition: ccm.hpp:119
@ CCM_4x3
The CCM with the shape performs affine transformation.
Definition: ccm.hpp:62
@ CCM_3x3
The CCM with the shape performs linear transformation on color values.
Definition: ccm.hpp:61
@ INITIAL_METHOD_LEAST_SQUARE
the least square method is an optimal solution under the linear RGB distance function
Definition: ccm.hpp:84
@ INITIAL_METHOD_WHITE_BALANCE
Definition: ccm.hpp:69
@ COLORCHECKER_Vinyl
DKK ColorChecker
Definition: ccm.hpp:90
@ COLORCHECKER_Macbeth
Macbeth ColorChecker
Definition: ccm.hpp:89
@ COLORCHECKER_DigitalSG
DigitalSG ColorChecker with 140 squares
Definition: ccm.hpp:91
@ DISTANCE_RGBL
Euclidean distance of rgbl color space
Definition: ccm.hpp:353
@ DISTANCE_RGB
Euclidean distance of rgb color space
Definition: ccm.hpp:352
@ DISTANCE_CMC_1TO1
In 1984, the Colour Measurement Committee of the Society of Dyers and Colourists defined a difference...
Definition: ccm.hpp:350
@ DISTANCE_CIE94_GRAPHIC_ARTS
The 1976 definition was extended to address perceptual non-uniformities.
Definition: ccm.hpp:347
@ DISTANCE_CIE76
The 1976 formula is the first formula that related a measured color difference to a known set of CIEL...
Definition: ccm.hpp:346
@ LINEARIZATION_COLORLOGPOLYFIT
logarithmic polynomial fitting channels respectively; Need assign a value to deg simultaneously
Definition: ccm.hpp:335
@ LINEARIZATION_IDENTITY
no change is made
Definition: ccm.hpp:332
@ LINEARIZATION_GAMMA
gamma correction; Need assign a value to gamma simultaneously
Definition: ccm.hpp:333
@ LINEARIZATION_GRAYPOLYFIT
grayscale polynomial fitting; Need assign a value to deg and dst_whites simultaneously
Definition: ccm.hpp:336
@ LINEARIZATION_GRAYLOGPOLYFIT
grayscale Logarithmic polynomial fitting; Need assign a value to deg and dst_whites simultaneously
Definition: ccm.hpp:337
@ LINEARIZATION_COLORPOLYFIT
polynomial fitting channels respectively; Need assign a value to deg simultaneously
Definition: ccm.hpp:334
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75