A real-time image exposure control method and system

By using a real-time image exposure control method, the exposure time or gain parameters are adjusted preferentially based on the brightness feedback of specific objects. Combined with inter-frame smoothing and fill light control, the problems of motion blur and noise control in dynamic recognition scenes are solved, thereby improving image quality and recognition rate.

CN122496719APending Publication Date: 2026-07-31HANGZHOU MOTU INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU MOTU INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-06-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing automatic exposure algorithms cannot simultaneously suppress motion blur and control noise in dynamic recognition scenarios, affecting image quality and recognition rate.

Method used

A real-time image exposure control method is adopted, which prioritizes the adjustment of exposure time or gain parameters by using brightness feedback of specific object areas. Combined with inter-frame smoothing and fill light control, it achieves differentiated exposure time and gain allocation, and introduces a graded backoff strategy to stabilize exposure control.

Benefits of technology

It significantly improves the success rate of target recognition, takes into account brightness adjustment, motion blur control and recognition effect, adapts to different lighting conditions and target types, and improves system stability and recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496719A_ABST
    Figure CN122496719A_ABST
Patent Text Reader

Abstract

This invention discloses a real-time image exposure control method and system, relating to the field of image processing technology. The method includes: acquiring the current frame image and performing specific object detection based on global automatic exposure; statistically analyzing the image brightness value of the region where the specific object is located, and calculating the object brightness value; calculating the target comprehensive exposure value of the current frame based on the object brightness value, a preset reference brightness value, and the actual comprehensive exposure value of the current frame; allocating the exposure time and gain parameters for the next frame, wherein when exposure needs to be increased, the exposure time is increased first, and when exposure needs to be decreased, the gain is decreased first; and executing the exposure. This invention, through the allocation method of prioritizing exposure time over gain and decreasing gain before decreasing exposure time, makes the system more conducive to balancing brightness adjustment, motion blur control, and recognition effect in dynamic recognition scenarios, improving the success rate of target recognition and significantly enhancing the adjustment capability of the automatic exposure system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and specifically to a real-time image exposure control method and system. Background Technology

[0002] Automatic exposure control is one of the core functions of image acquisition systems such as access control gates. It typically adjusts the exposure time and gain parameters to bring the image brightness within the target range. In dynamic scenarios such as face recognition and moving target capture, the adjustment strategy of exposure parameters directly affects image quality. Excessive exposure time can cause motion blur and blur target details, while excessive gain can introduce noise and reduce the image signal-to-noise ratio.

[0003] Existing automatic exposure algorithms typically employ fixed allocation strategies when adjusting exposure time and gain. For example, some schemes adjust exposure time and gain synchronously at a fixed ratio. However, these strategies suffer from the problem of failing to simultaneously address motion blur suppression and noise control in dynamic recognition scenarios, thus affecting the recognition rate. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a real-time image exposure control method and system.

[0005] The technical solution adopted in this invention employs a real-time image exposure control method, comprising: acquiring the current frame image based on global automatic exposure; performing specific object detection on the current frame image; statistically analyzing the image brightness value of the region where the specific object is located in the current frame image, and calculating the object brightness value; calculating the target comprehensive exposure value of the current frame based on the object brightness value, a preset reference brightness value, and the actual comprehensive exposure value of the current frame; determining the comprehensive exposure control value of the next frame based on the target comprehensive exposure value of the current frame, and allocating the exposure time and gain parameters of the next frame according to the comprehensive exposure control value of the next frame, wherein, when it is necessary to increase the exposure, the exposure time is increased first until the exposure time reaches the preset upper limit of the exposure time before increasing the gain; when it is necessary to decrease the exposure, the gain is decreased first until the gain reaches the preset lower limit of the gain before decreasing the exposure time; and when acquiring the next frame image, performing exposure according to the exposure time and gain parameters of the next frame.

[0006] The above method introduces the brightness of a specific object area as a feedback basis and adopts differentiated exposure time and gain allocation priority according to different directions of increasing or decreasing exposure. This solves the problem that existing automatic exposure technology cannot take into account both motion blur and noise suppression in dynamic target recognition scenarios: when it is necessary to increase the exposure, the exposure time is increased first to avoid premature introduction of gain noise; when it is necessary to decrease the exposure, the gain is decreased first to quickly suppress noise, thereby significantly improving the target recognition success rate while ensuring the target brightness.

[0007] Preferably, the specific object includes faces, license plates, custom objects, and regions. The region where the specific object is located is a detection bounding box obtained by detecting the specific object. The image brightness value of the region where the specific object is located is the Y component value corresponding to each pixel of the YUV image within the detection bounding box. The object brightness value is the average of the image brightness values ​​within the detection bounding box. Using the Y component to calculate brightness results in low computational complexity, facilitates integration with the underlying automatic exposure module, and is suitable for various business objectives.

[0008] Preferably, the formula for calculating the target comprehensive exposure of the current frame is: ,in The target total exposure for the current frame. This represents the actual total exposure of the current frame. As a preset reference brightness value, β is the object's brightness value, and β is the convergence coefficient. and Here, 'clip' indicates that the value is constrained within a given range. This formula achieves a response to brightness errors, avoiding overshoot or oscillations caused by linear adjustment, and improving the stability of exposure convergence.

[0009] As a preferred option, the target's overall exposure in the current frame is obtained. Then, inter-frame smoothing is performed: the overall exposure of the target in the current frame is adjusted. Compared with actual total exposure Exponential smoothing is performed, and the amplitude of changes in a single frame is limited to obtain the overall exposure control amount for the next frame. The calculation formula is: Where λ is the smoothing coefficient. and These represent the maximum allowable drop and rise rates per frame, respectively. This effectively suppresses inter-frame exposure flicker caused by luminance statistical noise or target detection jitter, improving the video viewing experience.

[0010] Preferably, the maximum decrease Greater than the maximum increase The maximum decrease The configuration ranges from 0.25 to 0.40 EV, with a maximum increase in [unclear - possibly referring to a specific energy level]. The settings are 0.20–0.35 EV. This allows the system to suppress exposure more quickly when overexposed, reducing the duration of detail loss in highlight areas, while conservatively brightening when underexposed to avoid introducing excessive gain noise.

