Adaptive Gamma Correction Glare Suppression Method Based on Regional Brightness Perception

Through the adaptive Gamma correction method based on regional brightness perception, the brightness uneven problem in low-illumination images is solved, glare suppression and dark light enhancement are achieved, and it is suitable for the FPGA platform, simplifying algorithm construction and reducing computational complexity, and meeting the real-time processing needs.

CN116645291BActive Publication Date: 2025-08-29XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310647385.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-02
Publication Date
2025-08-29
Estimated Expiration
2043-06-02

AI Technical Summary

Technical Problem

The existing low-illumination image enhancement algorithm cannot effectively solve the problem of uneven brightness, resulting in excessive enhancement of glare areas, and the algorithm is highly complex and difficult to apply to embedded devices.

Method used

Adaptive Gamma correction method based on area brightness perception is adopted. By dividing dark light, halo, glare and other areas, the Gamma values ​​of each area are adjusted to achieve adaptive correction. Combining the FPGA platform and image processing framework, image processing is used to use the AXI4Stream protocol.

Benefits of technology

On the premise of ensuring that the details of the picture are not lost, glare is effectively suppressed and dark areas are enhanced, real-time processing of low-illumination images is realized, algorithm construction is simplified, computational complexity is reduced, and image hierarchy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116645291B_ABST
    Figure CN116645291B_ABST
Patent Text Reader

Abstract

This paper proposes an adaptive gamma correction glare suppression algorithm based on regional brightness perception. This algorithm comprehensively considers the human eye's indirect perception of brightness and processes images at different brightness levels. Quantitative and qualitative experimental evaluations on real images demonstrate that the proposed method outperforms other comparative methods. The algorithm not only effectively suppresses the brightness of image glare areas but also effectively enhances the brightness of dark areas. It can also be easily accelerated using embedded hardware FPGAs, improving the real-time performance of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to an adaptive gamma correction glare suppression method based on regional brightness perception. Background Art

[0002] Commonly used low-light image enhancement methods still have many shortcomings. For example, traditional algorithms cannot effectively address uneven brightness. Deep learning-based algorithms cannot fully consider the image context due to their inability to establish dependencies between pixels. This deficiency makes it difficult to address uneven illumination in local areas.

[0003] Existing low-light image enhancement algorithms mainly target low-light areas, resulting in excessive enhancement of glare areas. In addition, the algorithm is highly complex and difficult to apply to embedded devices. Summary of the Invention

[0004] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide an adaptive gamma correction glare suppression method based on regional brightness perception to solve the problem of uneven brightness caused by local areas, improve the accuracy of regional brightness division, and eliminate the influence of brightness range division on the suppression effect.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] A method for suppressing glare by adaptive gamma correction based on regional brightness perception, characterized by comprising the following steps:

[0007] Step 1: Get the grayscale image I of the input image I gray , the input image I is a low-illumination image;

[0008] Step 2: Calculate the grayscale image I gray The brightness threshold τ t , the brightness area of ​​the input image I is divided into dark area, halo area, glare area and other areas;

[0009] Step 3: Adjust the pixels in the dark area of ​​the image, stretching it from a dark scene to a medium-bright scene, so that the gamma values ​​corresponding to the dark area are all less than 1;

[0010] Step 4: Adjust the pixels in the halo area of ​​the image, reducing it from a high-brightness scene to a medium-brightness scene, so that the gamma values ​​corresponding to the halo area are all greater than 1;

[0011] Step 5: Adjust the pixels in the glare area of ​​the image, reducing them from a high-brightness scene to a medium-brightness scene, so that the gamma values ​​corresponding to the glare area are all greater than 1;

[0012] Step 6: Adjust the pixels in the remaining areas of the image so that the brightness of the remaining areas remains unchanged;

[0013] Step 7: Output the overall processed image.

[0014] The present invention provides an image processing framework on an FPGA platform for implementing the adaptive gamma correction glare suppression method based on regional brightness perception, comprising two USB decoders, two DMA controllers and an image enhancement glare suppression IP core. The entire image processing framework uses the AXI4Stream protocol; the image enhancement glare suppression IP core implements the method; USB decoder 1 is used to input a low-illumination image img and its corresponding grayscale image img_gray; DMA controller 1 is used to transmit memory data of the low-illumination image img and its corresponding grayscale image img_gray; DMA controller 2 is used to transmit memory data of a result image processed by the image enhancement glare suppression IP core; and USB decoder 2 is used to output the result image to a PC.

[0015] The present invention also provides an FPGA accelerator for implementing the adaptive gamma correction glare suppression method based on regional brightness perception, comprising:

