Table of Contents

Class ColorCorrectionModel

Namespace
Emgu.CV.Ccm
Assembly
Emgu.CV.dll

Core class of ccm model.

public class ColorCorrectionModel : UnmanagedObject, IDisposable
Inheritance
ColorCorrectionModel
Implements
Inherited Members

Constructors

ColorCorrectionModel(Mat, ColorChecker)

Color Correction Model.

public ColorCorrectionModel(Mat src, ColorCorrectionModel.ColorChecker color)

Parameters

src Mat

Detected colors of ColorChecker patches; the color type is RGB not BGR, and the color values are in [0, 1];

color ColorCorrectionModel.ColorChecker

The Built-in color card

ColorCorrectionModel(Mat, Mat, ColorSpace)

Color Correction Model.

public ColorCorrectionModel(Mat src, Mat colors, ColorCorrectionModel.ColorSpace refCs)

Parameters

src Mat

Detected colors of ColorChecker patches; the color type is RGB not BGR, and the color values are in [0, 1];

colors Mat

the reference color values, the color values are in [0, 1].

refCs ColorCorrectionModel.ColorSpace

The corresponding color space. If the color type is some RGB, the format is RGB not BGR

ColorCorrectionModel(Mat, Mat, ColorSpace, Mat)

Color Correction Model.

public ColorCorrectionModel(Mat src, Mat colors, ColorCorrectionModel.ColorSpace refCs, Mat colored)

Parameters

src Mat

Detected colors of ColorChecker patches; the color type is RGB not BGR, and the color values are in [0, 1];

colors Mat

the reference color values, the color values are in [0, 1].

refCs ColorCorrectionModel.ColorSpace

The corresponding color space. If the color type is some RGB, the format is RGB not BGR

colored Mat

Mask of colored color

Properties

Loss

Loss

public double Loss { get; }

Property Value

double

Methods

DisposeObject()

Release the unmanaged memory associated with this object

protected override void DisposeObject()

GetCCM()

Get the CCM

public Mat GetCCM()

Returns

Mat

The CCM matrix

Infer(Mat, bool)

Infer using fitting ccm.

public Mat Infer(Mat img, bool isLinear = false)

Parameters

img Mat

The input image.

isLinear bool

Default false

Returns

Mat

The output array.

Run()

Make color correction

public void Run()

SetCcmType(CcmType)

Ccm type

public void SetCcmType(ColorCorrectionModel.CcmType value)

Parameters

value ColorCorrectionModel.CcmType

The value

SetColorSpace(ColorSpace)

Color space

public void SetColorSpace(ColorCorrectionModel.ColorSpace value)

Parameters

value ColorCorrectionModel.ColorSpace

The value

SetDistanceType(DistanceType)

The type of color distance

public void SetDistanceType(ColorCorrectionModel.DistanceType value)

Parameters

value ColorCorrectionModel.DistanceType

The value

SetLinearDegree(int)

The degree of linearization polynomial

public void SetLinearDegree(int value)

Parameters

value int

The value

SetLinearGamma(double)

The gamma value of gamma correction

public void SetLinearGamma(double value)

Parameters

value double

The value

SetLinearType(LinearType)

The method of linearization

public void SetLinearType(ColorCorrectionModel.LinearType value)

Parameters

value ColorCorrectionModel.LinearType

The value

SetMaxCount(int)

Used in MinProblemSolver-DownhillSolver, terminal criteria to the algorithm

public void SetMaxCount(int value)

Parameters

value int

The value

SetWeightCoeff(double)

The exponent number of L* component of the reference color in CIE Lab color space

public void SetWeightCoeff(double value)

Parameters

value double

The value