[0011] Preferably, the specific method for allocating the exposure time and gain parameters of the next frame based on the comprehensive exposure control amount of the next frame includes: if the comprehensive exposure control amount of the next frame... With the preset exposure time limit and preset gain lower limit satisfy This will change the exposure time of the next frame. Gain parameters for the next frame If the overall exposure control amount of the next frame With the preset exposure time limit and preset gain lower limit satisfy This will change the exposure time of the next frame. Gain parameters for the next frame This allocation formula is a further manifestation of the aforementioned exposure time and gain parameter allocation strategy. In low-light dynamic scenes, it prioritizes extending the exposure time to collect more photons, and prioritizes reducing the gain during bright field fallback to quickly clean up the image, thereby achieving the best balance between motion blur and noise.

[0012] Preferably, the preset exposure time upper limit Generally, the maximum exposure time allowed under the current frame rate and anti-flicker constraints is selected, and a preset gain lower limit is used. Choose the lowest gain allowed by the system to balance ghosting suppression and noise control.

[0013] Preferably, an upper limit, a lower limit, a lower limit, and an upper limit are preset for exposure control. When the object brightness value remains below the lower limit and the overall exposure control value for the next frame reaches the upper limit, supplementary lighting is increased or its intensity is raised. Conversely, when the object brightness value remains above the upper limit and the overall exposure control value for the next frame reaches the lower limit, supplementary lighting intensity is reduced or it is turned off. By controlling an external supplementary lighting device, object brightness is further improved when exposure time and gain adjustment capabilities reach their limits, thus expanding the method's adaptability to extreme environments.

[0014] Preferably, when no valid specific object is detected during specific object detection, a fallback strategy is executed: if the short-term hold condition is met, the exposure control of subsequent frames is performed using the most recently obtained comprehensive exposure control value driven by the specific object; if the short-term hold condition is not met, the system gradually transitions back to global automatic exposure mode. The short-term hold condition is determined based on at least one of the following: the number of consecutive frames in which valid specific objects are lost, the reliability of the specific object in the previous frame, the absolute value of the brightness error, and the device motion state. This fallback strategy can prevent an immediate switch back to global automatic exposure, which would cause a jump in screen brightness, when encountering situations such as occlusion, detection frame jitter, or short-term out-of-frame targets that lead to short-term object loss, thereby protecting the control results of the exposure parameter optimization mechanism.

[0015] Preferably, the short-term hold condition is based on the number of consecutive frames lost for a specific valid object, and the fallback strategy specifically includes: When the number of consecutive lost frames is less than the first preset threshold, the exposure control of subsequent frames is controlled by the most recent comprehensive exposure control value obtained by the specific object. When the number of consecutive lost frames is greater than or equal to the first preset threshold and less than the second preset threshold, the current comprehensive exposure control amount and the current global automatic exposure suggestion amount are fused according to weights to obtain a transitional exposure control amount, which is then used to control the exposure of subsequent frames. The weights include the weights of the comprehensive exposure control amount and the global automatic exposure suggestion amount. As the number of consecutive lost frames increases, the weight of the comprehensive exposure control amount gradually decreases, while the weight of the global automatic exposure suggestion amount gradually increases. When the number of consecutive frames in which a valid specific object is lost is greater than or equal to the second preset threshold, the exposure of subsequent frames is controlled by the suggested amount of global automatic exposure.

[0016] This graded rollback mechanism enables a smooth transition of the exposure state when a specific object is lost, avoiding repeated recalculation of the exposure control by different logics when the detection results are unstable, which could lead to sudden changes in image brightness and further improve the stability of the system.

[0017] Preferably, after calculating the target comprehensive exposure of the current frame and before determining the comprehensive exposure control amount for the next frame based on the target comprehensive exposure of the current frame, an overlay correction mode is also included: Obtain the current global automatic exposure suggestion and record it as the base comprehensive exposure. Based on basic overall exposure The final target exposure is calculated using either a correction overlay method or a weighted fusion method. ; The method of overlaying the correction amount includes, based on the object brightness value and preset reference brightness value Calculate brightness error The correction amount is determined based on the brightness error ΔY. Where k is a correction factor, the final target exposure is calculated according to the formula. ; The weighted fusion method includes determining a weight η based on object stability, detection confidence, and continuous loss states, and calculating the final target exposure using a formula. ,in This represents the overall exposure control value for the current frame. Using the final target exposure The value is updated to the target overall exposure of the current frame to participate in the calculation of the overall exposure control amount of the next frame.

[0018] This overlay correction mode allows for further correction of brightness deviations for specific objects while reusing the existing global automatic exposure framework. This preserves the stability of the underlying exposure strategy and achieves targeted exposure optimization for the main business.

[0019] Preferably, the correction coefficient k is determined based on the direction of the brightness error ΔY: when the brightness error ΔY ≥ 0, the correction coefficient is set to... ,in To adjust the correction factor upwards; when the brightness error ΔY < 0, set the correction factor upwards. ,in To lower the correction factor; the lowered correction factor Greater than the aforementioned upward adjustment correction factor And the downward adjustment correction coefficient For the aforementioned upward adjustment correction coefficient The adjustment correction factor is 1.2 to 1.5 times that of the previous value. Preferably, the upward adjustment correction coefficient is... It is 4 / 3 times the value of the correction factor. This correction factor is matched with the asymmetric exposure control strategy for the maximum rise / fall amplitude in this invention, which can achieve the effect of quickly darkening bright objects and gradually brightening dark objects.

[0020] This invention also proposes a control system for implementing the above-mentioned real-time image exposure control method for optimizing and adjusting exposure parameters, comprising: The image acquisition module is used to acquire the image of the current frame; The object detection module is used to detect specific objects in the current frame image and output the region where the specific object is located. The brightness statistics module is used to statistically calculate the brightness value of objects in the area where a specific object is located; The comprehensive exposure calculation module is used to determine the target comprehensive exposure of the current frame based on the object brightness value, the preset reference brightness value and the actual comprehensive exposure of the current frame. It is also used to determine the comprehensive exposure control amount of the next frame based on the target comprehensive exposure of the current frame. The parameter allocation module is used to allocate the exposure time and gain parameters of the next frame based on the comprehensive exposure control amount of the next frame. The execution module is used to perform exposure control based on the exposure time and gain parameters of the next frame when acquiring the next frame image.