[0016] Processing system to implement memory access and control tasks;

[0017] The FPGA acceleration core system adopts the image enhancement glare suppression IP core to realize the acceleration task of the method, including: a memory access module, a parameter cache module and a Gamma_trans image processing module.

[0018] In one embodiment, the processing system consists of an ARM CPU core and external memory.

[0019] In one embodiment, the memory access module reads the low-light image and the corresponding grayscale image data from the external storage and caches them in the parameter cache module; the parameter cache module is composed of a block random access memory located on the chip and caches the results processed by the Gamma_trans image processing module; the Gamma_trans image processing module evaluates the brightness of the pixels in the image and the brightness of the pixels in the surrounding area, performs nonlinear operations on the image, and obtains an overall enhanced and regionally suppressed image.

[0020] In one embodiment, the FPGA accelerator uses pipeline operation to enable image data to be cached and processed simultaneously within the FPGA.

[0021] Compared with the existing technology, the present invention proposes a glare suppression algorithm that uses the indirect perception of brightness by the human eye to perform regional adaptive gamma correction. Compared with the more complex implementation of regional segmentation combined with local enhancement algorithms, or the weaker targeting of foggy night glow removal algorithms for suppressing glare areas in low-light images, as well as the limitations of various deep learning algorithms on resource-constrained embedded devices, the proposed algorithm has a significant effect on glare suppression and low-light enhancement in images while ensuring that image detail information is not lost.

[0022] Furthermore, this invention considers real-time image processing. It implements a related suppression algorithm on a Xilinx Zynq-7020 and portes it to an FPGA development board. This addresses the algorithm's inability to address glare and enhance brightness in dark areas in real-time in practical applications. Experimental results demonstrate that the algorithm achieves a 19ms execution efficiency for a 1280×720 low-light image, meeting the requirements for real-time low-light image processing. Furthermore, the algorithm is simple to construct, and the processed image exhibits a stronger sense of depth, achieving the desired positive results. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flow chart of the adaptive gamma correction algorithm based on regional brightness of the present invention.

[0024] Figure 2 Layer decomposition results of the method of the present invention

[0025] Figure 3 Schematic diagram of the image processing framework of the present invention.

[0026] Figure 4 This is a schematic diagram of the overall design framework of the FPGA accelerator of the present invention.

[0027] Figure 5 This is a schematic diagram comparing the processing effects of different algorithms on the BDD dataset. DETAILED DESCRIPTION

[0028] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.

[0029] like Figure 1 As shown in FIG, an adaptive gamma correction glare suppression method based on regional brightness perception of the present invention takes a low-light image as an input image I and specifically includes the following steps:

[0030] Step 1: Get the grayscale image I of the input image I gray .

[0031] In the present invention, the input image I is a low-light image, i.e., an RGB image. A low-light image is essentially a three-dimensional matrix. For example, I[1280,720,3] represents columns, rows, and three RGB components in color. Directly performing brightness division on the input image I requires considering the grayscale values ​​of the image in each layer of channels, which is cumbersome and therefore difficult to perform. In the present invention, it is converted into a simpler single-channel grayscale image. Since a grayscale image is essentially a two-dimensional matrix, each pixel in the image can only have one value representing the color, and the pixel value range is 0-255, making it more convenient for brightness division in the subsequent steps.

[0032] Step 2: Use grayscale image I gray , calculate its brightness threshold τ t , the brightness area of ​​the input image I is divided into dark area, halo area, glare area and other areas.

[0033] In the present invention, both brightness thresholds and image brightness region division are performed on the grayscale image. Within the image's grayscale range, the present invention uses grayscale values ​​of 0 and 255 and four brightness thresholds to divide the grayscale image's brightness region into dark, halo, glare, and other regions. In subsequent steps, corresponding gamma values ​​are determined on the grayscale image to stretch pixels in different regions. Once completed, the results of processing low-light image I using different gamma values ​​are returned to low-light image I. Visually, each of the four brightness regions of low-light image I has corresponding results.

[0034] In order to enhance the detail information of the light and dark areas, the present invention performs the grayscale image I corresponding to the input image I. gray Extract brightness information and pass it through the attention map Reg(I gray ) performance. The areas that need to be suppressed in the present invention include: glare area (white part in Reg image), halo area (slightly lighter white part in Reg image) and dark light area (blue part in Reg image). After using the iterative method to select the multi-level transition brightness threshold, the attention map Reg (I gray ) presents brightness information, and processes the pixel brightness of different areas to achieve a better visual processing effect of low-light images. The layer decomposition results of the present invention are as follows Figure 2 shown.

