User`s manual
Color Creation and Enhancement AW00098504000
136 Basler ace Camera Link
8.3.3 Matrix Color Transformation
The main objective of matrix color transformation is 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.
With the matrix color transformation, a first matrix transforrmation step ensures that the pixel values
form the sensor are available in RGB color space, i.e. as R, G, or B component for each pixel. A
second transformation step takes account of the specific pre-selected light source. The vector
consisting of the R, G, or B component for each pixel in the image is multiplied by a matrix containing
a set of correction values.
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 ace Camera Link cameras, RGB to RGB is the only setting available. This setting
simply means that the camera will not transform the red, green, and blue pixel values from the
sensor into a different color space (such as YUV).
The second parameter associated with matrix color transformation is the Light Source Selector
parameter. The following settings are available for this parameter:
Off - No alterations will be made to the pixel values.
Daylight - 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 that has a
color temperature of about 5000K.
Tungsten - This setting will automatically populate the matrix with a pre-selected set of values
that will make appropriate corrections for images captured with tungsten lighting that has a
color temperature of about 2500K to 3000K.
Daylight 6500K - 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 that has
a color temperature of about 6500K.
Custom - The user can set the values in the matrix as desired.
In almost all cases, selecting one of the settings that populate 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.
The third parameter associated with matrix color transformation is the Color Transformation Matrix
Factor parameter. This parameter determines how strong an effect the matrix correction function
will have on the colors output by the camera. The parameter setting is a floating point value that can
range from 0 to 1. When the parameter value is set to 0, matrix correction will have no effect. When
the value is set to 1, matrix correction will have its maxumum effect.
Setting Matrix Color Transformation Using Basler Pylon
You can set the Color Transformation Selector and Light Source Selector 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