
Public Member Functions | |
| None | __init__ (self, ToneCurveCorrectionModule module) |
| Creates a gamma 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 gamma value to its default value (1.0). | |
| float | value (self) |
| Gets the current gamma correction exponent. | |
| None | value (self, float gamma) |
| Sets the gamma correction exponent. | |
| Interval | range (self) |
| Retrieves the valid range for the gamma correction exponent. | |
Data Fields | |
| float | value = 1.0 |
Protected Attributes | |
| _module = module | |
Gamma applies an inverse gamma transformation to an image.
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
This module adjusts the image luminance by applying an inverse gamma correction. This prepares the image for a linear domain or further processing.
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 ^ (1.0 / gamma)
The default value for gamma is 1.0.
| None __init__ | ( | self, | |
| ToneCurveCorrectionModule | module ) |
Creates a gamma 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 gamma correction exponent.
The returned interval specifies the minimum and maximum values that can be passed to value property.
| None reset_to_default | ( | self | ) |
Resets the gamma value to its default value (1.0).
Reimplemented from IFeature.
| float value | ( | self | ) |
Gets the current gamma correction exponent.
| None value | ( | self, | |
| float | gamma ) |
Sets the gamma correction exponent.
This value determines the degree of inverse gamma correction applied during processing, where output values are computed as input ^ (1/gamma). Higher gamma values lighten the image, while values closer to zero darken it.
| gamma | A floating-point value representing the gamma exponent. Valid values are within the range returned by range property. |
| OutOfRangeException | If gamma is outside the valid range. |
|
protected |
| float value = 1.0 |