[0035] In terms of specific methods, although traditional image segmentation algorithms can also divide images by brightness, their methods cannot fully take into account the contextual information of the image, especially in real life with complex backgrounds, and cannot fully consider the situation of multiple light sources to accurately divide the brightness areas of the image. In the process of image processing, combining regional brightness perception can improve the defects of image segmentation algorithms. Due to the characteristics of human vision, the range of brightness perception can reach 108 cd / m 2 , and is more sensitive to changes in dark areas. Aiming at the situation of multiple light sources and single light source in complex backgrounds, the image brightness areas proposed by the present invention are: dark light area, halo area, glare area and other areas.

[0036] Among them, since the brightness of the dark area and the brightness of the glare area are opposite, in order to select the brightness that is most suitable for each area to be adjusted by the algorithm, the brightness threshold is calculated by the human eye's indirect brightness perception function R(L), and the formula is as follows:

[0037]

[0038] Where R(L) is the input grayscale image I gray The retinal responsivity of the human eye, the brightness perception function covers the full dynamic range of low-light images [R(L min )=0,R(L max )=255]. L is the brightness intensity of the original pixel in the grayscale image, and its value range is [0, 255]. k is the sensitivity parameter, which determines the speed at which the retinal responsiveness increases with the increase of brightness intensity. Since the retinal responsiveness of the human eye is determined by the background brightness adaptation, k(L) can be expressed as the following function based on the brightness perception:

[0039]

[0040] Where, CDF G (L) is the cumulative distribution function of the input histogram; p(x) represents the normalized grayscale histogram.

[0041] The pixel intensity is normalized to [0, 1], specifically:

[0042]

[0043] Where, L max The input grayscale image I gray The maximum brightness level, thus:

[0044]

[0045] Iteratively solve R(L) and use the initial space [0,50], [50,150], [150,200], [200,255] to implement the iterative process four times until the maximum number of iterations reaches 100, and then obtain the brightness threshold τ suitable for the brightness of the current area t .

[0046] Specifically, in the embodiment of the present invention, the golden section search algorithm in the one-dimensional search algorithm is used to shrink the interval, and the interval of the optimal solution is gradually reduced until the interval length is 0, and the brightness threshold τ suitable for the brightness of the current area is obtained. t .

[0047] Since the present invention divides the brightness area into four areas, the "current area" here refers to the above-mentioned dark area, halo area, glare area and the remaining other areas. To achieve this division, it is necessary to convert the grayscale image I gray The original pixel intensity is divided into four intervals. In this embodiment, the four intervals are [0,50], [50,150], [150,200], and [200,255]. In the R(L) formula, the values ​​of L are respectively these four intervals, and four brightness thresholds are calculated in turn, namely, the dark scene threshold τ t1 , medium bright scene threshold τ t2 , bright scene threshold τ t3 and τ t4 At this time, The brightness area of ​​the range is divided into dark light area, The brightness area of ​​the range is divided into halo areas, The brightness area of ​​the range is divided into the glare area, and the area excluding dark light, halo and glare is the other area, that is, Where T0 and T 255 They represent grayscale values ​​0 and 255 respectively.

[0048] In a more specific algorithm, the initial intervals [0,50], [50,150], [150,200], and [200,255] are used respectively, and the iterative calculation process is implemented four times until the maximum number of iterations is 100. The threshold τ in the brightness intervals of [0,50], [50,150], [150,200], and [200,255] can be found by only using the function value. t1 , τ t2 , τ t3 , τ t4 , with τ t1 As an example, the algorithm is described as follows:

[0049] Step 1) Set a=0 as the initial left interval and b=50 as the initial right interval.

[0050] Step 2) Calculate x1=a+0.382(ba).

[0051] Step 3) Calculate x2=a+0.618(b-a0.

[0052] Step 4) If f(x1)≤f(x2), the minimum point is at (a,x2).

[0053] Step 5) If x2-a≤0.01, update τ t1 =x1, output τ t1 .

[0054] Step 6) Otherwise b=x1, and x1=a+0.382(ba).

[0055] Step 7) If b-x1≤0.01, update τ t1 =x2, output τ t1 .

[0056] Step 8) Otherwise a=x2, and x2=a+0.618(ba).

[0057] Step 9) Repeat steps 1) to 8) above and output τ t1 .

[0058] τ t2 , τ t3 , τ t4 The derivation method is the same as that of .

