Partitioned exposure and image enhancement method and device for access control snapshot, equipment and medium

CN123020963APending Publication Date: 2026-10-30SHENZHEN PUHUI ZHIWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611487534.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

该做法能改善欠曝,但带来眩光、功耗、散热、灯珠寿命和夜间扰民等问题,也不利于低功耗端侧AI相机长期值守

Benefits of technology

本发明实施例提供的一种面向门禁抓拍的分区曝光与图像增强方法、装置、设备及介质,本方法将以人脸ROI为锚的分区测光、自适应的增强曝光路径选择、按需脉冲补光以及基于综合质量分确定输出帧构建为端侧链路上的完整闭环控制,相较于传统方案中全局测光、常亮补光、单向抓拍的孤立模式,本发明实施例在少用甚至不用大功率补光的前提下,同步解决了人脸欠曝与高光过曝的矛盾,显著降低了补光功耗与硬件成本,并大幅减少了因单帧失败导致的识别漏报。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020963A_ABST
    Figure CN123020963A_ABST
Patent Text Reader

Abstract

The application discloses a kind of partition exposure and image enhancement method, device, equipment and medium for access control snapshot, the method includes: face detection processing is carried out to preview frame, and the face ROI after extension is generated;Partion photometry is carried out, and face area brightness, highlight area brightness and background area brightness are obtained;Capture frame after detecting the face in the process of snapshot is collected, and the exposure enhancement path executed to the capture frame is determined;When the face signal-to-noise ratio corresponding to the capture frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, pulse light compensation synchronized with shutter is executed;The integrated quality score of the capture frame is calculated, if the integrated quality score reaches the preset standard, the current capture frame is output as output frame and the current round of snapshot is ended.The application synchronously solves the contradiction between face underexposure and highlight overexposure under the premise of using less or even no high-power light compensation, significantly reduces light compensation power consumption and hardware cost, and greatly reduces the identification false negatives caused by single frame failure.
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 in particular to a method, apparatus, device, and medium for zoned exposure and image enhancement for access control and image capture. Background Technology

[0002] At access control camera locations such as stairwells, unit doors, and underground parking garage entrances, passersby are often in a backlit geometric relationship where the back is bright and the front is dark: strong light from outside or at the end of the corridor enters the lens from behind the subject, and the face falls into shadow.

[0003] When the image sensor measures the average brightness of the entire image or uses highlight protection metering, faces are underexposed and appear dark, significantly increasing the failure rate of end-side face detection and 1:N recognition.

[0004] Current engineering practices involve adding high-power visible light / infrared supplementary lights that are constantly on or triggered by human body sensors to artificially boost facial brightness. While this approach can improve underexposure, it introduces issues such as glare, power consumption, heat dissipation, LED lifespan, and noise pollution at night. It is also not conducive to the long-term operation of low-power edge AI cameras.

[0005] Therefore, there is an urgent need for a new solution for zoned exposure and image enhancement for access control and image capture. Summary of the Invention

[0006] In view of the above problems, the present invention is proposed to provide a method, apparatus, device and medium for partitioned exposure and image enhancement for access control capture that overcomes or at least partially solves the above problems.

[0007] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.

[0008] According to a first aspect of the present invention, a method for partitioned exposure and image enhancement for access control image capture is provided, comprising the following steps: S1. Based on the current exposure, collect a preview frame, perform face detection processing on the preview frame, and when a face is detected, generate an expanded face ROI; S2. Perform regional metering. Based on the face ROI, divide the preview frame into three regions: face region, highlight region, and background region. Calculate the brightness of each region to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. S3. Calculate the backlight index and underexposure flag based on the brightness of the face area and the brightness of the highlight area, respectively; calculate the face target exposure based on the current exposure and the brightness of the face area, and calculate the highlight protection exposure based on the current exposure and the brightness of the highlight area; calculate the dynamic range ratio based on the face target exposure and the highlight protection exposure; calculate the face signal-to-noise ratio based on the brightness of the face area. S4. After the face is detected during the capture process, capture frames are collected. Based on the backlight index, underexposure flag and dynamic range ratio, an exposure enhancement path is determined for the capture frames. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. S5. When the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, pulse fill light is performed synchronously with the shutter, and the pulse width of the pulse fill light does not exceed the current exposure time. S6. Calculate the overall quality score for the captured frame. If the overall quality score reaches the preset standard, output the current captured frame as the output frame and end the current capture round. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, perform zonal metering again after a delay, and adjust the exposure enhancement path or pulse fill light to capture a new captured frame. If the number of captures has reached the preset limit, output the captured frame with the highest overall quality score in the current buffer as the output frame.

[0009] In some embodiments of the present invention, step S1, generating the expanded face ROI, includes: The preview frame is subjected to face detection processing, and a face detection box is generated when a face is detected; Using the center of the face detection box as the origin, the width and height of the face detection box are simultaneously enlarged based on an expansion factor to obtain an enlarged rectangular area as the face ROI; the value range of the expansion factor is 1.10~1.30.

[0010] In some embodiments of the present invention, step S2, which involves dividing the preview frame into three regions—a face region, a highlight region, and a background region—and calculating the brightness of each region, includes: The set of all pixels in the preview frame whose brightness values ​​are greater than a preset highlight threshold is divided into a highlight area, and the brightness of the highlight area is taken as the 90th percentile of the brightness values ​​of all pixels in the highlight area; The region where the face ROI is located is taken as the face region, and the brightness of the face region is taken as the median of the brightness values ​​of all pixels in the face region; The area on the preview frame excluding the highlight area and the face area is divided into a background area, and the brightness of the background area is taken as the median of the brightness values ​​of all pixels in the background area.

[0011] In some embodiments of the present invention, step S4, which involves determining the exposure enhancement path to be performed on the captured frame based on the backlight index, underexposure flag, and dynamic range ratio, includes: Based on the backlight index and underexposure flag, it is confirmed whether the current capture frame is in a non-backlight and non-underexposure state. If the current capture frame is in a non-backlight state, the exposure enhancement path executed is normal exposure capture. If the current captured frame is in a backlit and underexposed state, then confirm whether the dynamic range ratio is greater than the preset dynamic range ratio threshold. When the dynamic range ratio is less than or equal to the preset dynamic range ratio threshold, the exposure enhancement path executed is face ROI weighted single exposure; When the dynamic range ratio is greater than the preset dynamic range ratio threshold, the exposure enhancement path executed is short and long frame region exposure fusion or AI-ISP single frame enhancement.

[0012] In some embodiments of the present invention, step S5, wherein performing pulsed illumination synchronized with the shutter includes: The pulsed fill light is off by default. It is only emitted within the shutter window when the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, the underexposure flag is true, the brightness of the face area is less than the preset fill light trigger brightness, and fill light is allowed in this round.

[0013] In some embodiments of the present invention, the method further includes: if the brightness of the highlight area exceeds a preset highlight protection threshold after the pulse fill light is applied, then the current of the pulse fill light is reduced or the pulse fill light is turned off, and only the exposure fusion of the short and long frame regions or the AI-ISP single frame enhancement is retained for the executed exposure enhancement path.

[0014] In some embodiments of the present invention, in step S6, the comprehensive quality score Q is calculated using the following formula: ; In the formula, For luminance components, For clarity components, For attitude components, For signal-to-noise ratio components, For the integrity component, , , , , These are the weights corresponding to each component; The brightness component Based on the brightness of the face region; the sharpness component The pose components are obtained by calculating the Laplacian variance of the face region. The signal-to-noise ratio component is obtained by estimating the yaw and pitch angles through key points in the face region. The completeness component is obtained based on the face signal-to-noise ratio. This refers to the proportion of the area within the captured frame where the face detection bounding box falls.

[0015] According to a second aspect of the present invention, a partitioned exposure and image enhancement device for access control snapshot is provided, applied to the method described in any one of claims 1-7, characterized in that the device comprises: The face detection module is used to collect preview frames based on the current exposure, perform face detection processing on the preview frames, and generate an expanded face ROI when a face is detected. The zonal metering module is used to perform zonal metering. Based on the face ROI, the preview frame is divided into three regions: face region, highlight region, and background region. The brightness of each region is calculated to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. The parameter calculation module is used to calculate the backlight index and underexposure indicator based on the brightness of the face area and the brightness of the highlight area, respectively; calculate the face target exposure based on the current exposure and the brightness of the face area, and calculate the highlight protection exposure based on the current exposure and the brightness of the highlight area; calculate the dynamic range ratio based on the face target exposure and the highlight protection exposure; and calculate the face signal-to-noise ratio based on the brightness of the face area. The exposure enhancement execution module is used to collect the captured frame after the face is detected during the capture process, and determine the exposure enhancement path to be executed on the captured frame based on the backlight index, underexposure flag and dynamic range ratio. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. The pulse fill light module is used to perform pulse fill light synchronously with the shutter when the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than a preset signal-to-noise ratio threshold. The pulse width of the pulse fill light does not exceed the current exposure time. The capture frame output module is used to calculate the overall quality score of the capture frame. If the overall quality score reaches the preset standard, the current capture frame is output as the output frame and the current capture round ends. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, the zonal metering is re-performed after a delay, and the exposure enhancement path or pulse fill light is adjusted before acquiring a new capture frame. If the number of captures has reached the preset limit, the capture frame with the highest overall quality score in the current buffer is output as the output frame.

[0016] According to a third aspect of the present invention, a computer device is provided, including a processor and a memory, the memory storing computer program instructions executable by the processor, wherein when the processor executes the computer program instructions, it implements the instructions as described in any of the above methods.

[0017] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein computer program instructions are stored therein, the computer program instructions being loaded and executed by a processor to perform the operations performed by the method described in any of the preceding claims.

[0018] The technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: This invention provides a method, apparatus, device, and medium for partitioned exposure and image enhancement for access control capture. This method constructs a complete closed-loop control on the end-side link, which uses partitioned metering anchored by the face ROI, adaptive enhanced exposure path selection, on-demand pulse illumination, and output frame determination based on comprehensive quality score. Compared with the isolated mode of global metering, constant illumination, and unidirectional capture in traditional solutions, this invention solves the contradiction between underexposure of the face and overexposure of highlights while using less or no high-power illumination. It significantly reduces illumination power consumption and hardware cost, and greatly reduces the number of missed detections caused by single-frame failures.

[0019] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in 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 flowchart illustrating a partitioned exposure and image enhancement method for access control image capture provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the principle structure of a partitioned exposure and image enhancement device for access control and image capture provided in an embodiment of the present invention; Figure 3 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0022] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings.

[0023] The accompanying drawings illustrate various structural schematics according to embodiments of this application. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0024] It should be noted that the terms "comprising" and "having," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusion. The term "multiple" as used in this application refers to two or more. In the context of this application, similar or identical components may be denoted by the same or similar reference numerals.

[0025] To better understand the above technical solutions, the following will describe the above technical solutions in detail with reference to specific implementation methods. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0026] Figure 1 This is a flowchart illustrating a partitioned exposure and image enhancement method for access control image capture provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the partitioned exposure and image enhancement method for access control image capture includes the following steps: S1. Based on the current exposure, collect a preview frame, perform face detection processing on the preview frame, and when a face is detected, generate an expanded face ROI; This invention embodiment acquires preview frames based on the current exposure of an image acquisition device (such as a camera, surveillance camera, edge AI camera, or access control all-in-one machine). The current exposure is derived from the current exposure setting of the sensor and is the exposure parameter value that the image acquisition device has converged (or is transient) in the current frame based on the automatic exposure algorithm. In the access control capture scenario, the image acquisition device is in a low-power preview state under normal conditions. At this time, the preview stream has been adjusted to a relatively stable brightness level (i.e., the current exposure) through automatic exposure.

[0027] In this embodiment of the invention, face detection processing is performed on the preview frame. When a face is detected, a face detection bounding box is generated. Using the center of the face detection bounding box as the origin, the width and height of the bounding box are simultaneously enlarged based on an expansion factor to obtain an enlarged rectangular region as the face ROI (Region of Interest in image processing). For example, the face region can be obtained using a formula. The expansion coefficient The value range is 1.10 to 1.30. This means that the width and height of the face detection box B are multiplied by the expansion coefficient α to obtain an enlarged rectangular area as the face region Rf. When α>1, the face detection box expands outwards uniformly to cover the edge of the face.

[0028] In the face detection process of this invention, key point detection of the face is performed simultaneously. Key points are facial feature points output by the face detector, including at least five points: left eye, right eye, nose tip, left corner of mouth, and right corner of mouth (in some embodiments, denser facial contour points may also be used). Key points are used to stabilize the face bounding box and subsequent pose estimation, but do not include other parts of the human body or the whole body contour.

[0029] If no face is detected during face detection processing, the image acquisition device maintains a low-power preview state. In the low-power preview state, the image acquisition device uses a low-load preview stream, such as a resolution of 1280×720, a frame rate of 10~15fps, global metering, and fill light off.

[0030] S2. Perform regional metering. Based on the face ROI, divide the preview frame into three regions: face region, highlight region, and background region. Calculate the brightness of each region to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. In this embodiment of the invention, the preview frame is divided into a face region. Highlights The three regions, Rb, R1, R2, and R3, were analyzed, and the brightness of each region was statistically analyzed (using robust percentiles), including: The set of pixels in the preview frame whose brightness values ​​are greater than a preset highlight threshold is divided into highlight areas. The brightness of the highlight area is taken as the 90th percentile of the brightness values ​​of all pixels in the highlight area. For example, the brightness of the highlight area... ; The region where the face ROI is located is taken as the face region, and the brightness of the face region is taken as the median of the brightness values ​​of all pixels in the face region, for example, the brightness of the face region. ; The area on the preview frame excluding the highlight area and the face area is designated as the background area. The brightness of the background area is taken as the median of the brightness values ​​of all pixels in the background area. For example, the brightness of the background area... .

[0031] S3. Calculate the backlight index and underexposure flag based on the brightness of the face area and the brightness of the highlight area, respectively; calculate the face target exposure based on the current exposure and the brightness of the face area, and calculate the highlight protection exposure based on the current exposure and the brightness of the highlight area; calculate the dynamic range ratio based on the face target exposure and the highlight protection exposure; calculate the face signal-to-noise ratio based on the brightness of the face area. In this embodiment of the invention, the backlight index , For example, a backlight index of 1.0 is used to measure the intensity of backlight in a scene or to determine the degree of brightness conflict between the face area and the highlight area. If the backlight index is 1.0, Not greater than the preset backlight threshold If the current frame is determined to be in a non-backlight state, then if the backlight index is... Greater than the preset backlight threshold If so, the current frame is determined to be in a backlight state.

[0032] In an embodiment of the present invention, the underexposure mark The underexposure flag is used to indicate whether the scene requires strong intervention (i.e., exposure enhancement). The underexposure flag includes a dual judgment, including the backlight index. Greater than the preset backlight threshold (For example, 1.8 to 3.0) Simultaneously, the brightness of the face area... Below the lower limit of brightness in the face area (For example, 40-70), the underexposure mark is... Set to true (i.e., the current frame is underexposed), and then strong intervention will be activated.

[0033] In this embodiment of the invention, the face target exposure , The current exposure is the exposure of the face target. The ideal exposure setting for the face area; This refers to the target band (or the brightness of the face target), for example, 90 to 120, which can be set according to actual application requirements. This embodiment of the invention does not limit this.

[0034] In this embodiment of the invention, the highlight protection exposure The high-gloss protection exposure The exposure limit is set to prevent highlights from being blown out at the entrance; To protect the target brightness from high light, for example, it can be set to 200-230, which can be set according to actual application requirements. This embodiment of the invention does not limit this.

[0035] In this embodiment of the invention, the dynamic range ratio This is used to measure the degree of conflict between the exposure of the face target and the exposure for highlight protection, thereby determining the exposure enhancement path to be performed on the captured frame.

[0036] In this embodiment of the invention, the face signal-to-noise ratio This is used to measure the ratio of signal to noise in the facial region; The noise level of the face region, the For example, it can be obtained through statistical methods in image processing algorithms (such as calculating the standard deviation of pixel brightness using the single-frame ROI method).

[0037] S4. After the face is detected during the capture process, capture frames are collected. Based on the backlight index, underexposure flag and dynamic range ratio, an exposure enhancement path is determined for the capture frames. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. Based on the backlight index, underexposure flag, and dynamic range ratio, this embodiment of the invention determines the exposure enhancement path to be performed on the captured frame, including: Based on the backlight index and underexposure flag, it is confirmed whether the current capture frame is in a non-backlight and non-underexposure state. If the current capture frame is in a non-backlight state, the exposure enhancement path executed is normal exposure capture. In normal exposure capture, the current exposure amount and the same resolution, frame rate, etc. as the low power preview state are used. If the current captured frame is in a backlit and underexposed state, then confirm whether the dynamic range ratio is greater than the preset dynamic range ratio threshold. When the dynamic range ratio is less than or equal to a preset dynamic range ratio threshold, the exposure enhancement path executed is a face ROI-weighted single exposure; the preset dynamic range ratio threshold is... For example, 4 to 16; in the dynamic range ratio At that time, the exposure enhancement path executed is a face ROI-weighted single exposure, and the face ROI-weighted single exposure... The face ROI weighted single exposure Prioritize the exposure of the aforementioned face target At the same time, not less than the aforementioned highlight protection exposure The lower bound; When the dynamic range ratio is greater than the preset dynamic range ratio threshold, the exposure enhancement path executed is short and long frame region exposure fusion or AI-ISP single frame enhancement.

[0038] The short-long frame region exposure fusion is, for example, based on the highlight protection exposure. Capture short frames Exposure of the aforementioned facial target Capture long frames The short frame and the long frame are simultaneously acquired by the same image sensor within the same acquisition window using digital oversampling / high dynamic range readout or dual-gain readout. If the hardware does not support simultaneous readout, two consecutive frames are used sequentially and aligned with a face mask and motion vectors. The face mask is obtained in advance through further feature extraction using key points in the face region. The short frame and the long frame are then fused according to fusion weights. Determine as follows: ,in Let p be the face mask value. β is the short-frame brightness value at pixel p, β is the fusion slope control parameter (e.g., 4 to 12), τ is the face mask soft threshold (e.g., 0.30 to 0.60), and G is the specular suppression function.

