![]() |
IDS peak ICV v1.2.0
|

Public Member Functions | |
| None | __init__ (self, ColorMatrixTransformationModule module) |
| Creates a ColorCorrectionFeature for an existing color matrix transformation module. | |
| bool | enabled (self) |
| Indicates whether the feature is currently enabled. | |
| None | enabled (self, bool value) |
| Enables or disables the feature. | |
| None | reset_to_default (self) |
| Resets the color correction matrix to identity matrix. | |
| numpy.ndarray | matrix (self) |
| Gets the current color correction matrix. | |
| None | matrix (self, numpy.ndarray matrix) |
| Sets the color correction matrix. | |
Protected Attributes | |
| _module = module | |
Color correction applies a 3x3 color correction matrix to the image.
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
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 3×3 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:
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].
The default value for the color correction matrix is the identity matrix.
Definition at line 9 of file color_correction_feature.py.
| None __init__ | ( | self, | |
| ColorMatrixTransformationModule | module ) |
Creates a ColorCorrectionFeature for an existing color matrix transformation module.
| module | Reference to the underlying module |
Definition at line 53 of file color_correction_feature.py.
| bool enabled | ( | self | ) |
Indicates whether the feature is currently enabled.
Reimplemented from IFeature.
Definition at line 64 of file color_correction_feature.py.
| None enabled | ( | self, | |
| bool | value ) |
Enables or disables the feature.
| value | Set to True to enable the feature, or False to disable it. |
Reimplemented from IFeature.
Definition at line 75 of file color_correction_feature.py.
| numpy.ndarray matrix | ( | self | ) |
Gets the current color correction matrix.
Definition at line 96 of file color_correction_feature.py.
| None matrix | ( | self, | |
| numpy.ndarray | matrix ) |
Sets the color correction matrix.
| matrix | A floating-point matrix representing the color correction matrix. |
Definition at line 107 of file color_correction_feature.py.
| None reset_to_default | ( | self | ) |
Resets the color correction matrix to identity matrix.
Reimplemented from IFeature.
Definition at line 85 of file color_correction_feature.py.
|
protected |
Definition at line 61 of file color_correction_feature.py.