[0021] Compared with existing technologies, this invention has at least the following advantages: By allocating exposure time before gain or gain reduction before exposure time reduction, the system is better positioned to balance brightness adjustment, motion blur control, and recognition performance in dynamic object recognition scenarios, thus improving the success rate of target recognition. Combined with specific methods such as object-specific brightness feedback, inter-frame smoothing limiting, and supplementary lighting, exposure control for continuous image capture is achieved. This invention also introduces a tiered backoff strategy, protecting the exposure control results generated by the aforementioned exposure parameter optimization mechanism that are more suitable for object recognition, preventing the optimized exposure control results from becoming invalid due to short-term object loss. Simultaneously, the backoff mechanism reduces computational requirements, effectively suppressing image brightness jumps. Furthermore, it can operate stably under different lighting conditions and target types, significantly improving the automatic exposure system's ability to adjust to specific business needs. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the overall process of the real-time image exposure control method according to an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the functional module structure of the real-time image exposure control system according to an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the exposure control sub-process of an embodiment of the present invention.

[0025] Figure 4 This is a schematic diagram of the rollback strategy sub-process of an embodiment of the present invention. Detailed Implementation

[0026] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0027] It should be noted that the terms "current frame," "previous frame," and "next frame" used in this article are merely logical designations for the convenience of describing the control flow. In a real system, they can correspond to adjacent image frames in the video acquisition sequence. The parameters involved can be configured by firmware, drivers, image signal processors, or application-layer algorithms based on hardware capabilities. Unless otherwise specified, operations such as multiplication, addition, amplitude limiting, maximum value, minimum value, and threshold comparison in this article can be implemented in software, firmware, hardware logic, or a combination of both.

[0028] Example 1

[0029] like Figure 1-3As shown, this embodiment provides a real-time image exposure control method. This method is applicable to scenarios requiring exposure optimization for specific objects, such as access control gates, license plate capture, and moving target tracking. These specific objects include faces, license plates, custom objects, or other specific areas. Based on underlying global automatic exposure, this method introduces local exposure correction centered on the brightness of specific objects. Through object brightness statistics, comprehensive exposure calculation, inter-frame smoothing limiting, and differentiated exposure time and gain allocation strategies, it achieves targeted exposure control for specific objects while also considering motion blur suppression and noise control.

[0030] Reference Figure 1 The method in this embodiment includes the following steps.

[0031] Step 1: Acquire the current frame image and perform specific object detection.

[0032] The exposure adjustment method in this embodiment is based on global automatic exposure. However, the method of this invention, after detecting a specific object, adjusts the exposure time and / or exposure gain based on the brightness of that specific object, making the camera more attentive to the subject than with ordinary global exposure. The specific object can be a face, license plate, custom object, or region of interest (ROI). The detection module responsible for detecting the specific object outputs the detection results, which include the detected specific object and its region, typically a rectangular detection box. Each frame's detection results include at least one detection box, and each detection box can generally be defined by its upper left corner coordinates. ,width and height This indicates that if no specific object is detected in the current frame, the exposure parameters for the next frame are adjusted by combining the most recent frame's overall exposure control value for the specific object with the global automatic exposure strategy, without executing subsequent object exposure adjustment steps.

[0033] Step 2: Calculate the brightness value of the area where the specific object is located.

[0034] Image data of the region containing a specific object is acquired. This embodiment uses the YUV color space, statistically analyzes the Y component values ​​of all pixels within the region, and calculates their average value as the object's brightness value. The system can use the formula Find the area of ​​the i-th specific object. And calculate the corresponding area percentage based on the current frame image resolution W×H. .like Greater than or equal to the preset effective area threshold If the i-th specific object is found to be valid, then it is considered valid; otherwise, it is considered invalid. The preset effective area threshold... The preferred value is 1 / 64, but it can also be configured to a nearby value within the range supported by the instruction manual, such as 1 / 80, 1 / 70, 1 / 60, etc., to adapt to different resolutions, lens focal lengths and recognition distances.

[0035] Obtain the YUV image data corresponding to the region where a specific object is located. In this embodiment, the Y component of all pixels within the detection box corresponding to the detected specific object is statistically analyzed, and the average value is used to obtain the object brightness value. When multiple specific objects exist, the one with the largest area can be selected for statistical analysis, or the average Y component of the detection boxes of all valid specific objects can be calculated. The formula for calculating the object brightness value is as follows: Where p∈S represents a pixel, and S is the set of pixels covered by the bounding box for a specific object. This represents the Y component of pixel p.

[0036] Using the average brightness of the Y component as the object brightness value has the following advantages: First, it directly corresponds to brightness information, facilitating integration with the underlying automatic exposure module; second, it has low computational complexity, requiring only summation and averaging of the target area; third, for embedded platforms, it eliminates the need for complex color space conversion and background segmentation, allowing for rapid acquisition of business-meaningful brightness feedback. Therefore, Y component statistics are more suitable for practical applications in specific object recognition fields such as access control and checkpoint products.

[0037] Step 3: Calculate the target's overall exposure in the current frame.

[0038] Obtaining object brightness value Then, the system compares it with a preset reference brightness value. By comparing the values, the brightness error can be obtained based on the difference or ratio. Preset reference brightness value It can be set according to the business scenario, sensor dynamic range, recognition algorithm requirements, and supplementary lighting mode. For example, in the normal access control daytime mode, a preset reference brightness value can be used. The brightness level can be set to medium-high to retain sufficient discernible details; different preset reference brightness values ​​can be used in nighttime fill light mode or infrared mode. Configuration.

[0039] Let the total exposure of the current frame be... The target total exposure is The target's overall exposure is calculated using the following formula: .

[0040] Where β is the convergence coefficient, used to adjust the system's response intensity to brightness errors; and These represent the minimum and maximum allowable total exposure, respectively. This means constraining 'a' within the interval Inside. When the object's brightness value Much lower than the preset reference brightness value At that time, brightness error The target's overall exposure is greater than 1. Tends to increase; when the object's brightness value Brightness higher than the preset reference value At that time, the target's total exposure The response speed can be controlled by adjusting the convergence coefficient β. When β is larger, the overall target exposure converges more actively, and when β is smaller, the overall target exposure is more stable. In this embodiment, the convergence coefficient β is 0.7.

[0041] Step 4: Perform inter-frame smoothing and limiting to obtain the overall exposure control amount for the next frame.

[0042] To avoid drastic changes in exposure parameters due to fluctuations in single-frame brightness statistics, this embodiment performs inter-frame smoothing and single-frame limiting on the target overall exposure. Specifically, based on the actual overall exposure of the current frame... Overall exposure with target Exponential smoothing is used to obtain the median value, and then its value is restricted relative to... The magnitude of the change is used to obtain the overall exposure control amount for the next frame. The calculation formula is as follows: .

[0043] Where λ is the smoothing coefficient, representing the degree to which the current frame follows the target exposure; and These represent the maximum allowable decrease and increase in brightness per frame, respectively. Compared to a simple method of roughly brightening or darkening based on upper and lower brightness limits, the above formulaic control offers greater adjustability and verifiability. Technicians can adjust β, λ, and ... , , and These parameters result in different convergence effects in different products and scenarios.

[0044] Step 5: Assign the exposure time and gain parameters for the next frame.

[0045] Obtain the overall exposure control amount for the next frame. Then, the system needs to map it to a specific exposure time and gain. Since excessively long exposure times can cause motion blur, and excessively high gains can introduce noise, this embodiment employs a physically meaningful allocation strategy: when increasing exposure, it prioritizes increasing the exposure time, only increasing the exposure time when the exposure time reaches a preset upper limit. Only then should the gain be increased; when reducing exposure, the gain should be decreased first, and only when the gain reaches the preset lower limit should the increase be made. Only then should the exposure time be further reduced. The core of this strategy is to use the exposure time as much as possible to obtain more effective photons in dark conditions to avoid prematurely increasing the gain and causing noise degradation; while prioritizing gain recovery during the bright field decline helps to quickly suppress noise and restore image clarity.

[0046] like Figure 3 As shown, in a specific implementation, to map the overall exposure control quantity to specific exposure time and gain parameters, an approximate relationship can be established between the overall exposure quantity EV, exposure time T, and exposure gain G: EV≈T×G. Here, EV represents the overall exposure quantity at any given time, which in this embodiment corresponds to the overall exposure control quantity of the next frame after smoothing and clipping processing. T and G represent the exposure time and exposure gain corresponding to the overall exposure, respectively.

[0047] Based on the above relationship, in obtaining Then, provided that hardware constraints are met, the overall exposure control amount for the next frame can be adjusted. Decomposed into the exposure time of the next frame and gain Specifically, it can be based on the preset maximum exposure time. Compared with the preset gain lower limit Determine the allocation strategy: when When this is the case, it is preferable to maintain the gain at the preset lower gain limit. and according to Calculate the exposure time, that is, the exposure time of the next frame. Exposure gain in the next frame ; when When this is the case, it is preferable to maintain the exposure time at the preset upper limit. and according to Calculate the exposure gain, which is the exposure time for the next frame. Exposure gain in the next frame .

[0048] Among them, the upper limit of the preset exposure time Generally determined based on system frame rate constraints and anti-ghosting requirements, it can be understood as the maximum allowable exposure time while ensuring image motion sharpness and inter-frame stability. In a specific implementation, a preset upper limit for exposure time is usually set. ,in This is a scaling factor for a single frame's duration. , This refers to the system frame rate. The scaling factor is... The appropriate option can be selected based on the application scenario. In relatively static scenarios such as access control, one option can be chosen. In scenes involving checkpoint capture or moving faces, to suppress motion blur, a smaller value is preferred, for example... Those skilled in the art can adjust and confirm the upper limit of the preset exposure time based on the estimation results, taking into account the actual situation.

[0049] The preset gain lower limit Generally, the lowest gain allowed by the system is chosen, such as 1x or the minimum analog gain value corresponding to the platform. If necessary, a higher gain limit can be set. Exposure time limit Equal boundary constraints are used to ensure that all control parameters are within the limits allowed by the hardware.

[0050] By using the above segmented allocation method, when increasing the exposure, the exposure time can be increased first, and the gain can be increased after the exposure time reaches the upper limit; when decreasing the exposure, the gain can be decreased first, and the exposure time can be decreased after the gain reaches the lower limit, thereby achieving a balance between image noise control and motion blur suppression.

[0051] For platforms that support separate control of analog and digital gain, the allocation of exposure gain can be further subdivided into prioritizing the increase of analog gain, and then increasing digital gain after reaching the upper limit; or different strategies can be adopted in different business modes. For example, in high-fidelity recognition mode, analog gain is prioritized to a lower level to ensure a balance between noise and detail; in emergency mode for extremely dark environments, digital gain can be appropriately increased to improve visibility. Regardless of the variation, it can be regarded as a specific implementation of the idea of ​​updating exposure time and / or gain parameters according to the comprehensive exposure control amount in this invention.

[0052] To further illustrate the rationality of the above-mentioned method of allocating exposure time before gain and reducing gain before reducing exposure time, this embodiment further illustrates this with comparative tests of dynamic face scenes.

[0053] In low-light dynamic face entry scenarios, using the same hardware platform, face detection and recognition model, and the same resolution and frame rate conditions, different exposure time and gain allocation strategies were compared. Specifically, the verification scheme of this invention prioritizes adjusting the exposure time during the brightening phase, adjusting the gain only after the exposure time reaches a preset upper limit; during the darkening phase, it prioritizes reducing the gain, reducing the exposure time only after the gain falls back to a preset range. Control group 1 and control group 2 were set up. Control group 1 prioritizes adjusting the gain during the brightening phase and prioritizing reducing the exposure time during the darkening phase; control group 2 synchronously adjusts the exposure time and gain at a fixed ratio during both the brightening and darkening phases. Test results show that, under the premise that the brightness of the target face area meets business requirements, the verification scheme of this invention has an average trailing length of approximately 12 pixels, a recognition success rate of approximately 95%, and an average recognition score of approximately 0.9; control group 1 has an average trailing length of approximately 3 pixels, but a recognition success rate of approximately 20% and an average recognition score of approximately 0.4; control group 2 has an average trailing length of approximately 38 pixels, a recognition success rate of approximately 85%, and an average recognition score of approximately 0.7.

[0054] The above results demonstrate that in dynamic object recognition scenarios, parameter configuration should not solely pursue minimizing motion blur or maximizing brightness, but rather strike a balance around recognition effectiveness. Prioritizing exposure time adjustment and increasing gain only after reaching the upper limit of exposure time can significantly improve the recognition rate while keeping motion blur under control; prioritizing gain recovery when scene brightness recovers helps reduce the impact of amplification on recognition stability. Therefore, the comprehensive exposure control in claims 8 and 9, and , Boundary constraints provide clear business objectives and experimental support.

[0055] Step 6: Perform exposure control.

[0056] The calculated exposure time and gain parameters for the next frame and The data is sent to the image acquisition module, which performs exposure control according to the new exposure time and gain parameters when acquiring the next frame. Steps 1-6 are executed repeatedly to achieve real-time image control.

[0057] While performing the above steps, a rollback strategy is also set.

[0058] In continuous video stream processing, the detection results of specific objects may experience brief interruptions, such as rapid object deflection, brief occlusion by other objects, jitter in the detection algorithm itself, or the object briefly moving out of the frame edge. If the system immediately abandons the optimized exposure control and switches back to global automatic exposure after each lost object frame, the brightness state adjusted in the previous stage will be destroyed, and the image may flicker noticeably due to frequent switching of control logic. Therefore, this embodiment introduces a tiered backoff strategy based on the number of consecutive lost frames, such as... Figure 4 As shown, the consecutive lost frame count is the number of consecutive frames in which no valid specific object is detected.

[0059] Based on the number of consecutively lost frames, there are three cases.

[0060] When consecutive frames are lost Less than the first preset threshold If the specific object is only briefly lost, it is determined to be a short-term holding phase. The exposure control of subsequent frames is maintained based on the most recent comprehensive exposure control value driven by the specific object.

[0061] When consecutive frames are lost Reaching or exceeding the first preset threshold However, the second preset threshold was not reached. If the object is in a transitional state, it is considered to be in the blending phase. A specific object may have already left the frame, requiring a gradual reduction in the local exposure control weight and a fallback to global automatic exposure mode. During this phase, the overall exposure control weight for the current frame is adjusted. and current global automatic exposure suggestion Weighted fusion is performed to obtain the overexposure control amount, i.e. ,in The weight of the overall exposure control is gradually reduced as the number of lost frames increases. The weight for global automatic exposure gradually increases as the number of lost frames increases.

[0062] As the number of lost frames increases, the fusion weights gradually shift towards the global automatic exposure side. Exceeding the second preset threshold If the time is too low, it is determined to be a complete rollback phase, and the system will completely roll back to global automatic exposure.

[0063] If the system detects a specific object again for multiple consecutive frames at any stage of the rollback strategy, it exits the rollback state and resumes the object-driven exposure control process of steps S1 to S6.

[0064] While performing the above steps, a supplementary lighting linkage control is also set up.

[0065] In extreme environments with severely insufficient or excessive lighting, adjusting exposure time and gain alone may not be sufficient. Therefore, this embodiment further provides supplementary lighting linkage control. The system presets an upper limit for exposure control. Lower limit , as well as the lower limit and upper limit of detection brightness.

[0066] When the object brightness value If the brightness is below the detection limit for N consecutive frames, and the overall exposure control value in the next frame is... The preset exposure control limit has been reached or is close to being reached. When the system determines that the ambient illuminance is severely insufficient, it sends a brightening command to the external supplementary lighting equipment to increase the existing supplementary lighting intensity. The threshold N can be determined based on the system frame rate and the supplementary lighting response speed, preferably 3 to 8 frames, and more preferably 5 frames. Under video capture conditions of 25 fps to 30 fps, selecting 5 frames as the duration threshold for severe insufficient or excessive lighting can both filter out single-frame brightness statistical jitter and ensure that the supplementary lighting linkage has a fast response speed.

[0067] When the object brightness value If the brightness exceeds the detection limit for N consecutive frames, and the overall exposure control value in the next frame is... The lower limit has been reached or is close to the limit. When the system determines that the ambient light is too strong, it issues a command to reduce the intensity of the supplementary light or turn off the supplementary light.

[0068] The intensity of the fill light can be adjusted linearly or incrementally to avoid screen flickering caused by sudden changes in fill light. This linkage mechanism expands the applicability of this method, enabling it to achieve appropriate object brightness even in extremely low light or strong backlighting scenarios.

[0069] This embodiment also provides a control system for implementing the above method. (Refer to...) Figure 2 The system includes the following modules.

[0070] The image acquisition module is used to acquire the current frame image. This module includes an image sensor and its driver interface, and is responsible for outputting the raw image or a preprocessed YUV image.

[0071] The object detection module is used to detect specific objects in the current frame image and output the region where the specific object is located. This module can be implemented based on deep learning or traditional vision algorithms, depending on the application scenario.

[0072] The brightness statistics module is used to statistically calculate the brightness value of the area where a specific object is located. This module reads the detection results output by the object detection module, obtains the pixel data of the corresponding area from the image acquisition module, and calculates the object brightness value by averaging the values.

[0073] The overall exposure calculation module is used to determine the target overall exposure of the current frame based on the object brightness value, the preset reference brightness value and the actual overall exposure of the current frame, and to perform inter-frame smoothing to determine the overall exposure control amount of the next frame.

[0074] The parameter allocation module is used to allocate the exposure time and gain parameters of the next frame based on the comprehensive exposure control amount of the next frame, execute the differential allocation rule in step S5, and output the exposure time and gain parameters of the next frame.