[0039] The AI-ISP single-frame enhancement, for example, calculates a local gain for the current captured frame. The local gain Confined within the face mask, the following formula is used for calculation: ,in This is the maximum gain value, for example, 1.5 to 4.0; The current frame I and the local gain and the backlight index Input AI-ISP mapping Output enhanced image The AI-ISP mapping The input terminal is an AI image signal processor already deployed on the edge, which includes at least one of denoising, local tone mapping and skin color constraint.

[0040] S5. When the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, pulse fill light is performed synchronously with the shutter, and the pulse width of the pulse fill light does not exceed the current exposure time. This invention embodiment performs pulsed illumination synchronized with the shutter, including: the pulsed illumination is off by default, and is only applied when the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than a preset signal-to-noise ratio threshold. (For example, 20-32 dB), and the underexposure flag is true, and the brightness of the face area is less than the preset supplementary light trigger brightness. (For example, 35-60) and when fill light is allowed in this cycle, a pulse fill light is emitted within the shutter window, and the current of this pulse fill light... Pulse lighting Relative maximum current 10% to 80% (for the first supplemental lighting, 30% can be selected, for example); And the average power of the pulsed fill light In the formula, This is the supplementary light gain coefficient. The on-time of the pulsed illumination (e.g., 1–8 ms). This refers to the time of this exposure; For the average power budget, the target power is, for example, no more than 20% of the constant-on solution, and a reasonable power level can be selected according to the actual application scenario.

[0041] If the brightness of the highlight area exceeds a preset highlight protection threshold after the pulse fill light is applied, the embodiment of the present invention reduces the current of the pulse fill light or turns off the pulse fill light, and only retains the short and long frame region exposure fusion or the AI-ISP single frame enhancement for the executed exposure enhancement path.

[0042] S6. Calculate the overall quality score for the captured frame. If the overall quality score reaches the preset standard, output the current captured frame as the output frame and end the current capture round. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, perform zonal metering again after a delay, and adjust the exposure enhancement path or pulse fill light to capture a new captured frame. If the number of captures has reached the preset limit, output the captured frame with the highest overall quality score in the current buffer as the output frame.

