User`s manual
AW00098504000 Color Creation and Enhancement
Basler ace Camera Link 139
Setting Custom Matrix Values Using Basler Pylon
You can set the Color Transformation Value Selector, Color Transformation Value, and Color
Transformation Value Raw parameters 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.
// Set the light source selector for custom
Camera.LightSourceSelector.SetValue ( LightSourceSelector_Custom );
// 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( 2.11 );
// Select a position in the matrix
Camera.ColorTransformationValueSelector.SetValue
( ColorTransformationValueSelector_Gain12 );
// Set the value for the selected position as an integer value
Camera.ColorTransformationValueRaw.SetValue( 135 );
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 19.
Setting Custom Matrix Values Using Direct Register Access
To set Gain XY values in the matrix via direct register access:
Set the value of the Light Source Selector register to Custom.
Set the value of the following registers as desired:
Color Matrix RGB 2 RGB 00
Color Matrix RGB 2 RGB 01
Color Matrix RGB 2 RGB 02
Color Matrix RGB 2 RGB 10
Color Matrix RGB 2 RGB 11
Color Matrix RGB 2 RGB 12
Color Matrix RGB 2 RGB 20
Color Matrix RGB 2 RGB 21
Color Matrix RGB 2 RGB 22
For more information about direct register access, see Section 3.2 on page 21.