#include <peak_icv/pipeline/features/peak_icv_color_correction_feature.hpp>

Public Member Functions | |
| ColorCorrectionFeature (detail::ColorMatrixTransformationModule &module) | |
| Creates a ColorCorrectionFeature for an existing color matrix transformation module. | |
| void | SetEnabled (bool enabled) override |
| Enables or disables the feature. | |
| bool | IsEnabled () const override |
| Gets whether this feature is currently enabled. | |
| void | ResetToDefault () override |
| Resets the ColorCorrectionMatrix to the default. | |
| void | SetMatrix (const ColorCorrectionMatrix &matrix) |
| Sets the ColorCorrectionMatrix. | |
| ColorCorrectionMatrix | GetMatrix () const |
| Gets the current ColorCorrectionMatrix. | |
Color correction applies a 3x3 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 ColorCorrectionMatrix is applied to the color values of the image.
The ColorCorrectionMatrix 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].
|
inlineexplicit |
Creates a ColorCorrectionFeature for an existing color matrix transformation module.
| module | Reference to the underlying detail::ColorMatrixTransformationModule. |
|
inline |
Gets the current ColorCorrectionMatrix.
|
inlineoverridevirtual |
Gets whether this feature is currently enabled.
true if enabled; otherwise false.Implements IFeature.
|
inlineoverridevirtual |
Resets the ColorCorrectionMatrix to the default.
Implements IFeature.
|
inlineoverridevirtual |
Enables or disables the feature.
| enabled | Set to true to enable, or false to disable. |
Implements IFeature.
|
inline |
Sets the ColorCorrectionMatrix.
| matrix | The ColorCorrectionMatrix to set. |