Operator WhiteBalance

The operator WhiteBalance scales the three color components of an RGB 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.

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 [3, 63] 3*(InputBitWidth/3 + RangeBits) <= 64
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_COLOR as I
Color Flavor FL_RGB as I
Max. Img Width any as I
Max. Img Height any as I

Parameters

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 WhiteBalance is shown in the following examples: