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
- DigitalBlackFeature, GammaFeature
- Since
- IDSImaging.Peak.ICV 1.3