[0043] In this embodiment of the invention, the comprehensive quality score Q is calculated using the following formula: ;like and Then the current captured frame will be output as the output frame and the current capture round will end; In the formula, For luminance components, For clarity components, For attitude components, For signal-to-noise ratio components, For the integrity component, , , , , These are the weights corresponding to each component; As the threshold for the overall quality score, [ , [] represents the acceptance tape, for example, [ , ].

[0044] The brightness component Based on the brightness of the face region Acquire, for example, the luminance component Brightness in the face area Falling into the existing acceptance zone , The value is 1 when the value exceeds this band, and decreases to 0 if the value deviates from the linear trend; the sharpness component The Laplace variance was calculated for the face region. To obtain, for example, = relative threshold For example, 80; the attitude component To estimate the yaw and pitch angles using key points in the face region, for example, the attitude components... The yaw angle is 1 within ±25° and the pitch angle is ±20°, and then linearly decreases to 0 beyond these limits; the signal-to-noise ratio component... Based on the obtained face signal-to-noise ratio normalization, for example = The integrity component The completeness component refers to the proportion of the area within the captured frame where the face detection bounding box falls, for example, when the face is fully visible. The more the image is cropped or obscured, the lower the integrity component becomes. The lower the value, the better. The specific value can be adjusted according to the pixel ratio or customized based on actual application needs.

[0045] If the overall quality score does not meet the preset standard and the number of snapshots does not exceed the preset maximum number of snapshots. (For example, 2 to 4), then after a delay of Δt (for example, 80 to 300 ms), the zonal metering is re-performed, and the exposure enhancement path or pulse fill light is adjusted before a new capture frame is acquired. By re-zonal metering and adjusting the corresponding exposure enhancement path, a capture frame with a comprehensive quality score that meets the preset standard is finally obtained. Correspondingly, if the number of captures has reached the preset limit, the capture frame with the highest comprehensive quality score in the current buffer is directly output as the output frame.

[0046] The partitioned exposure and image enhancement method for access control image capture described in this embodiment of the invention has the following advantages compared with the prior art: 1. This invention constructs a complete closed-loop control on the end-side link, using face ROI as the anchor for zone metering, adaptive enhanced exposure path selection, on-demand pulse illumination, and output frame determination based on comprehensive quality score. Compared with the isolated mode of global metering, constant illumination, and unidirectional capture in traditional solutions, this invention simultaneously solves the contradiction between face underexposure and highlight overexposure while using less or no high-power illumination. It significantly reduces illumination power consumption and hardware cost, and greatly reduces recognition misses caused by single-frame failures.

[0047] 2. By multiplying the width and height of the face detection box by an expansion coefficient α with the center of the face detection box as the origin, the brightness information of the face edges (such as the forehead and jaw edges) is not missed because the face detection box boundary is close to the face. This widening method ensures that the subsequent regional metering statistics range can completely cover the effective area of ​​the face and will not introduce external background interference unnecessarily, making the brightness statistics more robust.

[0048] 3. The backlight index, underexposure flag, face target exposure, highlight protection exposure, dynamic range ratio, and face signal-to-noise ratio are calculated respectively. Based on these obtained parameters, a rigorous causal decision chain is formed. First, the backlight index and underexposure flag are used to accurately determine the backlight and underexposure states. Then, the dynamic range ratio is used to determine whether a single exposure can cover both areas, thereby selecting the exposure enhancement path to be executed in the captured frame. Finally, the face signal-to-noise ratio is used to determine whether pulse lighting is needed. This embodiment of the invention is based on the hard gate control of physical signal-to-noise ratio, avoiding the crude operation of blindly supplementing light based solely on brightness in traditional solutions.

[0049] 4. When the dynamic range ratio is less than or equal to the preset dynamic range ratio threshold, the exposure enhancement path executed is face ROI weighted single exposure. When the dynamic range ratio is greater than the preset dynamic range ratio threshold, the exposure enhancement path executed is short and long frame region exposure fusion or AI-ISP single frame enhancement. Thus, the exposure strategy is divided into single exposure enhancement or fusion / AI-ISP enhancement based on the dynamic range value. Dual frame fusion and AI-ISP can be switched or connected in series according to the sensor capability. This design is not bound to a specific chip and depends entirely on the edge sensor capability, which greatly improves the compatibility and feasibility of the solution on different hardware devices in the current network.

[0050] 5. The fill light method uses pulse fill light, which is a very bright fill light. It is a short pulse that is triggered by signal-to-noise ratio gating and precisely synchronized within the shutter window. It is strictly constrained by the average power budget P_budget and also limits the highlight back-off mechanism. If the brightness of the highlight area exceeds the corresponding threshold due to pulse fill light, the current will be reduced or the fill light will be turned off immediately. Only software fusion or AI-ISP will be retained, so that the fill light power consumption is reduced to less than 20% of the constant light solution. This avoids glare, heat dissipation and LED lifespan issues, and also eliminates the background whitening distortion problem caused by excessive fill light.

[0051] 6. The final output frame is determined by whether the overall quality score of the captured frame meets the preset standard. The overall quality score directly anchors the actual requirements of the five dimensions of subsequent recognition (brightness, sharpness, posture, signal-to-noise ratio, and completeness). When the overall quality score fails to meet the standard and triggers a second capture, the zonal metering is re-performed after a delay, and the exposure enhancement path or pulse fill light is adjusted before a new capture frame is acquired. This effectively avoids power waste caused by ineffective fill light, improves the effective capture success rate under different postures within the passage window, and significantly improves the 1:N recognition rate on the edge.

[0052] Based on the above embodiments, as a supplement to the above... Figure 1 The present invention provides an embodiment of a partitioned exposure and image enhancement device for access control image capture, which is similar to the method shown. Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices, see reference. Figure 2 As shown, the partitioned exposure and image enhancement device for access control capture includes: The face detection module 100 is used to collect preview frames based on the current exposure, perform face detection processing on the preview frames, and generate an expanded face ROI when a face is detected. The zonal metering module 200 is used to perform zonal metering. Based on the face ROI, the preview frame is divided into three regions: face region, highlight region, and background region. The brightness of each region is calculated to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. The parameter calculation module 300 is used to calculate the backlight index and underexposure indicator based on the brightness of the face area and the brightness of the highlight area, respectively; calculate the face target exposure based on the current exposure and the brightness of the face area, and calculate the highlight protection exposure based on the current exposure and the brightness of the highlight area; calculate the dynamic range ratio based on the face target exposure and the highlight protection exposure; and calculate the face signal-to-noise ratio based on the brightness of the face area. The exposure enhancement execution module 400 is used to acquire the captured frame after the face is detected during the capture process, and determine the exposure enhancement path to be executed on the captured frame based on the backlight index, underexposure flag and dynamic range ratio. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. The pulse fill light module 500 is used to perform pulse fill light synchronously with the shutter when the face signal-to-noise ratio corresponding to the captured frame after exposure enhancement is lower than a preset signal-to-noise ratio threshold. The pulse width of the pulse fill light does not exceed the current exposure time. The capture frame output module 600 is used to calculate the overall quality score of the capture frame. If the overall quality score reaches the preset standard, the current capture frame is output as the output frame and the current capture round ends. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, the zonal metering is re-performed after a delay, and the exposure enhancement path or pulse fill light is adjusted before acquiring a new capture frame. If the number of captures has reached the preset limit, the capture frame with the highest overall quality score in the current buffer is output as the output frame.

[0053] The modules in the aforementioned zoned exposure and image enhancement device for access control and image capture can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0054] The partitioned exposure and image enhancement device for access control capture described in this embodiment can execute the partitioned exposure and image enhancement method for access control capture provided in the above embodiment. The partitioned exposure and image enhancement device for access control capture has the corresponding functional steps and beneficial effects of the partitioned exposure and image enhancement method for access control capture described in the above embodiment. For details, please refer to the above embodiment of the partitioned exposure and image enhancement method for access control capture. The embodiments of this invention will not be repeated here.

[0055] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface, such as a network interface card, is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. The display unit is used to create a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0056] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0057] In one exemplary embodiment, a chip is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.

[0058] In one exemplary embodiment, a network interface card is provided, including a chip as described in any of the above embodiments and multiple interfaces, wherein the chip communicates externally through the interfaces.

[0059] In one embodiment, a computer device is also provided, including a processor, a chip in any of the above embodiments, or a network interface card in any of the above embodiments, wherein the chip or the network interface card is used to schedule packets to the processor or the chip or the network interface card itself for processing, and the processor is used to process the packets scheduled by the chip or the network interface card.

[0060] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0061] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0062] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory). Only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application may include at least one of relational databases and non-relational databases. Non-relational databases may include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited thereto.

[0063] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0064] Similarly, it should be understood that, for the purpose of simplification and aiding understanding of one or more aspects of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention above. Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and it should be noted that the above embodiments are illustrative of the invention and not restrictive, and that alternative embodiments can be devised by those skilled in the art without departing from its scope.

Claims

1. A method for zoned exposure and image enhancement for access control image capture, characterized in that, Includes the following steps: S1. Based on the current exposure, collect a preview frame, perform face detection processing on the preview frame, and when a face is detected, generate an expanded face ROI; S2. Perform regional metering. Based on the face ROI, divide the preview frame into three regions: face region, highlight region, and background region. Calculate the brightness of each region to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. S3. Calculate the backlight index and underexposure mark based on the brightness of the face area and the brightness of the highlight area, respectively; The exposure of the face target is calculated based on the current exposure and the brightness of the face area, and the exposure for highlight protection is calculated based on the current exposure and the brightness of the highlight area. The dynamic range ratio is calculated based on the exposure of the face target and the exposure for highlight protection; the signal-to-noise ratio of the face is calculated based on the brightness of the face region; S4. After the face is detected during the capture process, capture frames are collected. Based on the backlight index, underexposure flag and dynamic range ratio, an exposure enhancement path is determined for the capture frames. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. S5. When the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, pulse fill light is performed synchronously with the shutter, and the pulse width of the pulse fill light does not exceed the current exposure time. S6. Calculate the overall quality score for the captured frame. If the overall quality score reaches the preset standard, output the current captured frame as the output frame and end the current capture round. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, perform zone metering again after a delay, and collect a new captured frame after adjusting the exposure enhancement path or pulse fill light. If the number of capture attempts has reached the preset limit, then the capture frame with the highest overall quality score in the current cache is output as the output frame.

2. The method for zoned exposure and image enhancement for access control capture according to claim 1, characterized in that, In step S1, generating the expanded face ROI includes: The preview frame is subjected to face detection processing, and a face detection box is generated when a face is detected; Using the center of the face detection box as the origin, the width and height of the face detection box are simultaneously enlarged based on an expansion factor to obtain an enlarged rectangular area as the face ROI; the value range of the expansion factor is 1.10~1.

30.

3. The method for zoned exposure and image enhancement for access control image capture according to claim 1, characterized in that, In step S2, dividing the preview frame into three regions—a face region, a highlight region, and a background region—and calculating the brightness of each region includes: The set of all pixels in the preview frame whose brightness values ​​are greater than a preset highlight threshold is divided into a highlight area, and the brightness of the highlight area is taken as the 90th percentile of the brightness values ​​of all pixels in the highlight area; The region where the face ROI is located is taken as the face region, and the brightness of the face region is taken as the median of the brightness values ​​of all pixels in the face region; The area on the preview frame excluding the highlight area and the face area is divided into a background area, and the brightness of the background area is taken as the median of the brightness values ​​of all pixels in the background area.

