# GS-AGC: An Adaptive Glare Suppression Algorithm Based on Regional Brightness Perception
## 3 An Adaptive Glare Suppression ALGORITHM Based on Regional Brightness Perception
### Gs-Agc  
In this paper, the proposed algorithm is based on the regional brightness perception function and utilizes the exploits the nonlinear characteristics of the Gamma correction algorithm. Instead of employing region segmentation, the algorithm suggests controlling the change in image brightness data by identifying different brightness regions based on the perceived brightness results of various types of regions. This is achieved through adaptive adjustment using the brightness threshold parameter \(\tau_{\rm f}\). By doing so, the algorithm enables the adaptive adjustment of image brightness without relying on traditional region segmentation methods. The detail information of the light and dark light regions was enhanced in this paper by extracting the brightness information of the image through the corresponding grayscale map I\({}_{\rm gray}\) of the original image. Additionally, the algorithm expressed the brightness of the glare region that needed to be suppressed through the attention map Reg(I\({}_{\rm gray}\)), where the white portion represents the regions that need to be suppressed, while the blue portion represents the regions that need to be enhanced. Afterwards, the luminance information presented in the attention map Reg(I\({}_{\rm gray}\)) was integrated into the layer decomposition result of the algorithm by utilizing an iterative method to select the multi-level transition luminance threshold parameter. Additionally, a better visual processing effect for low-illumination images was achieved by processing the pixel luminance of different regions. It is important to note that the processing flow of this paper remained the same for both single and multiple light sources. In order to illustrate the detailed processing of GS-AGC, Figure 4 below showcases the layer decomposition results of the algorithm in the scenarios of both single and multiple light sources. In order to address the issue of uneven illumination caused by multiple light sources, in this paper, the brightness region of the image was divided into four parts based on  
Figure 4: Layer decomposition result of the algorithm. the perceived brightness. The specific process involved traversing the overall grayscale image, starting from the grayscale value that corresponded to the brightness of the first pixel in each row, and ending at the grayscale value that corresponded to the brightness of the last pixel in each column. The GS-AGC algorithm was then applied to perform the necessary processing in different brightness regions. As a result, the algorithm enhanced the brightness in dark light regions and suppressed the brightness in glare regions, thereby improving the overall illumination uniformity of the image. The core algorithm of this paper primarily comprised four parts:  
\[G=G_{dark}^{R_{1}}(\tau_{1},\tau_{t2},\tau_{t3})+G_{glare}^{R_{2}}(\tau_{t2}, \tau_{t3},\tau_{t4})+G_{halo}^{R_{3}}(\tau_{t2},\tau_{t3},\tau_{t4})+G_{other} \tag{7}\]  
In the formula, \(R_{1}\), \(R_{2}\), and \(R_{3}\) are pre-defined parameters that are constants. The values for these parameters are set as follows: \(R_{1}=2\), \(R_{2}=3\), and \(R_{3}=3\). These parameters represent the power to which the corresponding expressions are raised. Specifically, the \(G_{\text{dark}}\) expression is raised to the second power, the \(G_{\text{glare}}\) expression is raised to the third power, and the \(G_{\text{halo}}\) expression is raised to the third power. The \(G_{\text{other}}\) expression has a function value of 1, indicating that it does not directly modify image brightness, and therefore, no parameter value is assigned to it. It was revealed from the experiments that the parameter mentioned above can drastically enhance the image processing result. Specifically, the image processing result remained unchanged once the value of parameter \(R\) exceeded 5.