IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
ColorCorrectionFeature Class Reference
Inheritance diagram for ColorCorrectionFeature:

Public Member Functions

 ColorCorrectionFeature (ColorMatrixTransformationModule module)
 Creates a ColorCorrectionFeature for an existing color matrix transformation module.
 
void ResetToDefault ()
 Resets the color correction matrix to the default.
 

Properties

ColorCorrectionMatrix Matrix [get, set]
 The current Types.ColorCorrectionMatrix.
 
bool IsEnabled [get, set]
 Enables or disables the feature.
 

Detailed Description

Color correction applies a 3x3 Types.ColorCorrectionMatrix to the image.

Color correction is typically used to convert colors from a camera sensor's native RGB space to a standard color space, or to perform color balancing and correction.

When performing color correction, a 3x3 color correction matrix is applied to the color values of the image.

The color correction matrix is represented as a 3x3 float array:

┌ ┐
│ m_00 │ m_01 │ m_02 │
│ m_10 │ m_11 │ m_12 │
│ m_20 │ m_21 │ m_22 │
└ ┘

Each element m_ij defines how much of the input channel j contributes to the output channel i. For example, m_01 is the contribution of the green input to the red output.

The matrix is applied as follows:

red_value_out = m_00 * red_value_in + m_01 * green_value_in + m_02 * blue_value_in;
green_value_out = m_10 * red_value_in + m_11 * green_value_in + m_12 * blue_value_in;
blue_value_out = m_20 * red_value_in + m_21 * green_value_in + m_22 * blue_value_in;

where red_value_in, green_value_in, and blue_value_in are the input red, green, and blue channel values, respectively, and red_value_out, green_value_out, and blue_value_out are the corresponding corrected output values.

All RGB values are normalized to the range [0.0, 1.0].

Defaults
  • identity matrix
Warning
Improper color correction matrices may result in color shifts, clipping, or unnatural colors.
See also
Types.ColorCorrectionMatrix, SaturationFeature, ChromaticAdaptionFeature
Since
IDSImaging.Peak.ICV 1.3

Definition at line 65 of file ColorCorrectionFeature.cs.

Constructor & Destructor Documentation

◆ ColorCorrectionFeature()

Creates a ColorCorrectionFeature for an existing color matrix transformation module.

Parameters
moduleReference to the underlying ColorMatrixTransformationModule.

Definition at line 75 of file ColorCorrectionFeature.cs.

Member Function Documentation

◆ ResetToDefault()

void ResetToDefault ( )
inline

Resets the color correction matrix to the default.

Note
The enabled state does not change when calling this function.

Implements IFeature.

Definition at line 103 of file ColorCorrectionFeature.cs.

Property Documentation

◆ IsEnabled

bool IsEnabled
getset

Enables or disables the feature.

Implements IFeature.

Definition at line 90 of file ColorCorrectionFeature.cs.

◆ Matrix

ColorCorrectionMatrix Matrix
getset

The current Types.ColorCorrectionMatrix.

Definition at line 83 of file ColorCorrectionFeature.cs.