4. The method for zoned exposure and image enhancement for access control capture according to claim 1, characterized in that, In step S4, determining the exposure enhancement path to be executed on the captured frame based on the backlight index, underexposure flag, and dynamic range ratio includes: Based on the backlight index and underexposure flag, it is confirmed whether the current capture frame is in a non-backlight and non-underexposure state. If the current capture frame is in a non-backlight state, the exposure enhancement path executed is normal exposure capture. If the current captured frame is in a backlit and underexposed state, then confirm whether the dynamic range ratio is greater than the preset dynamic range ratio threshold. When the dynamic range ratio is less than or equal to the preset dynamic range ratio threshold, the exposure enhancement path executed is face ROI weighted single exposure; When the dynamic range ratio is greater than the preset dynamic range ratio threshold, the exposure enhancement path executed is short and long frame region exposure fusion or AI-ISP single frame enhancement.

5. The method for zoned exposure and image enhancement for access control capture according to claim 1, characterized in that, In step S5, the pulse fill light operation synchronized with the shutter includes: The pulsed fill light is off by default. It is only emitted within the shutter window when the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than the preset signal-to-noise ratio threshold, the underexposure flag is true, the brightness of the face area is less than the preset fill light trigger brightness, and fill light is allowed in this round.

6. The partitioned exposure and image enhancement method for access control image capture according to claim 5, characterized in that, The method further includes: if the brightness of the highlight area exceeds a preset highlight protection threshold after the pulse fill light is applied, then the current of the pulse fill light is reduced or the pulse fill light is turned off, and only the exposure fusion of the short and long frame regions or the AI-ISP single frame enhancement is retained for the executed exposure enhancement path.

7. The method for zoned exposure and image enhancement for access control image capture according to claim 1, characterized in that, In step S6, the comprehensive quality score Q is calculated using the following formula: ; In the formula, For luminance components, For clarity components, For attitude components, For signal-to-noise ratio components, For the integrity component, , , , , These are the weights corresponding to each component; The brightness component Based on the brightness of the face region; the sharpness component The pose components are obtained by calculating the Laplacian variance of the face region. The signal-to-noise ratio component is obtained by estimating the yaw and pitch angles through key points in the face region. The completeness component is obtained based on the face signal-to-noise ratio. This refers to the proportion of the area within the captured frame where the face detection bounding box falls.

8. A zoned exposure and image enhancement device for access control image capture, applied to the method described in any one of claims 1-7, characterized in that, The device includes: The face detection module is used to collect preview frames based on the current exposure, perform face detection processing on the preview frames, and generate an expanded face ROI when a face is detected. The zonal metering module is used to perform zonal metering. Based on the face ROI, the preview frame is divided into three regions: face region, highlight region, and background region. The brightness of each region is calculated to obtain the brightness of the face region, the brightness of the highlight region, and the brightness of the background region. The parameter calculation module is used to calculate the backlight index and underexposure indicator based on the brightness of the face area and the brightness of the highlight area, respectively; calculate the face target exposure based on the current exposure and the brightness of the face area, and calculate the highlight protection exposure based on the current exposure and the brightness of the highlight area; calculate the dynamic range ratio based on the face target exposure and the highlight protection exposure; and calculate the face signal-to-noise ratio based on the brightness of the face area. The exposure enhancement execution module is used to collect the captured frame after the face is detected during the capture process, and determine the exposure enhancement path to be executed on the captured frame based on the backlight index, underexposure flag and dynamic range ratio. The exposure enhancement path includes at least one of the following: normal exposure capture, face ROI weighted single exposure, short and long frame region exposure fusion, and AI-ISP single frame enhancement. The pulse fill light module is used to perform pulse fill light synchronously with the shutter when the signal-to-noise ratio of the face corresponding to the captured frame after exposure enhancement is lower than a preset signal-to-noise ratio threshold. The pulse width of the pulse fill light does not exceed the current exposure time. The capture frame output module is used to calculate the overall quality score of the capture frame. If the overall quality score reaches the preset standard, the current capture frame is output as the output frame and the current capture round ends. If the overall quality score does not reach the preset standard and the number of captures does not exceed the preset limit, the zonal metering is re-performed after a delay, and the exposure enhancement path or pulse fill light is adjusted before acquiring a new capture frame. If the number of captures has reached the preset limit, the capture frame with the highest overall quality score in the current buffer is output as the output frame.

9. A computer device comprising a processor and a memory, characterized in that, The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, it implements the instructions of the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that are loaded and executed by a processor to perform the operations described in any one of claims 1-7.