[0059] Based on the regional brightness perception function, the present invention uses the nonlinear characteristics of the Gamma correction algorithm to propose that the brightness of different types of regions is perceived based on the results without regional segmentation. Instead, different brightness regions are identified and the brightness threshold τ is used to calculate the brightness of the regions. t Adaptively adjust different brightness areas to control the change of image brightness data, thereby achieving adaptive adjustment of image brightness.

[0060] Step 3: Adjust the pixels in the dark and light areas of the image.

[0061] Due to the narrow grayscale range of low-light images, the grayscale transformation is not obvious, and the spatial correlation between adjacent pixels is high. These characteristics make the details and background in the image contained in a narrow grayscale range. In order to improve the visual effect of the image in a narrow grayscale range, the grayscale range of the image is increased to a brightness range more suitable for human observation by performing nonlinear operations on the grayscale values ​​of the image. The adjustment formula is as follows:

[0062]

[0063] Where G dark represents the dark light enhancement function, τ t1 is the dark scene threshold, τ t2 is the threshold of medium-bright scene, τ t3 is the bright scene threshold, T0 is the grayscale value 0;

[0064] The above formula represents the conversion of grayscale image pixels from bright to dark scenes. By stretching the narrow grayscale range to medium-bright scenes So that the dark scene threshold τ is lower than the dark scene threshold in the dark light area t1 The Gamma values ​​corresponding to the parts are all less than 1.

[0065] Step 4: Adjust the pixels in the halo area of ​​the image.

[0066] In addition to focusing on the dark areas in the image visual area, the areas with high grayscale values ​​also need to suppress haloing to maintain the brightness of the image within the same range and retain more information. The adjustment formula for the haloing area is as follows:

[0067]

[0068] Where G halo represents the halo suppression function,

[0069] The above formula indicates that the brightness of grayscale image pixels is determined by the logτ of the highlight scene. t4 Lower to medium-bright scene The halo suppression function is used to correct the gamma values ​​in the halo area so that they are all greater than 1.

[0070] Step 5: Adjust the pixels in the glare area of ​​the image.

[0071] Glare is the primary cause of uneven image brightness distribution. In real life, glare is variable and complex, and the intense brightness it creates creates a visual burden. Therefore, suppressing glare is a core issue that needs to be addressed. Therefore, the size and number of grayscale value spans in pixel areas with glare are particularly important. The adjustment formula is as follows:

[0072]

[0073] Where G glare is the glare suppression function;

[0074] The above formula represents the brightness of the grayscale image pixels from the bright scene close to the maximum grayscale value Lower to medium-bright scene Reduce visual differences and use the glare suppression function to make the Gamma values ​​corresponding to the glare area greater than 1.

[0075] Step 6: Adjust the pixels in the remaining areas of the image. The adjustment formula is as follows:

[0076] G other =1

[0077] G other represents the brightness adjustment function of other areas. The above formula means that the brightness of other areas remains unchanged.

[0078] Step 7: Output the overall processed image. The output is:

[0079] G=G dark +G glare +G halo +G other

[0080] The specific adjustment process of the present invention is to sequentially traverse the grayscale value corresponding to the brightness of the first pixel in each row of the overall grayscale image, and then traverse to the grayscale value corresponding to the brightness of the last pixel in each column of the image. The adaptive gamma correction algorithm based on regional brightness is then used to perform corresponding processing in different brightness areas. After the processing, the image shows that the brightness of dark areas is enhanced, while the brightness of glare areas is suppressed.

[0081] The adaptive gamma correction algorithm based on regional brightness of the present invention is briefly summarized as GS-AGCGamma. It is worth noting that the suppression algorithm of the present invention can adjust the regional brightness pixels in a specific brightness area, thereby achieving the enhancement of the overall low-light image on the basis of suppressing local glare and maintaining the brightness of the image in a balanced state.

[0082] A major difference between the present invention and the existing algorithm is that the present invention is suitable for FPGA implementation. The glare suppression system framework constructed based on the method of the present invention is also the FPGA platform image processing framework. Figure 3 As shown in the figure, the entire processing framework utilizes the AXI4Stream protocol, a stream-oriented transmission protocol that does not involve memory addresses or limit burst length, making it particularly suitable for high-speed big data applications. Therefore, the entire image processing framework is based on the ARM AMBA AXI4 protocol, resulting in high bandwidth, low latency, and low power consumption, meeting the real-time requirements of algorithms.

[0083] The FPGA platform image processing framework of the present invention includes two USB decoders, two DMA controllers and an image enhancement and glare suppression IP core. The entire image processing framework uses the AXI4Stream protocol; the image enhancement and glare suppression IP core implements the method; USB decoder 1 is used to input a low-illumination image img and its corresponding grayscale image img_gray; DMA controller 1 is used to transmit memory data of the low-illumination image img and its corresponding grayscale image img_gray; DMA controller 2 is used to transmit memory data of a result image processed by the image enhancement and glare suppression IP core; and USB decoder 2 is used to output the result image to a PC.

[0084] The overall design framework of the FPGA accelerator of the method of the present invention is implemented as follows Figure 4As shown in the figure, the overall design framework consists of two subsystems: a processing system and an FPGA acceleration core system. The processing system implements memory access and control tasks and consists of an ARM CPU core and external memory. The FPGA acceleration core system accelerates the algorithm and is divided into three modules: a memory access module, a Gamma_trans image processing module, and a parameter cache module. To meet the global processing requirements of Vivado_HLS and improve image processing speed, a pipeline operation is implemented, allowing image data to be cached and processed simultaneously within the FPGA, facilitating the implementation of a low-latency, high-bandwidth IP core.

[0085] (1) Memory access module

[0086] During runtime, the CPU initializes the off-chip memory module and stores low-light image data in external DDR memory. The CPU is responsible for sending the input grayscale image to be processed to the memory access module via the AXI bus. The memory access module reads the input grayscale image from external memory and caches it in the cache module.

[0087] (2) Parameter cache module

[0088] During transmission, to ensure that every piece of data transmitted is valid data, the parameter cache module is composed of block random access memory (BRAM) located on the chip. The BRAM resources in the FPGA are independent RAMs, which are mainly used to cache image data and the results processed by the Gamma_trans module.

[0089] (3) Image processing module

[0090] It can be seen that the image processing module performs nonlinear operations on the image by calculating the brightness of the pixels in the image and evaluating the brightness of the pixels in the surrounding area, and transmits the calculation results to the image processing module to obtain the overall enhanced and regional suppressed images.

[0091] Algorithm acceleration is achieved by combining custom computation with parallel computing. Vivado designs dedicated circuits to perform mathematical calculations to complete custom computations, and multiple circuits perform parallel computations simultaneously. During the data-parallel computation phase, data is retrieved from the cache module, computations are performed, and the results are written back to the cache module in a pipelined manner. When traversing pixels during this process, the #Pragma HLS PIPELINE directive in Xilinx HLS guides the synthesis process. The PIPELINE is added to the J loop and expanded along the width of the input image. This allows HLS to process one pixel per clock cycle. HLS fully expands the window computation, increasing the bandwidth to read nine data points at a time. This is shown in the following table:

[0092]

[0093] To this end, the Gamma_trans nonlinearization operation utilizes DSP slices to implement a pipelined multiply-add operation. The pipeline primarily involves fetching data from the cache module, performing the calculation, and writing the result back to the cache module. The pipeline cycle is represented by the execution time of the longest task. This pipeline system design improves FPGA throughput and better utilizes logic resources for the parallel processing of parameter caching and image processing.

[0094] In one specific embodiment of the present invention, the low-light image data used comes from the public driving dataset BDD100K released by the Berkeley AI Lab (BAIR). This dataset contains 100,000 high-definition videos, each approximately 40 seconds long, in 720p resolution and 30 frames per second. A key frame is sampled at the 10th second of each video, resulting in 100,000 images (size: 1280 x 720). Furthermore, the public dataset LLVIP was used to test the performance of this algorithm.

[0095] The simulation experiment environment is constructed as follows:

[0096] PC: HP OMEN 8P; Operating system: Windows 11 Home Chinese version; Configuration: 12th generation smart i7-12700H processor, NVIDIA GeForce RTX 3070Ti, 16GB+512GB; Development languages: Python, an object-oriented dynamic programming language, and C, a procedural dynamic programming language; Development tools: PyCharm editor from JetBrains and Vivado design suite, an integrated design environment from Xilinx;

[0097] The glare suppression system in this paper utilizes the Xilinx Zynq-7020 (XC7Z020-1CLG400C) development board, a family of SoCs featuring a 650MHz dual-core ARM Cortex-A9 processor and an FPGA architecture. It integrates 13,300 logic slices, each with four 6-input LUCs and eight flip-flops, 630KB of fast block RAM, 220 DSP slices, and an integrated memory controller core. This board offers the advantages of parallel hardware execution, hardware-accelerated algorithms, low-latency control, and flexible development.