[0075] The execution module is used to perform exposure control based on the exposure time and gain parameters of the next frame when acquiring the next frame image, that is, to write the exposure time and gain parameters of the next frame into the register of the image acquisition module or send them through the ISP interface.

[0076] As a preferred embodiment of this example, the system may further include a rollback module, which is used to determine, based on short-term holding conditions, whether to maintain the most recently obtained comprehensive exposure control value driven by the target object, or to fuse it with the global automatic exposure suggestion value, or to completely roll back to the global automatic exposure mode when there is no valid specific object in the current frame, and output the final control value to the parameter allocation module.

[0077] The above modules can be integrated into the same processor and implemented in software or firmware, or partially implemented by hardware logic. During system operation, each module executes the steps described in the method to form real-time image exposure control.

[0078] In terms of parameter calibration, this embodiment can first collect test data in a standard lighting test chamber for typical scenarios such as normal illuminance, backlight illuminance, direct strong light, locally bright background, and low-illuminance supplemental lighting. Then, based on indicators such as recognition success rate, subjective image perception, face region clarity, overexposed area ratio, convergence frame count, and inter-frame brightness jitter, the preset reference brightness value is calibrated. Convergence coefficient β, smoothness coefficient λ, and maximum single-frame increase in overall exposure. Maximum drop in a single frame Exposure time limit and exposure gain lower limit Joint optimization is performed. On some platforms, initial parameter combinations can be determined using offline grid search or empirical trial-and-error methods; on other platforms, multiple sets of parameter templates can be pre-set according to different lenses, sensors, and installation angles, allowing maintenance personnel to fine-tune them using configuration tools. This calibration mechanism makes the solution of this invention engineering-feasible.

[0079] Based on the experimental verification results and typical business scenarios of this invention, optimal parameter configurations were set. Specifically, the convergence coefficient β can be configured from 0.55 to 0.85, with a default optimal value of approximately 0.70; the smoothing coefficient λ can be configured from 0.30 to 0.55, with a default optimal value of approximately 0.40; if the platform expresses the overall exposure in equivalent EV steps, then... Configurable to 0.20–0.35 EV, maximum drop per frame. It can be configured to 0.25–0.40 EV, and preferably uses the maximum drop amplitude per frame. Slightly greater than the maximum rise in a single frame Asymmetric settings; for dynamic face recognition modes such as access control and checkpoints, the upper limit of exposure time. The optimal setting is between 1 / 100 s and 1 / 60 s, and it can be mapped to the corresponding candidate exposure time in conjunction with the anti-flicker setting; lower limit of exposure gain. The minimum analog gain or minimum effective total gain allowed by the platform should be selected.

[0080] In low-light dynamic face entry scenarios, β can be appropriately increased while λ is kept at a moderate value to improve the target brightness enhancement speed. In strong direct light or strong backlight scenarios, β should be appropriately reduced, λ should be kept in a moderately conservative range, and the maximum decrease in single frame should be appropriately increased. This allows for faster suppression of overexposure and preservation of facial details. In scenes where faces enter / exit the frame, the λ and single-frame variation can be further tightened to coordinate with hold and back logic to reduce inter-frame jumps. For devices heavily constrained by platform frame rate, flicker prevention, sensor sensitivity, and gain link, the above range can be used as a typical interval and accessed by mode through the online parameter management table.

[0081] Example 2

[0082] In some platforms, the underlying global automatic exposure mechanism may already include mechanisms such as a global metering window, histogram statistics, and flicker-resistant control. For such cases, this embodiment, based on Embodiment 1, further provides an exposure control method that calculates the target's overall exposure based on the brightness of a specific object, in addition to the method described in Embodiment 1. Unlike other methods, this embodiment uses an overlay correction mode to access the underlying automatic exposure strategy. The recommended amount of the underlying automatic exposure is corrected based on the brightness result of a specific object. The method described in this embodiment specifically includes the following steps.

[0083] First, obtain the automatic exposure suggestion output by the underlying global automatic exposure strategy. This suggestion is usually calculated based on the brightness statistics, histogram, or metering window of the entire frame image. The automatic exposure suggestion can be expressed as exposure time, gain parameter, or overall exposure value. When it is expressed as an overall exposure value, the underlying automatic exposure suggestion can be recorded as the basic overall exposure value. Alternatively, the exposure time and gain parameters given by the underlying automatic exposure can be converted into the basic overall exposure. .

[0084] According to the method described in steps 1 to 4 of Example 1, obtain the object brightness value of the current frame. Calculate the brightness error The correction amount is determined based on the brightness error. , where k is the correction factor; when Below When the correction is positive, it is used to increase the base overall exposure. ;when Higher than When the correction is negative, it is used to reduce the base overall exposure. The correction amount is then added to the base total exposure to obtain the final target exposure. .

[0085] In one specific implementation, the correction coefficient k is determined using a piecewise assignment method based on the direction of the brightness error ΔY. Specifically, when ΔY≥0, it indicates that the brightness of a specific object area is lower than a preset reference brightness value, and a correction needs to be applied to the basic comprehensive exposure. Increase exposure on top of that, at this time When ΔY < 0, it indicates that the brightness of a specific object area is higher than the preset reference brightness value, and the basic comprehensive exposure needs to be adjusted. Reduce the exposure based on this, at this time .in, To adjust the correction factor upwards, To lower the correction factor, and In order to correspond with the "maximum decrease" in this invention Greater than the maximum increase This is in line with the asymmetric exposure control strategy. Can be set to It is 1.2 to 1.5 times that of the original, preferably 4 / 3 times.

[0086] For example, in the 8-bit Y component brightness range, it can be set to =0.003, =0.004. At this time, and The difference is 0.001. for This is 4 / 3 times the adjustment factor, meaning the downward adjustment increases the correction factor by approximately 33.3% compared to the upward adjustment. Through this difference in adjustment, when the object area is overexposed, the system can reduce the final target exposure with a relatively larger correction factor. When the target area is too dark, the system uses a relatively small correction factor to increase the final target exposure. This allows for the correction of object brightness by quickly darkening bright areas and gently brightening dark areas while maintaining the stability of the underlying global automatic exposure strategy.

