You are here: Technical Reference > Color Transformation Control
FLIR

Blackfly®S

BFS-U3-63S4-BD

 

Color Transformation Control

NOTE: To access color transformation controls, ISP must be enabled. The ISP enable feature is under the Image Format control (IspEnable). Color transformation is only available on standard color models. It is not available on polarized color models.

A color transformation is a linear operation applied to input red, green, and blue values for each pixel, which are multiplied by a 3x3 matrix and then added to an offset triplet.

The equation, taking input RGB values and producing three output channels (C0, C1 and C2) is given by:

Color Transformation Matrix Equation

There are two available color transformations, RGB to RGB and RGB to YUV.

The RGB to RGB transform takes input in the camera's native RGB color space, which varies based on the properties of the camera and sensor. The RGB to RGB transform is usually used to convert from the camera's native color space to sRGB (standard RGB) color space. This operation is often called a Color Correction Matrix (CCM).

The RGB to RGB transform can be enabled/disabled. Select RGB to RGB with Color Transformation Selector and then set Color Transformation Enable to 0 (disabled) or 1 (enabled).

Use the RGB Transform Light Source to select the active RGB to RGB matrix from a set of pre-calibrated matricies optimized for different lighting conditions.

To set your own RGB to RGB matrix, select Custom RGB Transform Light Source, and then use the features Color Transformation Value Selector and Color Transformation Value to set the Gain/Offset coefficients.

The RGB to YUV transform happens after the RGBtoRGB transform and after applying Gamma. It is only available for YUV or YCbCr pixel formats, and it cannot be enabled or disabled, except by changing Pixel Format.

For both RGB to RGB and RGB to YUV, the gain/offset values used can be queried by selecting a value with Color Transformation Value Selector and then reading its Color Transformation Value.

In addition to the RGB to RGB transform, the color of the image can also be adjusted with the Saturation control, when Saturation Enable is set to 1. Increasing Saturation makes the colors in the image more vivid.

Summary Table

Name Interface Access Visibility Description
Color Transformation Selector IEnumeration Beginner Selects which Color Transformation module is controlled by the various Color Transformation features
Color Transformation Enable [Color Transformation Selector] IBoolean Beginner Enables/disables the color transform selected with ColorTransformationSelector. For RGB to YUV this is read-only. Enabling/disabling RGB to YUV can only be done by changing pixel format.
Color Transformation Value Selector [Color Transformation Selector] IEnumeration Selects the Gain factor or Offset of the Transformation matrix to access in the selected Color Transformation module
Color Transformation Value [Color Transformation Selector] [Color Transformation Value Selector] IFloat Represents the value of the selected Gain factor or Offset inside the Transformation matrix in floating point precision.
RGB Transform Light Source IEnumeration Expert Used to select from a set of RGBtoRGB transform matricies calibrated for different light sources. Selecting a value also sets the white balance ratios (BalanceRatioRed and BalanceRatioBlue), but those can be overwritten through manual or auto white balance.
Saturation Enable IBoolean Beginner Enables/disables Saturation adjustment.
Saturation IFloat Beginner Controls the color saturation.

Color Transformation Control Features


Color Transformation Selector

Selects which Color Transformation module is controlled by the various Color Transformation features

Property Value
Name ColorTransformationSelector
Interface IEnumeration
Access
Visibility Beginner

Enumeration Values
RGBtoRGB
RGBtoYUV

Color Transformation Enable

Enables/disables the color transform selected with ColorTransformationSelector. For RGB to YUV this is read-only. Enabling/disabling RGB to YUV can only be done by changing pixel format.

Property Value
Name ColorTransformationEnable [Color Transformation Selector]
Interface IBoolean
Access
Visibility Beginner

Color Transformation Value Selector

Selects the Gain factor or Offset of the Transformation matrix to access in the selected Color Transformation module

Property Value
Name ColorTransformationValueSelector [Color Transformation Selector]
Interface IEnumeration
Access
Visibility

Enumeration Values
Gain00
Gain01
Gain02
Gain10
Gain11
Gain12
Gain20
Gain21
Gain22
Offset0
Offset1
Offset2

Color Transformation Value

Represents the value of the selected Gain factor or Offset inside the Transformation matrix in floating point precision.

Property Value
Name ColorTransformationValue [Color Transformation Selector] [Color Transformation Value Selector]
Interface IFloat
Access
Unit
Visibility

RGB Transform Light Source

Used to select from a set of RGBtoRGB transform matricies calibrated for different light sources. Selecting a value also sets the white balance ratios (BalanceRatioRed and BalanceRatioBlue), but those can be overwritten through manual or auto white balance.

Property Value
Name RgbTransformLightSource
Interface IEnumeration
Access
Visibility Expert

Enumeration Values
General
Tungsten2800K
WarmFluorescent3000K
CoolFluorescent4000K
Daylight5000K
Cloudy6500K
Shade8000K
Custom

Saturation Enable

Enables/disables Saturation adjustment.

Property Value
Name SaturationEnable
Interface IBoolean
Access
Visibility Beginner

Saturation

Controls the color saturation.

Property Value
Name Saturation
Interface IFloat
Access
Unit
Visibility Beginner

 

12/9/2019
© 2015-2019 FLIR® Integrated Imaging Solutions Inc.
All rights reserved.
Legal
| Contact Support

Blackfly®S BFS-U3-63S4-BD
Camera Reference