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

Public Member Functions | |
| GammaFeature (detail::ToneCurveCorrectionModule &module) | |
| Creates a GammaFeature 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 gamma value to the default. | |
| void | SetValue (float gamma) |
| Sets the gamma correction exponent. | |
| float | GetValue () const |
| Gets the current gamma correction exponent. | |
| peak::common::IntervalF | GetRange () const |
| Retrieves the valid range for the gamma correction exponent. | |
Gamma applies an inverse gamma transformation to an image.
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:
where:
color_value_in is the input channel value,gamma is the gamma exponent,color_value_out is the resulting output value.
|
inlineexplicit |
Creates a GammaFeature for an existing tone curve correction module.
| module | Reference to the underlying detail::ToneCurveCorrectionModule. |
|
inline |
Retrieves the valid range for the gamma correction exponent.
The returned interval specifies the minimum and maximum values that can be passed to SetValue.
|
inline |
Gets the current gamma correction exponent.
|
inlineoverridevirtual |
Gets whether this feature is currently enabled.
true if enabled; otherwise false.Implements IFeature.
|
inlineoverridevirtual |
Resets the gamma value 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 gamma correction exponent.
This value determines the degree of inverse gamma correction applied during processing, where output values are computed as pow(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 GetRange. |
| OutOfRangeException | If gamma is outside the valid range. |