[0098] In order to verify the effect of the adaptive gamma correction method based on regional brightness on enhancing dark light and suppressing glare, an experimental environment based on a USB interface was built. Based on the powerful data processing capabilities of FPGA, its parallel computing and pipeline processing characteristics are utilized. Pipeline is a process that can execute program instructions in parallel. For example, by processing data while caching, the algorithm calculation time can be greatly reduced compared to the software implementation method of serial processing. This shows that the hardware design scheme of the present invention has advantages in real-time, power consumption and performance compared to other general platform algorithms. In addition, the method is low-cost, consumes less FPGA resources, and the image processing capabilities meet the use requirements of most projects.

[0099] Using test images from two datasets, we compared our method with other methods, such as Adaptive Gamma Correction, Unsupervised Night Image Enhancement, Zero-reference Low-light Enhancement (Zero-DCE), and other representative methods. We then conducted global and local quality evaluations of the experimental results to test the glare suppression and low-light enhancement performance of our method.

[0100] In terms of global image quality evaluation, image quality evaluation indicators such as PSNR, Entropy, VIF and MSE are used to evaluate the processed images, as shown in Table 1 and Table 2. The present invention uses the peak signal-to-noise ratio (PSNR) from the perspective of image distortion. The larger the PSNR value, the smaller the distortion between the image to be evaluated and the reference image, and the better the image quality. From the perspective of information theory, information entropy (Entropy) is used to reflect the richness of image information. The larger the image information entropy, the richer its information content and the better the quality. From the perspective of the clarity and detail information of the image itself, the visual information transfer rate (VIF) and mean square error (MSE) are used. The larger the VIF value, the higher the clarity of the image and the better the image quality. The smaller the MSE value, the better the image quality and the network model.

[0101] Table 1 Evaluation of different algorithms on the BDD dataset

[0102] algorithm PSNR Entropy VIF MSE Jin Y 27.84 7.19 0.80 106.69 HWMNet 27.88 6.85 0.80 105.84 Zero-DCE 27.20 7.20 0.79 98.27 AGCgamma 27.76 7.62 0.80 108.87 Dark channel prior 26.33 6.33 0.71 97.03 Histogram equalization 28.13 7.16 0.80 93.17 Ours 28.91 7.37 0.81 83.40

[0103] Table 2 Evaluation of different algorithms on the LLVIP dataset

[0104] algorithm PSNR Entropy VIF MSE Jin Y 27.43 7.29 0.80 117.25 HWMNet 27.87 6.17 0.68 106.07 Zero-DCE 27.58 6.91 0.81 113.49 AGCgamma 27.41 6.72 0.80 118.05 Dark channel prior 27.61 6.58 0.79 118.55 Histogram equalization 27.82 6.55 0.81 107.32 Ours 28.10 7.74 0.81 102.59

[0105] Tables 1 and 2 show the quantitative results of low-light data, comparing the GS-AGC Gamma algorithm proposed in the present invention with deep learning methods and classic low-light image enhancement methods. The results show that the GS-AGC Gamma algorithm has advantages to a certain extent. From the above comparison, it can be seen that on the BDD dataset, although AGCgamma performs best in the information entropy index, it is slightly inferior to the algorithm of the present invention in other indicators. Compared with other algorithms, the algorithm of the present invention shows better performance in the above evaluation indicators. On the LLVIP dataset, compared with the other algorithms, the GS-AGC Gamma algorithm of the present invention is slightly better than other algorithms in the results of the above evaluation indicators.

[0106] The experimental visual effects are shown in the figure below after the experimental objects are processed by different methods. Figure 5 As shown. Figure 5 It can be seen that the adaptive gamma correction algorithm, Zero-DCE algorithm, and HWMNet algorithm can all enhance image brightness, but they over-enhance glare areas, resulting in poor visual effects. This indicates that single image enhancement methods are ineffective in suppressing glare. Through actual experiments, the processing results of our method and Jin Y's method on the LLVIP dataset are comparable. On the BDD dataset, the method also achieves good visual effects near dark areas, while maintaining good consistency in light source shape. However, Jin Y's method exhibits significant color cast near houses, causing a certain degree of image distortion.

[0107] The present invention uses two evaluation metrics combined with the full-reference image evaluation algorithm: saliency-guided local quality assessment (SG-ESSIM) and global and local variation image quality assessment (GLV-SIM), to more comprehensively evaluate images, as shown in Table 3 below. The SG-ESSIM algorithm uses visual saliency as a weighted value to emphasize image areas that stand out to the observer, and then combines it with the full-reference image quality assessment algorithm. The GLV-SIM algorithm uses fractional derivatives to measure global image changes and gradient modulus to measure local image changes. The two are then combined to calculate the similarity map between the reference image and the degraded image, thereby obtaining an objective image score.

