Image exposure automatic adjustment method based on FPGA

By using an FPGA-based automatic image exposure adjustment method, which utilizes the ratio of average image brightness to entropy, ROM lookup tables, and binary search, the problems of long computation time and high resource consumption in existing technologies are solved, achieving fast and accurate exposure control.

CN122069431AActive Publication Date: 2026-05-19ZHONGKE YIHAI MICROELECTRONICS TECH (CHENGDU) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGKE YIHAI MICROELECTRONICS TECH (CHENGDU) CO LTD
Filing Date
2026-04-22
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies, in complex lighting scenarios, suffer from long calculation times, high resource consumption, and sensitivity to data noise, making it difficult to achieve fast and accurate exposure control.

Method used

An FPGA-based automatic image exposure adjustment method is adopted. By calculating the ratio of the average image brightness to the entropy value of the current frame, and combining a ROM lookup table and a binary search method, the optimal exposure value is quickly found, achieving fast and accurate exposure control.

Benefits of technology

It enables fast and accurate automatic exposure control in complex lighting scenarios, reducing computation time and resource consumption, and improving the efficiency and accuracy of exposure adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122069431A_ABST
    Figure CN122069431A_ABST
Patent Text Reader

Abstract

An FPGA-based image exposure automatic adjustment method comprises the following steps: acquiring image data in a YUV format, and obtaining a Y component of the YUV image data; carrying out region division on the image of the current frame, distributing a corresponding preset weight to each region, and calculating an image brightness mean value Meanpix of the current frame and an entropy value of the current frame; and performing exposure adjustment on the next frame based on the image brightness mean value Mean of the current frame and the entropy value of the current frame, wherein the exposure adjustment comprises first mode exposure adjustment and second mode exposure adjustment. According to the first mode exposure adjustment, the ratio of Mean i to H is calculated, and an ROM lookup table is combined to quickly reach the position near the optimal exposure value; and in the second mode of exposure adjustment, an optimal exposure value is found through a dichotomy rapid convergence mechanism, so that rapid and accurate automatic exposure control is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of semiconductor technology, and in particular relates to an automatic image exposure adjustment method based on FPGA. Background Technology

[0002] Automatic exposure algorithms are a core technology in the field of digital imaging. Their technological background can be traced back to the birth of photoresistor metering systems in the 1960s. Early cameras relied on manual adjustments of aperture, shutter speed, and ISO, but overexposure or underexposure was common in complex lighting conditions. In 1964, the Pentax Spotmatic first introduced TTL (Through The Lens) metering technology, directly measuring the intensity of incident light through the lens, laying the foundation for modern automatic exposure.

[0003] In the 21st century, the increased computing power of ISPs (Image Signal Processors) has driven the evolution of algorithms toward intelligence. Multimodal information fusion technology, which combines brightness, texture, and depth data, has significantly improved adaptability to complex scenes. Typical examples include image entropy-based optimization algorithms, which determine the optimal exposure parameters by maximizing information content and introduce a real-time feedback mechanism to continuously optimize parameters in dynamic scenes.

[0004] However, problems still exist, such as reliance on large-size sensors and high-performance processors, long algorithm computation time, high resource consumption, and sensitivity to data noise. Summary of the Invention

[0005] This application provides an automatic image exposure adjustment method based on FPGA. The method adjusts the exposure based on the average image brightness value Mean_pi of the current frame and the entropy value H of the current frame. The first mode of exposure adjustment calculates the ratio of Mean_pi to H and uses a ROM lookup table to quickly reach the vicinity of the optimal exposure value. The second mode of exposure adjustment finds the optimal exposure value through a binary search fast convergence mechanism, thereby achieving fast and accurate automatic exposure control.

[0006] Other objects and advantages of the present invention can be further understood from the technical features disclosed herein.

[0007] To achieve one or more of the above objectives or other objectives, the present invention provides an automatic image exposure adjustment method based on FPGA.

[0008] An FPGA-based automatic image exposure adjustment method includes: Acquire image data in YUV format to obtain the Y component of the YUV image data; The image of the current frame is divided into regions, and a corresponding preset weight is assigned to each region. The mean brightness value Mean_pix of the current frame and the entropy value of the current frame are calculated. The exposure of the next frame is adjusted based on the average image brightness value Mean_pi of the current frame. The exposure adjustment includes a first mode exposure adjustment and a second mode exposure adjustment. When adjusting exposure using the first mode, the ratio of the average image brightness Mean_pi of the current frame to the entropy value of the current frame is calculated, the ratio is normalized and mapped to an integer range as the address of a lookup table, the adjustment coefficient is obtained through the lookup table, and the exposure is adjusted for the next frame. When adjusting exposure using the second mode, first preset the exposure value for the next frame, then compare the entropy value of the Y component of the next frame with the entropy value of the current frame. If the entropy value increases, maintain the exposure adjustment direction; otherwise, reverse the exposure adjustment direction and halve the exposure step.

[0009] The specific process of adjusting the exposure of the next frame based on the average image brightness value Mean_pi of the current frame is as follows: If 110 <= Mean_pix < 128, then increase the exposure using the second mode; If 128 <= Mean_pix <= 140, then reduce the exposure using the second mode; If Mean_pix > 140, then reduce exposure using the first mode; If Mean_pix < 110, then increase exposure using the first mode.

[0010] The specific process for adjusting the exposure in the first mode is as follows: Calculate the ratio of the average image brightness Mean_pi of the current frame to the entropy value of the current frame, normalize the ratio, and map it to an integer range of 0-256 as the address of the ROM lookup table; The pre-stored adjustment coefficients are cached in the ROM lookup table. The corresponding adjustment coefficients are read from the ROM lookup table using the corresponding addresses. The product of the adjustment coefficients and the exposure value of the current frame is the exposure value of the next frame, and then the process proceeds to the next frame.

[0011] The specific process for adjusting the exposure in the second mode is as follows: Add the exposure value of the current frame to the preset fixed exposure step T1 to get the exposure value of the next frame, and then proceed to the next frame; Calculate the entropy value of the Y component in the next frame and compare it with the entropy value of the current frame; If the entropy value increases, maintain the exposure adjustment direction; If the entropy value decreases, the exposure adjustment direction is reversed, changing the increase in exposure to the decrease in exposure, or vice versa, and the exposure step T1 in each adjustment process is halved using a binary search method.

[0012] The exposure adjustment direction is reversed no more than twice.

[0013] The formula for calculating the entropy value is: Where i represents the gray level (0~255), and pi represents the probability of gray level i appearing.

[0014] The image of the current frame is divided into 5 regions: top region 1, left region 2, middle region 3, right region 4, and bottom region 5. Among them, Region 1 and Region 5 have the same area, Region 2 and Region 4 have the same area, and Region 3 has the largest area.

[0015] The preset weight ratio for each region is 1:3:8:3:1.

[0016] The formula for calculating the mean brightness value (Mean_pix) of the current frame is as follows: Mean_pix=(sum1 / num1+sum2 / num2*3+sum3 / num3*8+sum4 / num4*3+sum5 / num5) / (1+3+8+3+1); Where sum is the total value of pixels in each region, and num is the number of pixels in each region.

[0017] If the input image data is in RGB format, it is converted into the Y component of YUV image data using the Y data conversion formula; The Y data conversion formula is: Y = 0.299R + 0.587G + 0.114B; Where Y is the Y component of the YUV image data, R is the intensity of the red component in the image, G is the intensity of the green component in the image, and B is the intensity of the blue component in the image.

[0018] Compared with the prior art, the beneficial effects of the present invention mainly include: This application adjusts the exposure based on the average image brightness value Mean_pi of the current frame and the entropy value H of the current frame. The first mode of exposure adjustment calculates the ratio of Mean_pi to H and uses a ROM lookup table to quickly reach the vicinity of the optimal exposure value. The second mode of exposure adjustment finds the optimal exposure value through a binary search fast convergence mechanism, thereby achieving fast and accurate automatic exposure control.

[0019] To make the above and other objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic flowchart of an FPGA-based automatic image exposure adjustment method provided in an embodiment of this application.

[0022] Figure 2 This is a schematic diagram of the region division provided for an embodiment of this application.

[0023] Figure 3 This is a schematic diagram of the second mode exposure adjustment provided in an embodiment of this application.

[0024] Figure 4 A schematic diagram of Y data coefficient adjustment provided in the embodiments of this application. Figure 1 .

[0025] Figure 5 A schematic diagram of Y data coefficient adjustment provided in the embodiments of this application. Figure 2 .

[0026] Figure 6 A schematic diagram of Y data coefficient adjustment provided in the embodiments of this application. Figure 3 .

[0027] Figure 7 A schematic diagram of Y data coefficient adjustment provided in the embodiments of this application. Figure 4 . Detailed Implementation

