Gamma Correction - Basler Racer User Manual

Camera link cameras
Hide thumbs Also See for Racer:
Table of Contents

Advertisement

AW00118508000

8.8 Gamma Correction

The gamma correction feature lets you modify the brightness of the pixel values output by the
camera's sensor to account for a non-linearity in the human perception of brightness. To accomplish
the correction, a gamma correction factor (γ) is applied to the brightness value (Y) of each pixel
according to the following formula:
Y
uncorrected
-------------------------- -
Y
=
corrected
Y
The formula uses uncorrected and corrected pixel brightnesses that are normalized by the
maximum pixel brightness. The maximum pixel brightness equals 255 for 8 bit output and 4095 for
12 bit output.
When the gamma correction factor is set to 1, the output pixel brightness will not be corrected.
A gamma correction factor between 0 and 1 will result in increased overall brightness, and a gamma
correction factor greater than 1 will result in decreased overall brightness.
In all cases, black (output pixel brightness equals 0) and white (output pixel brightness equals 255
at 8 bit output and 4095 at 12 bit output) will not be corrected.
Enabling Gamma Correction and Setting the Gamma
You can enable or disable the gamma correction feature by setting the value of the GammaEnable
parameter.
When gamma correction is enabled, the correction factor is determined by the value of the Gamma
parameter. The Gamma parameter can be set in a range from 0 to 3.99902. So if the Gamma
parameter is set to 1.2, for example, the gamma correction factor will be 1.2.
You can set the GammaEnable and Gamma parameter values from within your application software
by using the Basler pylon API. The following code snippet illustrates using the API to set the
parameter values:
// Enable the Gamma feature
camera.GammaEnable.SetValue(true);
// Set the Gamma value to 1.2
camera.Gamma.SetValue(1.2);
For detailed information about using the pylon API, refer to the Basler pylon Programmer's Guide
and API Reference.
You can also use the Basler pylon Viewer application to easily set the parameters.
For more information about the pylon API and the pylon Viewer, see Section 3.1 on
Basler racer Camera Link
γ
×
Y
max
max
Features
page
26.
125

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents