Table of Contents

Advertisement

AW00136902000

11.4 Gamma

The Gamma feature lets you modify the brightness of acquired images to account for a non-linearity
in the human perception of brightness.
The gamma correction can be set manually as desired using the Gamma parameter:
Gamma = 1: The overall brightness is not corrected (unless the pixel format is set to
YCbCr422 or RGB8, see section below).
Gamma < 1: The overall brightness is increased.
Gamma > 1: The overall brightness is decreased.
In all cases, black pixels (brightness = 0) and white pixels (brightness = maximum) will not be
adjusted. The maximum pixel brightness equals 255 for 8-bit output and 4095 for 12-bit output.
To accomplish gamma correction, a gamma correction value () is applied to the pixel value of each
pixel according to the following formula:
Y
uncorrected
-------------------------- -
Y
=
corrected
Y
max
sRGB Gamma Correction and Color Space Mode
If the pixel format is set to YCbCr422 or RGB 8, you can use the BslColorSpaceMode parameter to
change the color space for image acquisition. This will enable or disable the application of an
additional sRGB gamma correction value.
You can set the BslColorSpaceMode parameter to the following values:
sRGB: The image brightness is optimized for display on an sRGB monitor. An additional
gamma correction value of approximately 0.4 is applied. This is the default setting.
Note that the sRGB gamma correction is independent from the Gamma parameter and will not
be reflected in the Gamma parameter value.
Example: You set the BslColorSpaceMode parameter to sRGB and the Gamma parameter
value to 1.2. First, an sRGB gamma correction value of approximately 0.4 is applied to the pixel
values. Then, a gamma correction value of 1.2 is applied to the resulting pixel values.
RGB: No additional sRGB gamma correction value is applied.
If the pixel format is set to Bayer 8 or Bayer 12, the BslColorSpaceMode parameter is not available,
and gamma correction is always performed in RGB color space.
You can set the parameter values from within your application software by using the Basler pylon
API. The following code snippet illustrates using the API to set the color space to sRGB and the
gamma correction 1.2 as an example:
// Set the color space to sRGB
camera.BslColorSpaceMode.SetValue(BslColorSpaceMode_sRGB);
// Set the Gamma value to 1.2
camera.Gamma.SetValue(1.2);
Basler dart BCON
Y
max
Features
85

Advertisement

Table of Contents
loading

Table of Contents