[0028] The foregoing and other technical contents, features, and effects of the present invention will be clearly presented in the following detailed description of a preferred embodiment with reference to the accompanying drawings. The directional terms mentioned in the following embodiments, such as up, down, left, right, front, or back, are merely for reference to the accompanying drawings. Therefore, the directional terms used are for illustrative purposes and not for limiting the present invention.

[0029] The embodiments of this application will now be described in detail with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the embodiments of this application to facilitate a better understanding of the application. However, the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments.

[0030] Example like Figure 1 As shown, an automatic image exposure adjustment method based on FPGA includes: Step S1: Acquire image data in YUV format and obtain the Y component of the YUV image data; Step S2: Divide the image of the current frame into regions and assign corresponding preset weights to each region; Step S3: Calculate the mean image brightness value Mean_pix of the current frame and the entropy value of the current frame; Step S4: Adjust the exposure of the next frame based on the average image brightness Mean_pi of the current frame and the entropy value of the current frame. The exposure adjustment includes the first mode exposure adjustment (fast exposure adjustment) and the second mode exposure adjustment (fine exposure adjustment).

[0031] Specifically, when adjusting the exposure using the first mode, the ratio of the average image brightness Mean_pi of the current frame to the entropy value of the current frame is calculated, the ratio is normalized and mapped to an integer range as the address of the lookup table, the adjustment coefficient is obtained through the lookup table, and the exposure is adjusted for the next frame. When adjusting exposure using the second mode, first preset the exposure value for the next frame, then compare the entropy value of the Y component of the next frame with the entropy value of the current frame. If the entropy value increases, maintain the exposure adjustment direction; otherwise, reverse the exposure adjustment direction and halve the exposure step.

[0032] First, obtain the Y (luminance) component of the YUV image data. If the input data is in RGB format, since only the Y format data needs to be retained for subsequent calculations, in order to save resources, it is only necessary to convert it into the Y component of the YUV image data using the Y data conversion formula. The Y data conversion formula is: Y=0.299R+0.587G+0.114B. Where Y is the Y component of the YUV image data, R is the intensity of the red component in the image, G is the intensity of the green component in the image, and B is the intensity of the blue component in the image.

[0033] In a preferred embodiment of the present invention, after converting RGB format data to Y (luminance) format data, the data is divided into 8 equal parts. Taking an 8-bit width data range of 0~255 as an example, the data is divided into 0~31, 32~63, 64~95, 96~127, 128~159, 160~191, 192~223, and 224~255. Initially, the ratio of each part is 1. The average value is calculated using the formula for the average image luminance value Mean_pix of the current frame. When it is found that the number of times the exposure is reduced is greater than the number of times the exposure is increased, the coefficient is adjusted to 1:1.25:1.5:1.25:1.25:1:1:1. Figure 4As shown, this allows for a greater reduction in exposure each time, reducing the frequency of needing to actively reduce exposure due to insufficient reduction. When it is found that the number of exposure reductions is greater than or equal to twice the number of exposure increases, the coefficient is adjusted to 1.25:1.5:1.25:1.25:1:1:1:1, as... Figure 5 As shown; conversely, when it is found that the number of times the exposure is increased is greater than the number of times the exposure is decreased, the coefficient is adjusted to 1:1:1:1.25:1.25:1.5:1.25:1, as shown. Figure 6 As shown; when it is found that the number of times the exposure is increased is greater than or equal to twice the number of times the exposure is decreased, the coefficient is adjusted to 1:1:1:1:1.25:1.25:1.5:1.25, as follows. Figure 7 As shown.

[0034] YUV is a color encoding method that separates luminance (Y) and chrominance (U / V) information. It is widely used in video processing and transmission. Its core advantage lies in preserving the basic display function of the image while reducing data transmission bandwidth by separating luminance and chrominance signals. The YUV format contains three components: Y represents luminance (grayscale value), which carries the basic brightness and darkness information of the image; U / V represents chrominance (color and saturation), which determines the image color. In the RGB color model, R represents the red component, G represents green, and B represents blue. These three colors can produce various colors by mixing them in different proportions. In the RGB to YUV conversion formula, the coefficients 0.299, 0.587, and 0.114 are determined based on the sensitivity of the human eye to red, green, and blue. Since the human eye is most sensitive to green, the coefficient for the green component is the largest, followed by red, and then blue.

[0035] After acquiring the Y (luminance) format data, through methods such as... Figure 2 The region division shown divides the current frame's image (standard display size is 4:3) into 5 regions, totaling 16*12 data blocks: top region 1, left region 2, middle region 3, right region 4, and bottom region 5. Each region is assigned a pre-defined weight in a ratio of 1:3:8:3:1. Regions 1 and 5 have the same area, 16*2; regions 2 and 4 have the same area, 3*8; and region 3 has the largest area, 10*8. The formula for calculating the mean brightness value (Mean_pix) of the current frame is: Mean_pix=(sum1 / num1+sum2 / num2*3+sum3 / num3*8+sum4 / num4*3+sum5 / num5) / (1+3+8+3+1); Where sum is the total value of pixels in each region, and num is the number of pixels in each region.

[0036] The specific process of adjusting the exposure of the next frame based on the average image brightness value Mean_pi of the current frame is as follows: If 110 <= Mean_pix < 128, the exposure is increased through the second mode (fine exposure adjustment); if 128 <= Mean_pix <= 140, the exposure is decreased through the second mode (fine exposure adjustment); if Mean_pix > 140, a quick exposure adjustment is performed through the first mode (fast exposure adjustment) to decrease the exposure until it reaches the vicinity of the exposure value, and then the second mode (fine exposure adjustment) is used for further adjustment; if Mean_pix < 110, a quick exposure adjustment is performed through the first mode (fast exposure adjustment) to increase the exposure until it reaches the vicinity of the exposure value, and then the second mode (fine exposure adjustment) is used for further adjustment. At the same time, the entropy value of the current frame is calculated. The higher the entropy value, the richer the details and the more complex the texture of the image. Overexposure or underexposure will cause the image to be blurry. The goal of exposure adjustment is to make the image brightness moderate and the details rich. The entropy value H is used to quantify the richness of image details, and a high entropy value is used as the standard to judge whether the exposure is correct. The formula for calculating entropy is: Where i represents gray level 0 to 255 (pixel data is 8 bits), and pi represents the probability of gray level i appearing, that is, the proportion of the number of pixels of that gray level to the total number of pixels.

[0037] This application adjusts the exposure of the next frame based on the average image brightness Mean_pi of the current frame and the entropy value of the current frame. The exposure adjustment includes a first mode exposure adjustment (fast exposure adjustment) and a second mode exposure adjustment (fine exposure adjustment).

[0038] Specifically, the first mode exposure adjustment (fast exposure adjustment) process is as follows: Calculate the ratio of the average image brightness value Mean_pi of the current frame to the entropy value of the current frame, normalize the ratio, and then map it to an integer range of 0-256 as the address of the ROM lookup table; cache the pre-stored adjustment coefficients in the ROM lookup table, read the corresponding adjustment coefficients from the ROM lookup table by address lookup, and multiply the adjustment coefficients by the exposure value of the current frame to obtain the exposure value of the next frame, and proceed to the next frame; in the next frame, the exposure adjustment mode is determined again by Mean_pi. Exposure adjustment is a continuous process, and each frame will be adjusted according to the calculation result of the previous frame.

[0039] Specifically, the process of the second mode exposure adjustment (fine-tuning exposure) is as follows: First, based on Mean_pi, determine whether to increase or decrease the exposure using the second mode, and preset a fixed exposure step T1. The sum of the current frame's exposure value and T1 is the exposure value for the next frame, and proceed to the next frame. Calculate the entropy value of the Y component in the next frame and compare it with the entropy value of the previous frame. If the entropy value increases, it indicates the exposure adjustment direction is correct, and the exposure adjustment direction is maintained, continuing to increase / decrease the exposure. If the entropy value decreases, it indicates the exposure adjustment has exceeded the optimal exposure value, which is between the current and previous exposure values. Reverse the exposure adjustment direction, changing exposure increase to exposure decrease, or vice versa, and halve the exposure step T1 in each adjustment process using a binary search method. When the entropy value decreases for the second time, reverse the exposure direction again; this is the last time the exposure adjustment direction is reversed (the number of exposure adjustment direction reversals does not exceed two). Through no more than two exposure adjustment direction reversals and using a binary search method, the optimal exposure value is quickly converged. Figure 3 As shown.

[0040] In summary, this application adjusts the exposure based on the average image brightness Mean_pi of the current frame and the entropy value H of the current frame. The first mode of exposure adjustment calculates the ratio of Mean_pi to H and uses a ROM lookup table to quickly reach the vicinity of the optimal exposure value. The second mode of exposure adjustment finds the optimal exposure value through a binary search fast convergence mechanism, thereby achieving fast and accurate automatic exposure control.

[0041] The common English terms or letters used in this invention for clarity of description are for illustrative purposes only and are not limiting interpretations or specific uses. They should not be used to limit the scope of protection of this invention based on their possible Chinese translations or specific letters.

[0042] It should also be noted that in this article, relational terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

Claims

1. An automatic image exposure adjustment method based on FPGA, characterized in that, include: Acquire image data in YUV format to obtain the Y component of the YUV image data; The image of the current frame is divided into regions, and a corresponding preset weight is assigned to each region. The mean brightness value Mean_pix of the current frame and the entropy value of the current frame are calculated based on the Y component. The exposure of the next frame is adjusted based on the average image brightness value Mean_pi of the current frame and the entropy value of the current frame. The exposure adjustment includes a first mode exposure adjustment and a second mode exposure adjustment. When adjusting exposure using the first mode, the ratio of the average image brightness Mean_pi of the current frame to the entropy value of the current frame is calculated, the ratio is normalized and mapped to an integer range as the address of a lookup table, the adjustment coefficient is obtained through the lookup table, and the exposure is adjusted for the next frame. When adjusting exposure using the second mode, first preset the exposure value for the next frame, enter the next frame, and then compare the entropy value of the Y component of the next frame with the entropy value of the previous frame. If the entropy value increases, maintain the exposure adjustment direction; otherwise, reverse the exposure adjustment direction and halve the exposure step.

2. The FPGA-based automatic image exposure adjustment method according to claim 1, characterized in that, The specific process of adjusting the exposure of the next frame based on the average image brightness value Mean_pi of the current frame is as follows: If 110 <= Mean_pix < 128, then increase the exposure using the second mode; If 128 <= Mean_pix <= 140, then reduce the exposure using the second mode; If Mean_pix > 140, then reduce exposure using the first mode; If Mean_pix < 110, then increase exposure using the first mode.

3. The FPGA-based automatic image exposure adjustment method according to claim 2, characterized in that, The specific process for adjusting the exposure in the first mode is as follows: Calculate the ratio of the average image brightness Mean_pi of the current frame to the entropy value of the current frame, normalize the ratio, and map it to an integer range of 0-256 as the address of the ROM lookup table; The pre-stored adjustment coefficients are cached in the ROM lookup table. The corresponding adjustment coefficients are read from the ROM lookup table using the corresponding addresses. The product of the adjustment coefficients and the exposure value of the current frame is the exposure value of the next frame, and then the next frame is entered.

4. The FPGA-based automatic image exposure adjustment method according to claim 2, characterized in that, The specific process for adjusting the exposure in the second mode is as follows: Add the exposure value of the current frame to the preset fixed exposure step T1 to get the exposure value of the next frame, and then proceed to the next frame; Calculate the entropy value of the Y component in the next frame and compare it with the entropy value of the current frame; If the entropy value increases, maintain the exposure adjustment direction; If the entropy value decreases, the exposure adjustment direction is reversed, changing the increase in exposure to the decrease in exposure, or vice versa, and the exposure step T1 in each adjustment process is halved using a binary search method.

5. The FPGA-based automatic image exposure adjustment method according to claim 4, characterized in that, The exposure adjustment direction is reversed no more than twice.

6. The FPGA-based automatic image exposure adjustment method according to claim 1, characterized in that, The formula for calculating the entropy value is: Where i represents the gray level (0~255), and pi represents the probability of gray level i appearing.

7. The FPGA-based automatic image exposure adjustment method according to claim 1, characterized in that, The image of the current frame is divided into 5 regions: top region 1, left region 2, middle region 3, right region 4, and bottom region 5. Among them, Region 1 and Region 5 have the same area, Region 2 and Region 4 have the same area, and Region 3 has the largest area.

8. The FPGA-based automatic image exposure adjustment method according to claim 7, characterized in that, The preset weight ratio for each region is 1:3:8:3:

1.

9. The FPGA-based automatic image exposure adjustment method according to claim 8, characterized in that, The formula for calculating the mean brightness value (Mean_pix) of the current frame is as follows: ; Where sum is the total value of pixels in each region, and num is the number of pixels in each region.

10. The FPGA-based automatic image exposure adjustment method according to claim 1, characterized in that, If the input image data is in RGB format, it is converted into the Y component of YUV image data using the Y data conversion formula; The Y data conversion formula is: Y = 0.299R + 0.587G + 0.114B; Where Y is the Y component of the YUV image data, R is the intensity of the red component in the image, G is the intensity of the green component in the image, and B is the intensity of the blue component in the image.