User`s manual

Color Creation and Enhancement
Basler ace Camera Link 135
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
Camera.ColorTransformationSelector.SetValue
( ColorTransformationSelector_RGBtoRGB );
// Set the light source selector so that no correction will be done
Camera.LightSourceSelector.SetValue
( LightSourceSelector_Off );
// Set the light source selector for daylight (at about 5000K)
Camera.LightSourceSelector.SetValue
( LightSourceSelector_Daylight );
// Set the light source selector for tungsten lighting
Camera.LightSourceSelector.SetValue
( LightSourceSelector_Tungsten );
// Set the light source selector for daylight (at about 6500K)
Camera.LightSourceSelector.SetValue
( LightSourceSelector_Daylight6500K );
// Set the matrix correction factor
Camera.ColorTransformationMatrixFactor.SetValue( 0.50 );
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 17.
Setting Matrix Color Transformation Using Direct Register Access
To set matrix color transformation via direct register access:
Set the value of the Light Source Selector register to Off, Daylight, Tungsten, Daylight 6500K,
or Custom as desired.
Set the value of the Color Matrix Factor register as desired.
For more information about direct register access, see Section 3.2 on page 19.