# GS-AGC: An Adaptive Glare Suppression Algorithm Based on Regional Brightness Perception
## 3 An Adaptive Glare Suppression ALGORITHM Based on Regional Brightness Perception  
### Regional Brightness Perception  
The shortcomings of commonly used low-illumination image enhancement methods are still observed, such as the inability of traditional algorithms to effectively solve the problem of uneven brightness. Additionally, the contextual information of the image cannot be fully considered by deep learning-based algorithms [36; 37; 38], leading to the inability to establish pixel dependencies. This defect makes it difficult to resolve the problem of uneven illumination in each local region. To address these problems, our method of regional luminance perception is proposed, aiming to solve the problem of uneven luminance generated by local regions, accurately divide regional luminance, and eliminate the influence of the division of luminance range on the suppression effect of the algorithm. While the image segmentation algorithm [3] is capable of dividing image's brightness, it fails to fully consider the contextual information of the image. Additionally, a separate algorithm is needed to smooth the region boundaries. This becomes particularly challenging in real-life situations with complex backgrounds, where multiple light sources are present and need to be accurately taken into account for proper brightness region division. Although the JinY algorithm [18] demonstrates good performance in dealing with halo light, it does not explicitly differentiate between a single light source and multiple light sources, as illustrated in Figure 1 below. Obviously, it is evident that the JinY algorithm's performance is not as effective in suppressing only multiple light sources, as our approach exceled in this particular task. In view of a multi-light source and a single light source under a complex background, we proposed to divide the brightness region into the dark light region, halo region, glare region, and other regions. The range of pixel brightness of the halo, glare, and dark light regions of an image is shown in Figure 2 below, where Figure 2a,e are the original frame of the image, Figure 2b,f are the glare region of the image, Figure 2c,g are the glare region plus the halo region of the image, and Figure 2d,h are the visual representation of the division of the halo, glare, and dark light regions of the image. In the case of a single light source in a relatively dark background, the object's brightness and contrast are more prominent, making details such as its shape and texture easier to observe and recognize. However, with multiple light sources, complex reflection effects may occur, making object recognition more challenging. To address this issue, we leveraged the powerful adaptability of region luminance perception to maintain object perception in different luminance environments, enabling recognition in a variety of lighting conditions. The convenience of region brightness perception in dividing image brightness was fully presented by exclusively applying the suppression algorithm to suppress the original frames of both single and multiple light sources in the image, as depicted in Figure 3--the complex light source suppression effect--where Figure 3a,c represent the original frame of the image and Figure 3b,d represent the resultant image suppression frame. Figure 1: Comparison of the suppression effect of a single light source and multiple light sources, and its local magnification diagrams. Figure 3: Complex light source suppression effect: (**a**) single-source original image; (**b**) single light source suppression frames; (**c**) multi-source original image; (**d**) multiple light source suppression frames. Figure 2: Brightness region division range: (**a**) single-source original image; (**b**) glare regions; (**c**) glare + halo regions; (**d**) single-source region segmentation; (**e**) multi-source original image; (**f**) glare regions; (**g**) glare + halo regions; (**h**) multi-source region segmentation.