[0108] Table 3 Results of the method of the present invention on different local evaluation indicators

[0109]

[0110] Table 3 shows the comparative results of different algorithms in terms of local target area metrics. Compared with the Jin Y algorithm, although its GLV-SIM metric on the LLVIP dataset is comparable to that of this algorithm, its other metrics are all lower than those of this algorithm. Compared with AGCgamma, although its GLV-SIM metric on the LLVIP and BDD datasets is comparable to that of this algorithm, its other metrics are all lower than those of this algorithm. Except for the GLV-SIM metric on the BDD dataset, which is comparable to that of this algorithm, the histogram equalization algorithm is lower than that of this algorithm in all other metrics. Compared with the remaining HWMNet algorithms, the Zero-DCE algorithm, and the dark channel prior algorithm, this algorithm achieves better results on the local evaluation metrics GLV-SIM and SG-ESSIM on the LLVIP and BDD datasets.

[0111] Because embedded systems are particularly concerned with energy consumption and real-time performance, this paper compares the energy efficiency and real-time performance of accelerators with those of other general-purpose hardware platforms. Table 4 shows the test results. The test platforms were an Intel Core i7 and a Zynq 7020, respectively, and the test data was a 1280×720 low-light image file.

[0112] In terms of energy efficiency, FPGAs can achieve faster runtimes by fully utilizing their parallel processing capabilities through the rational design and configuration of hardware circuits. Using the PIPELINE instruction in the FPGA demonstrates parallel processing capabilities, dividing the gamma value in step (7) into multiple stages and executing them simultaneously, allowing it to run faster than on a CPU platform. FPGAs can also be accelerated through customized hardware, customizing the hardware logic design based on the requirements of the GS-AGCGamma algorithm. In contrast, the CPU is a general-purpose processor and cannot directly optimize the hardware execution of the algorithm. Converting the algorithm into a hardware circuit can eliminate some of the CPU overhead and improve execution efficiency.

[0113] In terms of real-time performance, FPGAs offer low latency, as demonstrated by the Latency (1900-172) and Interval (1900-173) values ​​provided by the HLS tool. In FPGAs, circuit and signal transmission paths are direct, without interference from the operating system and other software layers. Therefore, algorithms executed on FPGAs can respond to inputs and outputs more quickly, reducing overall execution time. In testing, the CPU platform completed a single frame of image processing in 680ms, while the FPGA accelerator only took 19ms. In terms of real-time performance, the CPU platform processes 1.47 frames per second, while the FPGA can achieve a rate of 52 frames per second. Compared to the CPU, the accelerator designed in this invention achieves a performance improvement of approximately 35.3 times. Therefore, by using FPGAs as accelerators, their advantages in energy efficiency and real-time performance can be fully utilized, resulting in higher computing performance and faster execution times.

[0114] Table 4 Comparison of real-time performance and energy consumption

[0115] platform CPU FPGA Processor model Intel Core i7 ZYNQ Process technology (nm) 10 28 Clock frequency (GHz) 2.30 0.05 Single frame processing time (ms) 680 19 Processing frame rate (frames / s) 1.47 52 Power consumption (W) 49.50 1.67

[0116] The processing results of the method of the present invention show that in dark areas, the visual visibility of these parts of the image is enhanced, preserving more image details. This is particularly true for the visual effects of the ground and buildings surrounding the car, essentially meeting the visual information needs of pedestrians and drivers. It also effectively addresses the glare problem caused by light effects such as car lights in low-light images. A comparison of these visual effects shows that the method of the present invention can better address the uneven illumination problem caused by glare in low-light images, enhancing the visual effect of the darker areas of the image while suppressing the brightness of the glare areas, showing a clear advantage in addressing such image issues.

[0117] Experimental results show that the method of the present invention achieves higher contrast enhancement performance, requires less computational complexity, achieves lower image distortion, and is relatively clearer and has richer detail information.

Claims

1. An adaptive gamma correction glare suppression method based on regional brightness perception, characterized in that: The steps include: Step 1: Get the grayscale image I of the input image I gray , the input image I is a low-illumination image; Step 2: Calculate the grayscale image I gray The brightness threshold τ t , the brightness area of ​​the input image I is divided into dark area, halo area, glare area and other areas; Step 3: Adjust the pixels in the dark area of ​​the image, stretching it from a dark scene to a medium-bright scene, so that the gamma values ​​corresponding to the dark area are all less than 1; Step 4: Adjust the pixels in the halo area of ​​the image, reducing it from a high-brightness scene to a medium-brightness scene, so that the gamma values ​​corresponding to the halo area are all greater than 1; Step 5: Adjust the pixels in the glare area of ​​the image, reducing them from a high-brightness scene to a medium-brightness scene, so that the gamma values ​​corresponding to the glare area are all greater than 1; Step 6: Adjust the pixels in the remaining areas of the image so that the brightness of the remaining areas remains unchanged; Step 7: Output the overall processed image.

