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

Public Member Functions | |
| DigitalBlackFeature (detail::ToneCurveCorrectionModule &module) | |
| Creates a DigitalBlackFeature for an existing tone curve correction 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 digital black value to its default. | |
| void | SetValue (float digitalBlack) |
| Sets the digital black correction value. | |
| float | GetValue () const |
| Gets the current digital black correction value. | |
| peak::common::IntervalF | GetRange () const |
| Retrieves the valid range for the digital black value. | |
Digital black applies digital black correction to an image.
This feature adjusts the image luminance by first subtracting a digital black and then normalizing the result. This compensates for sensor digital black offsets.
The correction is applied independently to each channel in the image. For RGB images, it is applied to each color channel (R, G, B), and for monochrome images, it is applied to the single intensity channel.
The correction is performed using the following formula:
where:
color_value_in is the input channel value,black is the digital black to be subtracted (in normalized units),color_value_out is the resulting output value.All input and output values are in the normalized range [0.0, 1.0].
|
inlineexplicit |
Creates a DigitalBlackFeature for an existing tone curve correction module.
| module | Reference to the underlying detail::ToneCurveCorrectionModule. |
|
inline |
Retrieves the valid range for the digital black value.
The returned interval specifies the minimum and maximum values that can be passed to SetValue.
|
inline |
Gets the current digital black correction value.
|
inlineoverridevirtual |
Gets whether this feature is currently enabled.
true if enabled; otherwise false.Implements IFeature.
|
inlineoverridevirtual |
Resets the digital black value to its default.
Implements IFeature.
|
inlineoverridevirtual |
Enables or disables the feature.
| enabled | Set to true to enable, or false to disable. |
Implements IFeature.
|
inline |
Sets the digital black correction value.
This value is subtracted from the input image channel values before normalizing it. It typically represents sensor black offset.
| digitalBlack | A floating-point value representing the digital black value in normalized units. Valid values are within the range returned by GetRange. |
| OutOfRangeException | If digitalBlack is outside the valid range. |