EasyManua.ls Logo

Basler acA2040-55 - Page 301

Basler acA2040-55
373 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AW00123409000 Features
Basler ace USB 3.0 291
The Color Transformation Matrix
The color transformation feature processes red, green, and blue pixel data made available for each
pixel (Section 7.14.3 on page 278) and uses a transformation matrix to deliver modified red, green,
and blue pixel data for each pixel.
The RGB to RGB color matrix transformation for each pixel is performed by premultiplying a 3 x 1
matrix containing R, G, and B pixel values, by a 3 x 3 matrix containing color transformation values
that modify color-specific gain.
You can set each color transformation value according to your choice. Each GainXY position can
be populated with a floating point value ranging from -8.0 to +7.96875 by using the Color
Transformation Value Selector to select one of the GainXY positions in the matrix and using the
Color Transformation Value parameter to enter a value for that position and thereby replace the
previous value.
A reference article that explains the basics of color matrix transformation for image data can be
found at: http://www.its.bldrdoc.gov/publications/2437.aspx
Setting Color Transformation Matrix Values
You can set the Color Transformation Value Selector and Color Transformation Values from within
your application software by using the Basler pylon API. The following code snippet illustrates using
the API to set the values in the matrix. Note that the values in this example are just randomly
selected numbers and do not represent values that you should actually use.
// Select a position in the matrix
camera.ColorTransformationValueSelector.SetValue(ColorTransformationValueSelector_Gain00);
// Set the value for the selected position as a floating point value
camera.ColorTransformationValue.SetValue(1.5625);
// Select a position in the matrix
camera.ColorTransformationValueSelector.SetValue(ColorTransformationValueSelector_Gain01);
// Set the value for the selected position as a floating point value
camera.ColorTransformationValue.SetValue(-0.4375);
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 page 61.
When setting the transformation values, you will find that the transformation matrix
is already populated with color transformation values. They correspond to unit
vectors and may be related to previously set light source presets or result from a
previous application of the color transformation feature.
Gain00 Gain01 Gain02
Gain10 Gain11 Gain12
Gain20 Gain21 Gain22
R
G
B
R
G
B
=

Table of Contents

Related product manuals