
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.
Definition at line 8 of file gamma_feature.py.
| None __init__ | ( | self, | |
| ToneCurveCorrectionModule | module ) |
Creates a gamma feature for an existing tone curve correction module.
| module | Reference to the underlying module |
Definition at line 34 of file gamma_feature.py.
| bool enabled | ( | self | ) |
Gets whether this feature is currently enabled.
Reimplemented from IFeature.
Definition at line 43 of file gamma_feature.py.
| None enabled | ( | self, | |
| bool | enabled ) |
Enables or disables the feature.
| enabled | True to enable, False to disable. |
Reimplemented from IFeature.
Definition at line 55 of file gamma_feature.py.
| 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.
Definition at line 108 of file gamma_feature.py.
| None reset_to_default | ( | self | ) |
Resets the gamma value to its default value (1.0).
Reimplemented from IFeature.
Definition at line 66 of file gamma_feature.py.
| float value | ( | self | ) |
Gets the current gamma correction exponent.
Definition at line 78 of file gamma_feature.py.
| 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. |
Definition at line 89 of file gamma_feature.py.
|
protected |
Definition at line 40 of file gamma_feature.py.
| float value = 1.0 |
Definition at line 75 of file gamma_feature.py.