Operator WhiteBalanceBayer

Operator Library: Color

The operator WhiteBalanceBayer scales the three color components of a Bayer input stream using three independent coefficients. One usage of the operator is manual white balancing. Each color component is scaled with the values defined by parameter RedCoefficient, GreenCoefficient and BlueCoefficient. The range and precision of the multiplication is defines using parameters ResolutionBits and RangeBits. RangeBits defines the scaling range. The range is [0, 2^RangeBits[. ResolutionBits defines the step size of the scaling which is . The results are rounded to the next integer values and output on output link O.

The Bayer array configuration of the camera must match the operator settings. The operator setting is changed using parameter BayerInit.

I/O Properties

Property Value
Operator Type O
Input Link I, image data input
Output Link O, image data input

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 16] InputBitWidth + RangeBits
Arithmetic unsigned as I
Parallelism any as I
Kernel Columns 1 as I
Kernel Rows 1 as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I
Color Format VAF_GRAY as I
Color Flavor FL_NONE as I
Max. Img Width any as I
Max. Img Height any as I

Parameters

BayerInit
Type dynamic/static read/write parameter
Default GreenFollowedByRed
Range {GreenFollowedByRed, GreenFollowedByBlue, RedFollowedByGreen, BlueFollowedByGreen}

The Bayer array configuration of the camera must match the operator settings.

ResolutionBits
Type static parameter
Default 8
Range [1, 16]

This parameter defines the precision of the multiplication i.e. the step size of the coefficient parameters.

RangeBits
Type static parameter
Default 2
Range [1, 8]

This parameter defines the range of the multiplication. This parameter influences the output bit width. The output bit width must not exceed 64 Bit.

RedCoefficient
Type dynamic/static read/write parameter
Default 1
Range

This parameter defines the coefficient which scales the red component of the input. The entered floating point coefficient is rounded to the nearest valid fixed point value (see RangeBits and ResolutionBits).

GreenCoefficient
Type dynamic/static read/write parameter
Default 1
Range

This parameter defines the coefficient which scales the green component of the input. The entered floating point coefficient is rounded to the nearest valid fixed point value (see RangeBits and ResolutionBits).

BlueCoefficient
Type dynamic/static read/write parameter
Default 1
Range

This parameter defines the coefficient which scales the blue component of the input. The entered floating point coefficient is rounded to the nearest valid fixed point value (see RangeBits and ResolutionBits).

Examples of Use

The use of operator WhiteBalanceBayer is shown in the following examples: