Color Creation and Enhancement
154 Basler ace GigE
The matrix color transformation feature lets you adjust how the second step of the process, the RGB
to RGB matrix conversion is carried out. With this type of conversion, a vector consisting of the R,
G, and B components for every pixel is multiplied by a matrix containing a set of correction values.
The main objectives of this matrix multiplication process are to make corrections to the color
information that will account for the type of lighting used during image acquisition and to
compensate for any imperfections in the sensor’s color generation process.
The first camera parameter associated with matrix color transformation is the Color Transformation
Selector parameter. This parameter is used to select the type of transformation that will be
performed. For acA2500-14gc cameras, RGB to RGB is the only setting available.
The second parameter associated with matrix color transformation is the Color Transformation
Mode parameter. The following settings are available for this parameter:
Off - No RGB to RGB conversion will be performed. The pixel values will pass through the
matrix color transformation step with no alteration to the pixel values.
Daylight6500K - This setting will automatically populate the matrix with a pre-selected set of
values that will make appropriate corrections for images captured with daylight lighting.
Custom - The user can set the values in the matrix as desired.
In almost all cases, selecting one of the settings that populates the matrix with pre-selected values
will give you excellent results with regard to correcting the colors for the light source you are using.
The custom setting should only be used by someone who is thoroughly familiar with matrix color
transformations. Instructions for using the custom setting appear in the next section.
Setting Matrix Transformation
You can set the Color Transformation Selector and Color Transformation Mode parameters from
within your application software by using the Basler pylon API. The following code snippet illustrates
using the API to set the parameter values:
// Select the color transformation type (on an scA750-30gc)
Camera.ColorTransformationSelector.SetValue
( ColorTransformationSelector_YUVtoRGB );
// Select the color transformation mode
Camera.ColorTransformationMode.SetValue
( ColorTransformationMode_Daylight6500K );
// Select the color transformation type (on an scA2500-14gc)
Camera.ColorTransformationSelector.SetValue
( ColorTransformationSelector_RGBtoRGB );
// Select the color transformation mode
Camera.ColorTransformationMode.SetValue
( ColorTransformationMode_Daylight6500K );
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 on page 27.