Color Creation and Enhancement AW00011916000
192 Basler scout GigE
Color Adjustment Parameters
The initial parameter that you must consider when working with the color adjustment feature is the
Processed Raw Enable parameter. If you are working with a camera that is set to output pixel data
in one of the Bayer formats, then the Processed Raw Enabled parameter must be set to "enabled"
if you want to use color enhancement. The camera will then be able to perform color enhancements
on the raw RGB data from the sensor and still be able to output the pixel data in one of the Bayer
formats. If the camera is set for one of the Bayer formats pixel data output formats and the
Processed Raw Enable parameter is not set to enabled, the matrix color transformation feature and
the color adjustment feature will have no effect on the camera operation.
The Processed Raw Enable parameter is not relevant if the camera is set to a color pixel data output
format other than a Bayer format, e.g. to a YUV output format.
You can enable or disable the color adjustment feature by setting the value of the Color Adjustment
Enable parameter to true or false.
You can use the Color Adjustment Selector parameter to select a color to adjust. The colors you
can select are: red, yellow, green, cyan, blue, and magenta.
You can use the Color Adjustment Hue parameter to set the hue for the selected color as a floating
point value in a range from -4.0 to +3.96875.
As an alternative, you can use the Color Adjustment Hue Raw parameter to set the hue as an
integer value on a scale ranging from -128 to +127. This integer range maps linearly to the floating
point range with -256 being equivalent to -4.0, +32 being equivalent to +1.0, and +255 being
equivalent to +3.96875.
.
You can use the Color Adjustment Saturation parameter to set the saturation for the selected color
as a floating point value in a range from 0.0 to +1.99219.
As an alternative, you can use the Color Adjustment Saturation Raw parameter to set the saturation
as an integer value on a scale ranging from 0 to 255. This integer range maps linearly to the floating
point range with 0 being equivalent to 0.0, +128 being equivalent to +1.0, and +255 being equivalent
to +1.99219.
Enabling and Setting Color Adjustment
You can set the Processed Raw Enable, Color Adjustment Enable, Color Adjustment Selector,
Color Adjustment Hue, Color Adjustment Hue Raw, Color Adjustment Saturation, and Color
Adjustment Saturation Raw parameter values from within your application software by using the
Basler pylon API. In this example, we assume that you want to set your camera for Bayer BG 8
output, and therefore you must set the Processed Raw Enable parameter value to enabled.
The following code snippet illustrates using the API to set the parameter values:
// Set the camera for Bayer BG8 pixel data output format
Camera.PixelFormat.SetValue( PixelFormat_BayerBG8 );
// Because the camera is set for a Bayer output format, the Processed Raw
// Enabled parameter must be set to enabled
Camera.ProcessedRawEnable.SetValue( true );