[0087] As another specific implementation method, if the above-mentioned correction and overlay method is not used, a weighted fusion method can also be used to obtain the final target exposure. The weighted fusion formula is: η is the weight, dynamically adjusted based on object stability, confidence level, and consecutive loss states. This represents the overall exposure control amount for the current frame. The statistical method is the same as in Example 1.

[0088] With the ultimate goal of exposure The value was updated to reflect the original target total exposure. Continue calculating the overall exposure control amount for the next frame. Obtain the overall exposure control value for the next frame. Then, the exposure time and gain parameters of the next frame are updated in the same way as in Example 1, and the image exposure of the next frame is adjusted, which will not be described again here.

[0089] In this way, the equipment can retain the reliability of a mature underlying automatic exposure framework while also gaining targeted exposure correction capabilities around the subject.

[0090] Example 3

[0091] Based on Example 1, this embodiment considers the adaptation issues under different frame rates and anti-flicker conditions, and adopts adaptive configuration for the smoothing coefficient and limiting threshold to further improve the system's adaptability in different scenarios.

[0092] In 50Hz or 60Hz mains lighting environments, the exposure time typically needs to be compatible with the anti-flicker cycle; otherwise, bright and dark stripes or screen flickering may occur. Therefore, the exposure time of the next frame... Before sending the data, it can be mapped to a set of candidate exposure times that meet the anti-flicker constraints, and then combined with the comprehensive exposure control amount of the next frame. Adjust the gain to compensate for the difference. For example, when the device is operating at 25fps and the 50Hz anti-flicker mode is enabled, the exposure time is preferably no more than the upper limit that matches the flicker period; if the ideal exposure time calculated based on the brightness error exceeds this upper limit, the system compensates by increasing the gain or adding light.

[0093] Specifically, the smoothing coefficient λ can be dynamically adjusted based on the absolute value of the brightness error |ΔY|, and the maximum increase in the overall exposure per frame. and the maximum drop in a single frame When |ΔY| is large, it indicates a significant exposure deviation. To accelerate convergence, λ and the allowable change range per frame (maximum increase per frame) can be appropriately increased. or the maximum drop in a single frame When |ΔY| is small, it indicates that the system is close to a stable state. Therefore, λ and the allowable variation range per frame are reduced to avoid video flickering caused by minor fluctuations. Optionally, the system can also comprehensively determine the parameter set based on motion state, scene mode, lighting status, and detection stability to achieve more precise control.

[0094] In continuous video monitoring mode, Example 1 can also record the exposure control trajectory over a period of time and analyze the trend of ambient illuminance changes accordingly. If the brightness of a specific object remains consistently low for several consecutive seconds and the overall exposure control value in the next frame... It has been approaching the upper limit of the preset exposure control amount for a long time. If the system detects a persistent lack of illumination in the current environment, it can report this status to upper-layer services to trigger supplementary lighting switching, installation location prompts, or maintenance suggestions. If the system is consistently located at the edge of overexposure, it can prompt the user to reduce the supplementary lighting intensity or reconfigure the lens orientation. Through this additional diagnostic capability, the present invention can also provide data support for equipment maintenance and scene optimization.

[0095] Example 4

[0096] This embodiment, based on embodiment 1, further enhances the robustness of the system by introducing an anomaly protection mechanism.

[0097] If the detection module has no output for an extended period, the brightness value of the area containing a specific object is abnormally zero, the image acquisition module reports severe overexposure / underexposure, exposure time or gain transmission fails, or the device is in a resolution or bitstream switching state, the system can temporarily revert to the safe default mode. The safe default mode is preferably global automatic exposure control, and the most recent set of stable parameters is retained as the fault recovery baseline. This can prevent image acquisition stability from being affected by upper-layer algorithm anomalies.

[0098] To facilitate understanding of the effects of the present invention, several typical scenarios are described below.

[0099] In backlit scenarios where an indoor access control system faces an outdoor glass door, traditional global automatic exposure is easily affected by the bright outdoor background, causing the user's face on the indoor side to appear dark overall. Using the method described in this invention, the system first detects a face recognition target near the device, then calculates the average brightness of the Y component around the target face and increases the overall exposure. Simultaneously, it uses amplitude limiting smoothing to avoid image flickering caused by sudden changes in background brightness, thereby making the user's facial details clearer.

[0100] In nighttime vehicle entry scenarios at lane checkpoints, vehicle lights and ambient light boxes can easily create localized glare, causing traditional automatic exposure to frequently oscillate between the headlights and the driver's face. Using the method described in this invention, the system targets the driver's face, which is relatively large and close to the center, and prioritizes adjusting the exposure based on its brightness deviation. If necessary, supplementary lighting is used to improve facial visibility, thereby reducing the suppression of the recognition image by the vehicle lights.

