![]() |
IDS peak ICV v1.2.0
|
#include <peak_icv/pipeline/features/peak_icv_gain_feature.hpp>

Public Member Functions | |
| GainFeature (detail::GainModule &module) | |
| Creates a GainFeature for an existing gain module. | |
| void | SetEnabled (bool enabled) override |
| Enables or disables the feature. | |
| bool | IsEnabled () const override |
| Indicates whether the feature is currently enabled. | |
| void | ResetToDefault () override |
| Resets the gain values to their defaults. | |
| void | SetMaster (float value) |
| Sets the master gain value. | |
| float | GetMaster () const |
| Retrieves the current master gain. | |
| void | SetRed (float value) |
| Sets the red gain value. | |
| float | GetRed () const |
| Retrieves the current red gain. | |
| void | SetGreen (float value) |
| Sets the green gain value. | |
| float | GetGreen () const |
| Retrieves the current green gain. | |
| void | SetBlue (float value) |
| Sets the blue gain value. | |
| float | GetBlue () const |
| Retrieves the current blue gain. | |
| peak::common::IntervalF | GetRange () const |
| Retrieves the valid range for the master or color gains. | |
The GainFeature applies gain to the image.
Gain is used to adjust pixel intensities either uniformly across all color channels using the master gain, or individually per channel using the red, green, and blue gains. With master gain, image brightness can be increased. With color gains, the white balance can be adjusted.
For color images, gain is applied as follows:
where red_value_in, green_value_in, and blue_value_in are the input red, green, and blue channel values, respectively, and red_value_out, green_value_out, and blue_value_out are the corresponding output values. All RGB values are normalized to the range [0.0, 1.0].
For mono images, the color gains are ignored and applied as follows:
where gray_value_in is the input and gray_value_out the output value, normalized to the range [0.0, 1.0].
Definition at line 65 of file peak_icv_gain_feature.hpp.
|
inlineexplicit |
Creates a GainFeature for an existing gain module.
| module | Reference to the underlying detail::GainModule. |
Definition at line 204 of file peak_icv_gain_feature.hpp.
|
inline |
Retrieves the current blue gain.
Definition at line 258 of file peak_icv_gain_feature.hpp.
|
inline |
Retrieves the current green gain.
Definition at line 248 of file peak_icv_gain_feature.hpp.
|
inline |
Retrieves the current master gain.
Definition at line 228 of file peak_icv_gain_feature.hpp.
|
inline |
Retrieves the valid range for the master or color gains.
The returned interval specifies the minimum and maximum values that can be passed to SetMaster, SetRed, SetGreen and SetBlue.
Definition at line 263 of file peak_icv_gain_feature.hpp.
|
inline |
Retrieves the current red gain.
Definition at line 238 of file peak_icv_gain_feature.hpp.
|
inlineoverridevirtual |
Indicates whether the feature is currently enabled.
true if enabled; otherwise, false.Implements IFeature.
Definition at line 213 of file peak_icv_gain_feature.hpp.
|
inlineoverridevirtual |
Resets the gain values to their defaults.
Implements IFeature.
Definition at line 218 of file peak_icv_gain_feature.hpp.
|
inline |
Sets the blue gain value.
Sets the color gain for the blue channel. The valid range for the gain value can be obtained using the GetRange function.
| value | The blue gain value to set. |
| peak::icv::OutOfRangeException | If the gain value is outside the valid range. |
Definition at line 253 of file peak_icv_gain_feature.hpp.
|
inlineoverridevirtual |
Enables or disables the feature.
| enabled | Set to true to enable the feature, or false to disable it. |
Implements IFeature.
Definition at line 208 of file peak_icv_gain_feature.hpp.
|
inline |
Sets the green gain value.
Sets the color gain for the green channel. The valid range for the gain value can be obtained using the GetRange function.
| value | The green gain value to set. |
| peak::icv::OutOfRangeException | If the gain value is outside the valid range. |
Definition at line 243 of file peak_icv_gain_feature.hpp.
|
inline |
Sets the master gain value.
Sets the overall master gain. The valid range for the gain value can be obtained using the GetRange function.
| value | The master gain value to set. |
| peak::icv::OutOfRangeException | If the gain value is outside the valid range. |
Definition at line 223 of file peak_icv_gain_feature.hpp.
|
inline |
Sets the red gain value.
Sets the color gain for the red channel. The valid range for the gain value can be obtained using the GetRange function.
| value | The red gain value to set. |
| peak::icv::OutOfRangeException | If the gain value is outside the valid range. |
Definition at line 233 of file peak_icv_gain_feature.hpp.