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 as edge detection, identification, etc.

Sample Scenario

Please consider using this Step in scenes with large variations in light intensity. This Step 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

AdaptiveColorBalancer

Instruction: There is no parameters for this kind of balancer. The image balancing process is based on the RGB channels’ values of the image.
Default Value: None
Suggested Value: None

CLAHE

Instruction: This balancer is used to adjust the contrast of the image and only one parameter named ClipLimit in this balancer. When the parameter increases, the degree of contrast decreases. Otherwise, the contrast increases, which means bright zones would be birghter and dark zones would be darker.
Default Value: 4
Suggested Value: To set according to the real scenarios.

ColorBalancer

Instruction: There are parameters in this balancer, ‘Lightness’, ‘greenToRed’ and ‘blueToYellow’ included.’Lightness’ is used to adjust brightness. ‘greenToRed’ and ‘blueToYellow’ are used to adjust the dominant hue of the image. When the parameters increase, images would obviously tend to be red or yellow.
Default Value: Lightness=0;greenToRed=0;blueToYellow=0
Suggested Value: To set according to the real scenarios.

GammaCorrection

Instruction: This balancer is used to adjust the contrast of the image and only one parameter in this balancer. When the parameter increases, the degree of contrast decreases. Only few pixels would be displayed if this value is set to 0.
Default Value: 1
Suggested Value: To set according to the real scenarios.

Illumination Normalization

There are three kinds of methods and one common parameter included in this kind of balancer.

The method and the meanIllumination could be set in the branch named ‘common setting’. When meanIllumination increases, image would be brighter, which is usually used to process images taken in low light situations.

common setting

meanillumination

Instruction: This parameter is used to adjust the mean value of illumination and valid for all the three following methods.
Default Value: 100
Suggested Value: To set according to the real scenarios.

method

Instruction: This parameter is used to determine which kind of method is performed in this balancer. Three methods are BgAdjust, Retinex_SSR and Retinex_MSR. | Default Value: BgAdjust | Suggested Value: To set according to the real scenarios.

BgAdjust Setting

Instruction: The method focuses on the processing of ROI(region of interrest) and there are four parameters. ‘X’ and ‘Y’ determine the starting coordinate of ROI. ‘Width’ and ‘Height’ determine the size(width and height) of the ROI. | Default Value:X=30,Y=700,Width=200, Height=200 | Suggested Value: To set according to the real scenarios.

Retinex SSR setting

Instruction: ‘KernelSize’ represent the size of Gauss kernel and only can be odd number. The edges of objects in the image would be more obvious when this value increases.
Default Value:kernelSize=21
Suggested Value: To set according to the real scenarios.

Retinex MSR setting

Instruction:This method combines three kinds of Gauss kernel with different kernelsize to process the given image. Adjusting sizes of three kernels could bring images with different edge effects. Usually, Retinex MSR method could obtain more egde information than Retinex SSR.
Default Value:kernelSizeSmall=15;kernelSizeMedium=81;kernelSizeLarge=201
Suggested Value:To set according to the real scenarios.