[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any brief modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A real-time image exposure control method, characterized in that, include: Based on global automatic exposure, the current frame image is acquired, and specific object detection is performed on the current frame image; The image brightness value of the region where a specific object is located in the current frame image is statistically analyzed, and the object brightness value is calculated. Based on the object brightness value, the preset reference brightness value, and the actual comprehensive exposure of the current frame, the target comprehensive exposure of the current frame is calculated. The overall exposure control value for the next frame is determined based on the target overall exposure value of the current frame, and the exposure time and gain parameters for the next frame are allocated according to the overall exposure control value of the next frame. Specifically, when it is necessary to increase the exposure, the exposure time is increased first until the exposure time reaches the preset upper limit of the exposure time before the gain is increased. When it is necessary to decrease the exposure, the gain is decreased first until the gain reaches the preset lower limit of the gain before the exposure time is decreased. When acquiring the next frame of image, exposure is performed according to the exposure time and gain parameters of the next frame.

2. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 1, characterized in that, The specific objects include faces, license plates, custom objects, and regions. The region where the specific object is located is the detection box obtained by detecting the specific object. The image brightness value of the region where the specific object is located is the Y component value corresponding to each pixel of the YUV image within the detection box. The object brightness value is the average value of the image brightness values ​​within the detection box.

3. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 1, characterized in that, The formula for calculating the target comprehensive exposure of the current frame is: ,in The target total exposure for the current frame. This represents the actual total exposure of the current frame. To preset the reference brightness value, β is the object's brightness value, and β is the convergence coefficient. and These are the preset minimum and maximum overall exposure values, respectively. "clip" indicates that the value is constrained within a given range.

4. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 3, characterized in that, The process of determining the overall exposure control value for the next frame based on the target overall exposure value of the current frame specifically includes: determining the target overall exposure value of the current frame... Compared with actual total exposure Exponential smoothing is performed, and the amplitude of changes in a single frame is limited to obtain the overall exposure control amount for the next frame. The calculation formula is: Where λ is the smoothing coefficient. and These represent the maximum allowable drop and maximum allowable rise in a single frame, respectively.

5. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 4, characterized in that, The maximum decrease Greater than the maximum increase The maximum decrease The configuration ranges from 0.25 to 0.40 EV, with a maximum increase in [unclear - possibly related to power consumption]. The power output is configured to be 0.20 to 0.35 EV.

6. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 1, characterized in that, The specific method for allocating the exposure time and gain parameters of the next frame based on the comprehensive exposure control amount of the next frame includes: If the overall exposure control amount of the next frame With the preset exposure time limit and preset gain lower limit satisfy This will change the exposure time of the next frame. Gain parameters for the next frame ; If the overall exposure control amount of the next frame With the preset exposure time limit and preset gain lower limit satisfy This will change the exposure time of the next frame. Gain parameters for the next frame ; The preset exposure time upper limit Generally, the maximum exposure time allowed under the current frame rate and anti-flicker constraints is selected, and a preset gain lower limit is used. Take the lowest gain allowed by the system.

7. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 6, characterized in that, The system presets an upper limit for exposure control, a lower limit for exposure control, a lower limit for detection brightness, and an upper limit for detection brightness. When the object brightness value is continuously lower than the lower limit for detection brightness and the overall exposure control value of the next frame reaches the upper limit for exposure control, the system increases supplementary light or increases the intensity of supplementary light. When the object brightness value is continuously higher than the upper limit for detection brightness and the overall exposure control value of the next frame reaches the lower limit for exposure control, the system decreases the intensity of supplementary light or turns off supplementary light.

8. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 1, characterized in that, When a valid specific object is not detected during the specific object detection process, a fallback strategy is executed: if the short-term hold condition is met, the exposure control of subsequent frames is performed using the most recent comprehensive exposure control value obtained by the specific object driver; if the short-term hold condition is not met, the system gradually transitions back to the global automatic exposure mode; the short-term hold condition is determined based on at least one of the following: the number of consecutive frames in which valid specific objects are lost, the reliability of the specific object in the previous frame, the absolute value of the brightness error, and the device motion state.

9. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 8, characterized in that, The short-term hold condition is based on the number of consecutive frames lost for a specific valid object, and the fallback strategy specifically includes: When the number of consecutive lost frames is less than the first preset threshold, the exposure control of subsequent frames is controlled by the most recent comprehensive exposure control value obtained by the specific object. When the number of consecutive lost frames is greater than or equal to the first preset threshold and less than the second preset threshold, the current comprehensive exposure control amount and the current global automatic exposure suggestion amount are fused according to weights to obtain a transitional exposure control amount, which is then used to control the exposure of subsequent frames. The weights include the weights of the comprehensive exposure control amount and the global automatic exposure suggestion amount. As the number of consecutive lost frames increases, the weight of the comprehensive exposure control amount gradually decreases, while the weight of the global automatic exposure suggestion amount gradually increases. When the number of consecutive frames in which a valid specific object is lost is greater than or equal to the second preset threshold, the exposure of subsequent frames is controlled by the suggested amount of global automatic exposure.

10. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 1, characterized in that, After calculating the target overall exposure of the current frame and before determining the overall exposure control amount for the next frame based on the target overall exposure of the current frame, an overlay correction mode is also included: Obtain the current global automatic exposure suggestion and record it as the base comprehensive exposure. Based on basic overall exposure The final target exposure is calculated using either a correction overlay method or a weighted fusion method. ; The method of overlaying the correction amount includes, based on the object brightness value and preset reference brightness value Calculate brightness error The correction amount is determined based on the brightness error ΔY. Where k is a correction factor, the final target exposure is calculated according to the formula. ; The weighted fusion method includes determining a weight η based on object stability, detection confidence, and continuous loss states, and calculating the final target exposure using a formula. ,in This represents the overall exposure control value for the current frame. Using the final target exposure The value is updated to the target overall exposure of the current frame to participate in the calculation of the overall exposure control amount of the next frame.

11. The real-time image exposure control method for optimizing and adjusting exposure parameters according to claim 10, characterized in that, The correction coefficient k is determined based on the direction of the brightness error ΔY: When the brightness error ΔY≥0, let the correction coefficient be... ,in To adjust the correction factor upwards; When the brightness error ΔY < 0, let the correction coefficient be... ,in To lower the correction factor; The reduction correction coefficient Greater than the aforementioned upward adjustment correction factor And the downward adjustment correction coefficient For the aforementioned upward adjustment correction coefficient 1.2 to 1.5 times that.

12. A control system for implementing the real-time image exposure control method for optimizing and adjusting exposure parameters as described in any one of claims 1-10, characterized in that, include: The image acquisition module is used to acquire the image of the current frame; The object detection module is used to detect specific objects in the current frame image and output the region where the specific object is located. The brightness statistics module is used to statistically calculate the brightness value of objects in the area where a specific object is located; The comprehensive exposure calculation module is used to determine the target comprehensive exposure of the current frame based on the object brightness value, the preset reference brightness value and the actual comprehensive exposure of the current frame. It is also used to determine the comprehensive exposure control amount of the next frame based on the target comprehensive exposure of the current frame. The parameter allocation module is used to allocate the exposure time and gain parameters of the next frame based on the comprehensive exposure control amount of the next frame. The execution module is used to perform exposure control based on the exposure time and gain parameters of the next frame when acquiring the next frame image.