
Public Member Functions | |
| None | __init__ (self, ToneCurveCorrectionModule module) |
| Creates a digital black feature for an existing tone curve correction module. | |
| bool | enabled (self) |
| Gets whether this feature is currently enabled. | |
| None | enabled (self, bool enabled) |
| Enables or disables the feature. | |
| None | reset_to_default (self) |
| Resets the black level to its default value (0.0). | |
| float | value (self) |
| Gets the current black level value. | |
| None | value (self, float digital_black) |
| Sets the black level value. | |
| Interval | range (self) |
| Retrieves the valid range for the black level value. | |
Data Fields | |
| float | value = 0.0 |
Protected Attributes | |
| _module = module | |
Digital black applies digital black correction to an image.
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
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::
color_value_out = clamp((color_value_in - black) / (1.0 - black), 0.0, 1.0);
where:
All input and output values are in the normalized range [0.0, 1.0].
The default value for digital black is 0.0.
| None __init__ | ( | self, | |
| ToneCurveCorrectionModule | module ) |
Creates a digital black feature for an existing tone curve correction module.
| module | Reference to the underlying module |
| bool enabled | ( | self | ) |
Gets whether this feature is currently enabled.
Reimplemented from IFeature.
| None enabled | ( | self, | |
| bool | enabled ) |
Enables or disables the feature.
| enabled | True to enable, False to disable. |
Reimplemented from IFeature.
| Interval range | ( | self | ) |
Retrieves the valid range for the black level value.
The returned interval specifies the minimum and maximum values that can be passed to value property.
| None reset_to_default | ( | self | ) |
Resets the black level to its default value (0.0).
Reimplemented from IFeature.
| float value | ( | self | ) |
Gets the current black level value.
| None value | ( | self, | |
| float | digital_black ) |
Sets the black level value.
This value is subtracted from the input image channel values before normalizing it. It typically represents sensor black offset.
| digital_black | A floating-point value representing the digital black value in normalized units. Valid values are within the range returned by range property. |
| OutOfRangeException | If digital black value is outside the valid range. |
|
protected |
| float value = 0.0 |