|
| | 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 |
| | Gets whether this 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:
red_value_out = red_value_in * red_gain * master_gain
green_value_out = green_value_in * green_gain * master_gain
blue_value_out = blue_value_in * blue_gain * master_gain
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:
gray_value_out = gray_value_in * master_gain
where gray_value_in is the input and gray_value_out the output value, normalized to the range [0.0, 1.0].
- Warning
- Excessive gain values may cause clipping and loss of image detail in bright areas.
- Defaults
- red_gain = 1.0
- green_gain = 1.0
- blue_gain = 1.0
- master_gain = 1.0
- See also
- features::DigitalBlackFeature, features::GammaFeature
- Since
- ids_peak_icv 1.0