2. The adaptive gamma correction glare suppression method based on regional brightness perception according to claim 1, characterized in that: In step 2, the brightness threshold is calculated using the following formula of the human eye's indirect brightness perception function: Where R(L) is the retinal response of the input grayscale image, and the brightness perception function of the human eye covers the full dynamic range of the low-light image [R(L min )=0,R(L max )=255], L is the brightness intensity of the original pixel in the grayscale image, and its value range is [0, 255]. k is the sensitivity parameter, which determines the speed at which the retinal responsiveness increases with the increase of pixel brightness intensity. k(L) is expressed as the following function: Where, CDF G (L) is the cumulative distribution function of the input histogram, and p(x) represents the normalized grayscale histogram; is the pixel intensity normalized to [0, 1], expressed as: Where, L max is the maximum brightness level of the input grayscale image; Iteratively solve R(L) and use the golden section search algorithm in the one-dimensional search algorithm to shrink the interval, gradually reducing the interval of the optimal solution until the interval length is 0. Use the initial space [0,50], [50,150], [150,200], and [200,255] to implement the iterative process in four times until the maximum number of iterations, 100, is reached.

3. The adaptive gamma correction glare suppression method based on regional brightness perception according to claim 1, characterized in that: The grayscale image I gray The original pixel intensity is divided into four parts: [0,50], [50,150], [150,200], and [200,255]. In the R(L) formula, the values ​​of L are the four parts, and the four brightness thresholds are calculated in turn, which are the dark scene threshold τ t1 , medium-bright scene threshold τ t2 , bright scene threshold τ t3 and highlight scene threshold τ t4 , (T0, ) range of brightness area is divided into dark light area, and ( τ t4 ) range of brightness area is divided into halo area, ( T 255 ) range is divided into the glare area, where T0 and T 255 They represent grayscale values ​​0 and 255 respectively.

4. The adaptive gamma correction glare suppression method based on regional brightness perception according to claim 3, characterized in that: In step 3, the adjustment formula is as follows: Where G dark represents the dark light enhancement function; In step 4, the adjustment formula is as follows: Where G halo represents the halo suppression function; In step 5, the adjustment formula is as follows: Where G glare is the glare suppression function; In step 6, the adjustment formula is as follows: G other =1 G other Represents the brightness adjustment function of other areas.

5. The adaptive gamma correction glare suppression method based on regional brightness perception according to claim 4, characterized in that: The output of step 7 is: G=G dark +G glare +G halo +G other 6. An FPGA platform image processing framework for implementing the adaptive gamma correction glare suppression method based on regional brightness perception as described in claim 1, characterized in that: The invention comprises two USB decoders, two DMA controllers and an image enhancement and glare suppression IP core. The entire image processing framework uses the AXI4 Stream protocol. The image enhancement and glare suppression IP core implements the method. USB decoder 1 is used to input a low-light image img and its corresponding grayscale image img_gray. DMA controller 1 is used to transmit the memory data of the low-light image img and its corresponding grayscale image img_gray. DMA controller 2 is used to transmit the memory data of the result image after processing by the image enhancement and glare suppression IP core. USB decoder 2 is used to output the result image to a PC.

7. An FPGA accelerator for implementing the adaptive gamma correction glare suppression method based on regional brightness perception as described in claim 1, characterized in that: include: Processing system to implement memory access and control tasks; The FPGA acceleration core system adopts the image enhancement glare suppression IP core to realize the acceleration task of the method, including: a memory access module, a parameter cache module and a Gamma_trans image processing module.

8. The FPGA accelerator according to claim 7, characterized in that: The processing system consists of an ARM CPU core and an external memory.

9. The FPGA accelerator according to claim 7, characterized in that: The memory access module reads low-light images and corresponding grayscale image data from external storage; the parameter cache module, composed of a block random access memory located on the chip, caches the results processed by the Gamma_trans image processing module; the Gamma_trans image processing module evaluates the brightness of pixels in the image and the brightness of pixels in the surrounding area, performs nonlinear operations on the image, and obtains an overall enhanced and regionally suppressed image.

10. The FPGA accelerator according to claim 7, characterized in that: Pipeline operation is used to cache and process image data simultaneously in the FPGA.