# 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
This dataset encompasses a variety of environments, ranging from city streets to highways and country roads, and involves numerous weather conditions and driving scenarios. As a result, it provides a comprehensive database for autonomous driving perception information and meets our requirements for low-light and glare scenes. Furthermore, we utilized the LLVIP public dataset to evaluate the algorithm's performance. #### 4.1.2 Simulation Experiment Environment

PC: HP OMEN 8P; operating system: Windows 11 Home Chinese Edition; configuration: 12 th Generation Intel(r) i7-12700H processor, NVIDIA GeForce RTX 3070 Ti, 16 GB + 512 GB; development languages: Python, an object-oriented dynamic programming language, and C, a process-oriented dynamic programming language; development tools: PyCharm editor from JetBrains, Vivado Design Suite, an integrated design environment released by Xilinx. ### Hardware Experimental Verification

The glare suppression system in this paper utilized a Xilinx Zynq-7020 (XC7Z020-1 CLG400C) model development board, which belongs to a family of SoCs featuring a 650 MHz dual-core ARM Cortex-A9 processor and an FPGA architecture. The board incorporates 13,300 logic slices internally, where each slice consists of four six-input LUTs and eight flip-flops. Additionally, it is equipped with 630 KB of fast block RAM, 220 DSP Slices, and an integrated memory controller hardcore. These integrated features provide the benefits of parallel hardware execution, hardware-accelerated algorithms, low-latency control, and development flexibility. To validate the effectiveness of the GS-AGC algorithm in enhancing dark light images and suppressing glare, an experimental environment is established using a USB interface. Leveraging the strong data processing capability of FPGAs, the algorithm took advantage of their parallel computing and pipelining processing characteristics, where pipelining allows for the execution of program instructions in parallel. For instance, executing data caching simultaneously with processing can significantly reduce algorithm computation time compared to that when using serial processing in software implementation. This showcases the advantages of our hardware design solution in terms of real-time performance, power consumption, and overall performance when compared to other general-purposeplatform algorithms. Moreover, in resource-constrained scenarios, the GS-AGC algorithm is more easily portable compared to the complex networking requirements of other solutions. It requires fewer FPGA resources, and its image processing capability meets the usage requirements of most projects. ### Experimental Results

A comparison of this paper's method GS-AGC algorithm with other methods, such as Adaptive Gamma Correction (AGC) [21], Unsupervised Night Image Enhancement (Jin Y) [18], Zero-reference low-light enhancement (Zero-DCE) [20], HWMNet [43], and some other representative methods, was done through test images of two datasets. Then, the experimental results were evaluated globally and locally in terms of quality to test the glare suppression performance and dark light enhancement performance of the algorithms in this paper. #### 4.3.1 Global Image Quality Evaluation

For global image quality evaluation, the processed images were evaluated using image quality assessment metrics such as PSNR, entropy, VIF, and MSE, as shown in Tables 1 and 2. Among them, we used the Peak Signal Noise Ratio (PSNR) from the perspective of image perspective distortion. A larger PSNR value indicates that the distortion between the image to be evaluated and the reference image is smaller and the image quality is better. From the perspective of information theory, entropy is used to reflect the richness of image information: the larger the entropy of image information, the richer the information and the better the quality. Visual Information Transfer Rate (VIF) and Mean Square Error (MSE) are used for clarity and detail information of the image itself.