Image Brightness and Color Balancer

Function

This Step utilizes different algorithms to process images. It is mainly used to adjust the contrast of images and also used to adjust the color balance, which facilitates further processing such as edge detection, identification, etc.

Usage Scenario

This Step is used in scenes with large variations in light intensity. It performs a balancing operation on the image, so that the brightness or color of the image is within an appropriate range to facilitate subsequent processing.

Input and Output

../../../../../_images/4_image_brightness_and_color_balancer.png

Parameters

The following five types of balancers are available, each requires different parameter settings:

AdaptiveColorBalancer

This balancer performs a balancing operation based on the RGB channels’ values of the image, while its effect on grayscale images is not obvious.

There are no parameters for this kind of balancer.

CLAHE

The default balancer is CLAHE.

Clip Limit
Instruction: This parameter is used to adjust the color balance. When the value is increased, the balancing effect is more obvious, and the degree of contrast decreases.
Default Value: 4

ColorBalancer

Lightness
Instruction: This parameter is used to adjust the lightness of the image. When the value is increased, the image will be brighter.
Default Value: 0
Green to Red
Instruction: This parameter is used to adjust the color of the image. When the value is increased, the image will tend to be reddish.
Default Value: 0
Blue to Yellow
Instruction: This parameter is used to adjust the color of the image. When the value is increased, the image will tend to be yellowish.
Default Value: 0

GammaCorrection

Gamma
Instruction: When the value is increased, the degree of contrast decreases. Only a few pixels will be displayed if this value is set to 0.
Default Value: 1.00

Illumination Normalization

There are three kinds of methods in Illumination Normalization, and the parameters of each method are different.

Retinex_SSR

Gaussian Kernel Settings

Kernel Size
Instruction: This parameter is used to set the Gaussian kernel size, and the value can only be an odd number. When the value is increased, the edge of objects in the image will be more obvious.
Default Value: 21
Suggested Value: Please set according to the actual scenario.

General Settings

Mean Illumination
Instruction: This parameter is used to adjust the mean value of illumination. When the value is increased, the image will be brighter, and is suitable for processing images acquired under darker lighting conditions.
Default Value: 100
Suggested Value: Please set according to the actual scenario.

Retinex_MSR

Gaussian Kernel Settings

This method combines three kinds of Gaussian kernel with different kernel sizes to process the given image. Adjusting the sizes of three kernels could bring images with different edge effects. Usually, the Retinex MSR method could obtain more edge information than Retinex SSR.

Small/Medium/Large Kernel Size
Instruction: This parameter is used to set the Gaussian kernel size, and the value can only be an odd number. When the value is increased, the edge of objects in the image will be more obvious.
Default Value of Small Size: 15
Default Value of Medium Size: 81
Default Value of Large Size: 201
Suggested Value: Please set according to the actual scenario.

General Settings

Mean Illumination
Instruction: This parameter is used to adjust the mean value of illumination. When the value is increased, the image will be brighter, and is suitable for processing images acquired under darker lighting conditions.
Default Value: 100
Suggested Value: Please set according to the actual scenario.

BgAdjust

Background Adjustment Settings

ROI

Hint

The coordinate of the upper left corner of the original image is (0, 0).

X
Instruction: This parameter refers to the X coordinate of the ROI’s upper left vertex.
Default Value: 30
Y
Instruction: This parameter refers to the Y coordinate of the ROI’s upper left vertex.
Default Value: 700
Width
Instruction: This parameter refers to the width of the ROI.
Default Value: 200
Height
Instruction: This parameter refers to the height of the ROI.
Default Value: 200

General Settings

Mean Illumination
Instruction: This parameter is used to adjust the mean value of illumination. When the value is increased, the image will be brighter, and is suitable for processing images acquired under darker lighting conditions.
Default Value: 100
Suggested Value: Please set according to the actual scenario.