Exposure control method and device

The exposure control method optimizes face brightness in backlight scenes through dynamic range-based adjustments, enhancing face recognition accuracy by correcting exposure parameters in two stages.

CN119233095APending Publication Date: 2024-12-31SHENZHEN MICROBT ELECTRONICS TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310787594.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Face recognition accuracy is compromised in strong backlight scenes due to insufficient face brightness, leading to false detection and missed detection.

Method used

An exposure control method and device that adjusts exposure parameters based on the dynamic range of the current scene and face brightness, involving two stages: pre-exposure to correct target brightness using a backlight coefficient, and secondary exposure to optimize face area brightness.

Benefits of technology

Improves face recognition accuracy by ensuring optimal face brightness in backlight scenes, reducing false and missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233095A_ABST
    Figure CN119233095A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an exposure control method and device. The method is applied to image acquisition equipment, and comprises the following steps: determining a dynamic range of a current scene based on a first image acquired by the image acquisition equipment in real time under a current exposure parameter; correcting the current target brightness according to the dynamic range of the current scene to obtain a backlight coefficient of the current scene; adjusting an exposure parameter of the image acquisition equipment according to the backlight coefficient to obtain a pre-exposure parameter; if a second image acquired by the image acquisition equipment in real time under the pre-exposure parameter contains a face area, calculating a corrected brightness value of the face area; and adjusting the pre-exposure parameter according to the corrected brightness value to obtain a target exposure parameter. According to the embodiment of the invention, the situations of false detection and missing detection can be reduced, and the accuracy of face recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an exposure control method and device. Background Art

[0002] Face recognition is a biometric technology that identifies people based on their facial features. It uses a camera or camcorder to collect images or video streams containing faces, automatically detects and tracks faces in images, and then performs facial recognition on the detected faces. It is also commonly called portrait recognition or facial recognition.

[0003] When the camera or camera is in a strong backlight scene (a backlit scene with a large contrast between light and dark), such as an entrance, backlit corridor, etc., the face brightness is often insufficient when the overall picture exposure is appropriate, causing the face to be too dark or even the facial details to be blurred, which may lead to false detection, missed detection and poor face effect, thereby affecting the accuracy of face recognition. Summary of the invention

[0004] The embodiments of the present invention provide an exposure control method and device, which can improve the situation where the foreground object (such as a face) is too dark when the image acquisition device is in a backlight scene, so as to reduce false detection and missed detection, thereby improving the accuracy of face recognition.

[0005] In a first aspect, an embodiment of the present invention discloses an exposure control method, which is applied to an image acquisition device. The method includes:

[0006] Determining a dynamic range of a current scene based on a first image acquired in real time by the image acquisition device under current exposure parameters;

[0007] Correcting the current target brightness according to the dynamic range of the current scene to obtain a backlight coefficient of the current scene;

[0008] Adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter;

[0009] If the second image acquired in real time by the image acquisition device under the pre-exposure parameters contains a face area, calculating a corrected brightness value of the face area;

[0010] The pre-exposure parameter is adjusted according to the corrected brightness value to obtain a target exposure parameter.

[0011] In a second aspect, an embodiment of the present invention discloses an exposure control device, which is applied to an image acquisition device, and the device includes:

[0012] A dynamic range determination module, configured to determine a dynamic range of a current scene based on a first image acquired in real time by the image acquisition device under current exposure parameters;

[0013] A backlight coefficient determination module, used to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene;

[0014] A first exposure adjustment module, used for adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter;

[0015] A face brightness calculation module, configured to calculate a corrected brightness value of a face region if a second image captured in real time by the image acquisition device under the pre-exposure parameters contains a face region;

[0016] The second exposure adjustment module is used to adjust the pre-exposure parameter according to the corrected brightness value to obtain a target exposure parameter.

[0017] In a third aspect, an embodiment of the present invention discloses a machine-readable medium having instructions stored thereon, which, when executed by one or more processors of a device, enables the device to execute one or more of the exposure control methods described above.

[0018] The embodiments of the present invention include the following advantages:

[0019] The exposure control method of the embodiment of the present invention includes two stages: pre-exposure and secondary exposure. The pre-exposure stage is used to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene. The backlight coefficient of the current scene can reflect the exposure amount required to be adjusted for the current scene, and pre-exposure is performed according to the backlight coefficient. The secondary exposure stage is used to calculate according to the brightness information of the face area obtained after the pre-exposure to obtain the corrected brightness value of the face area in the current scene. The corrected brightness value is a brightness value obtained by secondary correction of the target brightness, which is more in line with the current backlight scene. The embodiment of the present invention jointly adjusts the exposure parameters of the image acquisition device based on the backlight intensity of the current scene and the face brightness after pre-exposure, so that the brightness of the face area in the backlight scene reaches a more optimal value. When the image acquisition device is in a backlight scene, the situation that the foreground object (such as a face) is too dark can be improved, and the quality of the image acquired by the image acquisition device can be improved to reduce the situation of false detection and missed detection, thereby improving the accuracy of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0021] Figure 1 is a flowchart of steps of an embodiment of an exposure control method of the present invention;

[0022] Figure 2 It is a structural block diagram of an embodiment of an exposure control device of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of the present invention, the term "multiple" refers to two or more, and other quantifiers are similar.

[0025] Reference Figure 1 , shows a flow chart of steps of an exposure control method embodiment of the present invention, the method can be applied to an image acquisition device, and the method may include the following steps:

[0026] Step 101, determining the dynamic range of the current scene based on the first image acquired in real time by the image acquisition device under the current exposure parameters;

[0027] Step 102: correcting the current target brightness according to the dynamic range of the current scene to obtain a backlight coefficient of the current scene;

[0028] Step 103: adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter;

[0029] Step 104: If the second image acquired in real time by the image acquisition device under the pre-exposure parameters contains a face area, then a corrected brightness value of the face area is calculated;

[0030] Step 105: Adjust the pre-exposure parameter according to the corrected brightness value to obtain a target exposure parameter.

[0031] The exposure control method provided in the embodiment of the present invention can be applied to an image acquisition device, which can be an electronic device with an image acquisition function, such as an electronic doorbell, an electronic door lock, an electronic cat's eye, a vehicle recorder, a network camera, a surveillance camera, and a wearable device with a camera, etc. The image acquisition device can acquire images or videos, and the image described in the embodiment of the present invention can be a video image acquired by the image acquisition device.

[0032] The exposure control method provided by the embodiment of the present invention can improve the situation where the foreground object (such as a face) is too dark when the image acquisition device is in a backlight scene, and can improve the quality of the image acquired by the image acquisition device to reduce false detection and missed detection, thereby improving the accuracy of face recognition.

[0033] The exposure control method provided by the embodiment of the present invention may include two stages, the first stage is the pre-exposure stage (step 101 to step 103), and the second stage is the secondary exposure stage (step 104 to step 105).

[0034] The pre-exposure stage is used to make the first adjustment to the exposure parameters. Since the dynamic range and backlight intensity are different when the image acquisition device is located in different scenes, the exposure parameters that need to be adjusted are also different. Therefore, in the embodiment of the present invention, the exposure parameters are adjusted for the first time according to the dynamic range of the current scene in the pre-exposure stage. Specifically, first, based on the first image acquired in real time by the image acquisition device under the current exposure parameters, the dynamic range of the current scene is determined.

[0035] Dynamic Range (DR) is a term used to define the range of tonal details that a camera can capture in an image, usually from the lowest value to the highest overflow value. Simply put, dynamic range describes the ratio between the brightest and darkest tones that a camera can record in a single frame.

[0036] The quality of the image captured by the image acquisition device in real time is affected by two dynamic ranges, one is the dynamic range of the current scene, and the other is the dynamic range of the sensor of the image acquisition device. The dynamic range of the sensor of the image acquisition device refers to the brightness difference range of the darkest and brightest scenes that the sensor can capture. When the sensor is fixed, the dynamic range of the sensor is fixed.

[0037] When the image acquisition device is in different scenes, or the image acquisition device is in different time periods of the same scene, the dynamic range of the current scene may be different, and the dynamic range of the current scene can reflect the backlight intensity of the current scene to a certain extent. For example, the larger the dynamic range of the current scene, the stronger the backlight intensity of the current scene. Therefore, the embodiment of the present invention determines the dynamic range of the current scene based on the first image acquired in real time by the image acquisition device under the current exposure parameters, realizes the real-time linkage between exposure control and the current scene, and can more accurately guide the control of exposure parameters in different scenes.

[0038] Since the dynamic ranges in different scenes are different, resulting in different backlight intensities, the exposures required to be adjusted are also different. Therefore, the embodiment of the present invention corrects the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene. The backlight coefficient of the current scene can reflect the exposure required to be adjusted for the current scene, and adjusting the exposure parameters in the pre-exposure stage according to the backlight coefficient of the current scene can improve the exposure effect in the pre-exposure stage.

[0039] Exemplarily, the current target brightness may be corrected by the following formula to obtain the backlight coefficient of the current scene (such as backlight_coef):

[0040] backlight_coef=K*(Target*(1+log 10 (Dynamic_Range))) (1)

[0041] Among them, Target is the current target brightness, that is, the target brightness of normal exposure in the current scene, Dynamic_Range is the dynamic range of the current scene, and K is a debugging parameter. The value of the debugging parameter K can be determined according to the backlight intensity of the current scene. In a specific implementation, the K value can be adjusted according to the scene requirements, and the default value is 1. For example, for scenes with high backlight intensity, the K value can be increased; for scenes with low backlight intensity, the K value can be decreased. The K value can be used as an amplification factor to adjust the exposure.

[0042] In an embodiment of the present invention, the backlight coefficient is affected by the dynamic range of the current scene and changes as the dynamic range of the current scene changes. The backlight coefficient can be the brightness obtained by adjusting the target brightness of normal exposure in the current scene according to the dynamic range of the current scene. Among them, the target brightness (AE Target) is the brightness that the ISP (Image Signal Processing) of the image acquisition device hopes that the image output by the sensor will reach.

[0043] The automatic exposure control process of the image acquisition device is the process of optimizing the image brightness by controlling the exposure amount. The exposure amount determines the brightness of the image output by the image acquisition device. The exposure amount is determined by the exposure parameters of the image acquisition device, which include aperture size, exposure time, exposure gain, etc. The aperture uses the light hole to control the intensity of the light reaching the photosensitive chip during exposure. The exposure time uses the length of the open time to control the light intake time. The exposure gain refers to the amplification gain of the signal after double sampling.

[0044] Among them, the target brightness is usually a fixed value obtained through debugging and experience, which can basically meet the application requirements in most common scenes, but cannot meet the unique characteristics of some scenes, which may cause excessive or insufficient brightness in some scenes.

[0045] The embodiment of the present invention first corrects the default target brightness according to the dynamic range of the current scene to obtain a backlight coefficient suitable for the current scene (that is, the corrected target brightness), and adjusts the exposure parameters of the image acquisition device according to the exposure required by the backlight coefficient to achieve pre-exposure, so as to increase the exposure of the backlight area, thereby improving the accuracy of face detection.

[0046] Next, the secondary exposure stage is entered. Specifically, if the second image captured in real time by the image acquisition device under the pre-exposure parameters contains a face area, the corrected brightness value of the face area is calculated. The second image refers to the image captured in real time by the image acquisition device under the pre-exposure parameters after the pre-exposure stage. The calculated corrected brightness value of the face area is a brightness value obtained by secondary correction of the target brightness. The pre-exposure parameters are adjusted according to the corrected brightness value of the face area in the second image to obtain the target exposure parameters, and the image acquisition device controls the exposure amount according to the target exposure parameters. The purpose of secondary exposure is to make the brightness of the face area in a more appropriate brightness range, so as to effectively improve the brightness of the captured face area and further improve the accuracy of face detection.

[0047] It should be noted that, in a specific implementation, if it is a non-backlight scene, the exposure adjustment can be made by directly referring to the face of the first frame (i.e., the first frame includes a face image), that is, it is possible to adjust the exposure parameters according to the corrected brightness value of the first frame image, and obtain the first frame image according to the adjusted exposure parameters. If it is a backlight scene, the target exposure parameters of the embodiment of the present invention can take effect in the next frame at the earliest. In the pre-exposure stage, the image acquisition device pre-exposes the first image (assuming that it is the first frame image acquired by the image acquisition device at this time) acquired under the current exposure parameters to obtain the pre-exposure parameters; in the secondary exposure stage, if the second image (the second frame image acquired by the image acquisition device at this time) acquired by the image acquisition device under the pre-exposure parameters contains a face area, the pre-exposure parameters are adjusted according to the corrected brightness value of the face area to obtain the target exposure parameters, and the exposure of the second frame image is controlled according to the target exposure parameters, and when there is a face area in the subsequent frame (such as the third frame), the image acquisition device can acquire images based on the target exposure parameters, so that a face image with more appropriate brightness can be output. In a backlit environment, the image output by the image acquisition device will have bright areas (such as background areas) that become white due to overexposure, while dark areas (foreground objects, such as faces) become black due to underexposure, affecting the image quality. The embodiment of the present invention first performs a pre-exposure according to the dynamic range of the current scene, and then calculates the corrected brightness value of the face area according to the brightness information of the face area collected after the pre-exposure, and performs a second exposure according to the corrected brightness value. That is, the embodiment of the present invention jointly adjusts the exposure parameters of the image acquisition device based on the backlight intensity of the current scene and the face brightness after pre-exposure, so that the brightness of the face area and the background area in the backlit scene reaches a more optimal value, while appropriately improving the face brightness and restoring the face details, and at the same time, it can better suppress the background brightness, so that the face imaging in the image in the strong backlight scene is bright and clear, improving the accuracy of face detection, and then improving the accuracy of face recognition.

[0048] In an optional embodiment of the present invention, determining the dynamic range of the current scene based on the first image acquired in real time by the image acquisition device under the current exposure parameters may include:

[0049] Step S11, obtaining histogram statistical information of the first image, wherein the histogram statistical information includes histogram orders and the number of pixels in each order;

[0050] Step S12, determining a dark tone brightness value and a light tone brightness value of the first image according to the histogram statistical information and a preset dark tone starting order threshold, dark tone ending order threshold, light tone starting order threshold, and light tone ending order threshold;

[0051] Step S13: determining the dynamic range of the current scene according to the dark tone brightness value and the light tone brightness value of the first image.

[0052] The histogram statistical information of the first image may be obtained from a 3A (auto exposure / auto focus / auto white balance, auto exposure AE / auto focus AF / auto white balance AWB) statistical module of the ISP.

[0053] The embodiment of the present invention divides the histogram statistical information of the first image into two parts: Dark Tone and Bright Tone to determine the dynamic range of the current scene.

[0054] First, according to the histogram statistical information, the dark tone brightness value (such as dark_luma) and the bright tone brightness value (such as bright_luma) of the first image are determined. The calculation process may be as follows:

[0055]

[0056]

[0057] Wherein, bin is the histogram order of the first image, piexls is the number of pixels corresponding to each order, dark is the starting order threshold of dark tones, middle is the ending order threshold of dark tones and the starting order threshold of bright tones, and bright is the ending order threshold of bright tones. Generally, middle can be determined by the current target brightness and changes with the change of target brightness.

[0058] It should be noted that dark, middle, and bright are debugging parameters, and specific values ​​can be set according to the actual scene in the specific implementation. For example, the embodiment of the present invention sets the value of dark to 0, sets the value of middle to the target brightness of the current AE (which will change according to the target brightness), and sets the value of bright to bin-1 (that is, the last order of the histogram of the first image).

[0059] Then, the dynamic range (e.g., Dynamic_Range) of the current scene is determined according to the dark tone brightness value and the bright tone brightness value of the first image. For example, Dynamic_Range can be set to the ratio of the dark tone brightness value (dark_luma) to the bright tone brightness value (bright_luma) of the first image, such as bright_luma / dark_luma.

[0060] In an optional embodiment of the present invention, determining the dynamic range of the current scene according to the dark tone brightness value and the bright tone brightness value of the first image may include:

[0061] Step S21, obtaining the dark tone brightness value and the light tone brightness value of each frame of the first image and the first N frames of images, and obtaining the dark tone brightness value and the light tone brightness value of the N+1 frame of images;

[0062] Step S22: taking the ratio of the sum of the ratios of the bright tone brightness value to the dark tone brightness value of each frame of the N+1 frames of images and N as the dynamic range of the current scene.

[0063] In order to ensure the temporal stability of the calculated dynamic range of the current scene, the embodiment of the present invention can calculate the dynamic range Dynamic_Range of the current scene by the following formula:

[0064]

[0065] Where t represents the current frame. By taking N frames before the current frame for multi-frame smoothing, the stability of the Dynamic_Range time domain can be guaranteed. N can be an integer greater than or equal to 1.

[0066] It is understandable that the embodiments of the present invention do not limit the method for determining the dynamic range of the current scene. For example, the determination of the dynamic range of the current scene based on the first image acquired in real time by the image acquisition device under the current exposure parameters may include: dividing the first image into a preset number of image blocks, and calculating the dynamic range of the current scene based on the image block with the highest brightness and the image block with the lowest brightness. Exemplarily, the difference between the brightness of the image block with the highest brightness and the brightness of the image block with the lowest brightness can be used as the dynamic range of the current scene.

[0067] In an optional embodiment of the present invention, adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain the pre-exposure parameter may include:

[0068] Step S31, performing motion detection on the current scene to obtain a motion detection result;

[0069] Step S32: if the motion detection result indicates that there is a moving object in the current scene, adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter;

[0070] Step S33: If the motion detection result is that there is no moving object in the current scene, the current exposure parameter of the image acquisition device is used as a pre-exposure parameter.

[0071] The purpose of the embodiment of the present invention is to improve the accuracy of face detection in backlit scenes. That is, when a face is detected in the current scene, the exposure parameters are adjusted. However, the face detection algorithm is relatively complex, and a large amount of computing resources are required to perform face detection. Therefore, in order to save computing resources in the pre-exposure stage and improve computing efficiency, the embodiment of the present invention performs motion detection on the current scene. If a moving object is detected, it is considered that there are pedestrians in the current scene, and there may also be faces. However, the details of the face will be lost in the backlit scene, resulting in missed detection or wrong detection. Therefore, at this time, the exposure parameters of the image acquisition device can be adjusted according to the backlight coefficient of the current scene, and a pre-exposure is performed to retain more details of the foreground object in the backlit scene. If no moving object is detected, it is considered that there are no pedestrians in the current scene, and there is no face. At this time, there is no need to adjust the exposure parameters, and the current exposure parameters of the image acquisition device can be directly used as pre-exposure parameters.

[0072] It should be noted that the embodiments of the present invention do not limit the motion detection method. For example, the motion detection method may include a frame difference method, a background difference method, an optical flow method, and the like.

[0073] In an optional embodiment of the present invention, the calculating the corrected brightness value of the face area may include:

[0074] Step S41, determining a face area in the second image;

[0075] Step S42, dividing the face area into a preset number of sub-areas;

[0076] Step S43, determining the position weight of each sub-region, and determining the brightness weight of each sub-region;

[0077] Step S44, determining a target weight of each sub-region according to the position weight and brightness weight of each sub-region;

[0078] Step S45: Determine a corrected brightness value of the face area in the second image according to the brightness value of each sub-area and the target weight of each sub-area.

[0079] Determining the face area in the second image refers to determining the position coordinates of the face area in the second image. Further, determining the face area in the second image may include: performing face detection on the second image, and if more than two face areas are detected in the second image, determining the face area with the largest area as the face area in the second image. That is, when multiple (more than two) faces are detected in the second image, the position coordinates of the face area with the largest area are obtained, and the brightness value required for the secondary exposure is calculated based on the face area.

[0080] Dividing the face region into a preset number of sub-regions means dividing the face region into a plurality of sub-regions of the same size. Further, before dividing the sub-regions, the image of the face region may be processed, such as cropping based on the position coordinates of the face region to obtain the image of the face region; and then filtering the image of the face region, such as filtering out invalid regions such as hair and background to obtain a processed face region. Subsequent processing may be performed based on the processed face region.

[0081] For example, the second image can be divided into blocks, such as M×N blocks, each block has the same size, and each block is called a sub-region. By mapping the coordinate information of the processed face region with the M×N blocks of the second image, the sub-regions corresponding to the face region can be obtained, and then the position coordinates and brightness value of each sub-region of the face region can be obtained. The embodiment of the present invention divides the face region into blocks in order to reduce the area range where the foreground object is located and achieve more accurate brightness adjustment. The embodiment of the present invention does not limit the specific values ​​of M and N. The size of the sub-region determines the time and effect of image processing. The larger the values ​​of M and N, the smaller the sub-region, the more the number of sub-regions, the greater the amount of calculation, but the higher the accuracy of image processing; the smaller the values ​​of M and N, the larger the sub-region, the fewer the number of sub-regions, the smaller the amount of calculation, but the lower the accuracy of image processing. In practical applications, the specific values ​​of M and N can be set according to actual needs.

[0082] It should be noted that, in the embodiment of the present invention, the brightness value of a sub-region refers to the average brightness value of the sub-region. A sub-region usually contains multiple pixels, and the average brightness value of a sub-region refers to the average brightness value of all pixels in the sub-region.

[0083] Since each sub-region of the face area has a different position and brightness, in order to make the entire face area be in a suitable brightness range, the embodiment of the present invention calculates the position weight and brightness weight of each sub-region respectively, performs multi-dimensional weighted calculation based on the position weight and brightness weight of the sub-region, assigns a comprehensive target weight to each sub-region, and calculates the corrected brightness value of the face area based on the target weight and brightness of each sub-region. The corrected brightness value is a better value obtained after a secondary correction of the target brightness. The face image is exposed based on the corrected brightness value, so that the face area can be in a more suitable brightness range, thereby improving the accuracy of face detection.

[0084] The position weight is related to the distance from the sub-region to the center of the face, and the brightness weight is related to the magnitude relationship between the brightness value of the sub-region and the preset brightness threshold. For example, the position weight assigned to the sub-region closer to the center of the face is larger; for the sub-region whose brightness value is within a reasonable range, the brightness weight assigned to the sub-region is larger.

[0085] In an optional embodiment of the present invention, determining the position weight of each sub-region may include: determining the position weight of each sub-region according to the distance between the position of each sub-region and the center of the face.

[0086] The position weight is related to the distance from the sub-region to the center of the face. For example, the closer the sub-region is to the center of the face, the greater the position weight of the sub-region; the farther the sub-region is from the center of the face, the smaller the position weight of the sub-region. Exemplarily, the position weight of the sub-region can be calculated by the following calculation relationship:

[0087]

[0088] Among them, Weight1 (,j) is the position weight of the sub-region of the i-th row and j-th column, a is the row where the center point of the human face is located, and b is the column where the center point of the human face is located; G is a debugging parameter, and the value of G can be determined according to the number of blocks of the second image. For example, when the number of blocks of the second image is 32×32, the value of G is 64. Generally, the value of G can be the sum of the rows and columns of the number of blocks of the second image. For example, if the number of blocks of the second image M×N is 15×17, the value of G can be 32; if M×N is 16×16, the value of G can be 32.

[0089] It should be noted that the above formula (4) is only an example of calculating the position weight of the sub-region in the embodiment of the present invention, and the embodiment of the present invention does not limit the calculation method of the position weight.

[0090] In an optional embodiment of the present invention, determining the brightness weight of each sub-region may include:

[0091] For any sub-region, if the brightness value of the sub-region does not exceed the first brightness threshold, determining the brightness weight of the sub-region to be the first weight;

[0092] If the brightness value of the sub-region exceeds the first brightness threshold but does not exceed the second brightness threshold, determining the brightness weight of the sub-region to be the second weight;

[0093] If the brightness value of the sub-region exceeds the second brightness threshold, the brightness weight of the sub-region is determined to be a third weight.

[0094] After obtaining the brightness value of each sub-region of the face region, the brightness weight of the sub-region can be calculated using the following calculation relationship:

[0095]

[0096] Among them, Weight2 (,j) is the brightness weight of the sub-region in the i-th row and j-th column, Luma (,) is the brightness value of the sub-region in the i-th row and j-th column, LumaThh1 is the first brightness threshold, LumaThh2 is the second brightness threshold, M is the first weight, 256 is the second weight, and N is the third weight.

[0097] The first brightness threshold and the second brightness threshold may be preset demarcation values. For example, the first brightness threshold may be used to distinguish an overly dark area, and the second brightness threshold may be used to distinguish an overexposed area. The first brightness threshold and the second brightness threshold may be set according to an empirical value, which may be determined by a large number of real-scene captured images.

[0098] It should be noted that the LumaThh1, LumaThh2, M and N debugging parameters can be set to specific values ​​according to the actual scene in the specific implementation. Specifically, the values ​​of LumaThh1 and LumaThh2 vary with the upper and lower limits of the brightness. For example, when the brightness value is 10 bits, the upper limit of the brightness is 1023, and the lower limit of the brightness is 0, then you can set LumaThh1 to 256, LumaThh2 to 718, M to 160, and N to 200; for another example, when the brightness value is 8 bits, the upper limit of the brightness is 255, and the lower limit of the brightness is 0, then you can set LumaThh1 to 64, LumaThh2 to 200, M to 160, and N to 200.

[0099] In an optional embodiment of the present invention, determining the corrected brightness value of the face region in the second image according to the brightness value of each sub-region and the target weight of each sub-region may include:

[0100] Step S51: taking the sum of the products of the brightness value of each sub-region and the target weight of each sub-region as a first sum value;

[0101] Step S52: taking the sum of the target weights of each sub-region as a second sum value;

[0102] Step S53: taking the ratio of the first sum value to the second sum value as the corrected brightness value of the face area in the second image.

[0103] In the embodiment of the present invention, the purpose of setting the position weight is to assign a larger position weight to a sub-region that is closer to the center of the face; the purpose of setting the brightness weight is to assign a larger brightness weight to a sub-region whose brightness value is within a reasonable range.

[0104] In a specific implementation, if a sub-region is at the center of the face, but the sub-region is in an overexposed state, then if the position weight or the brightness weight is used alone, the final calculated corrected brightness value will be inaccurate, resulting in poor exposure. The embodiment of the present invention performs multi-dimensional weighted calculation based on the position weight and brightness weight of the sub-region, and uses the comprehensively obtained target weight to calculate the corrected brightness value of the face region for exposure, so that the calculation of the corrected brightness value of the face region is more comprehensive and precise, ensuring that the face region is in a more appropriate brightness range.

[0105] It should be noted that if no face is detected in the second image, there is no need to adjust the exposure parameters and the current exposure parameters can be maintained.

[0106] In an optional embodiment of the present invention, the method may further include: upon detecting that no face region exists in the second images of a consecutive preset number of frames, restoring the exposure parameters of the image acquisition device to default values.

[0107] The default value refers to the exposure parameter required under the default target brightness. Furthermore, in order to prevent frequent exposure changes from causing too fast brightness changes and thus causing flickering, the embodiment of the present invention needs to continuously detect more than a preset number of frames when a face cannot be detected. After confirming that a face cannot be detected, the default exposure parameter is restored to make the exposure change smoother and avoid flickering.

[0108] In summary, the exposure control method of the embodiment of the present invention includes two stages: pre-exposure and secondary exposure. The pre-exposure stage is used to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene. The backlight coefficient of the current scene can reflect the exposure amount required to be adjusted for the current scene, and pre-exposure is performed according to the backlight coefficient. The secondary exposure stage is used to calculate according to the brightness information of the face area obtained after the pre-exposure to obtain the corrected brightness value of the face area in the current scene. The corrected brightness value is a brightness value obtained by secondary correction of the target brightness, which is more in line with the current backlight scene. The embodiment of the present invention jointly adjusts the exposure parameters of the image acquisition device based on the backlight intensity of the current scene and the face brightness after pre-exposure, so that the brightness of the face area in the backlight scene reaches a more optimal value. When the image acquisition device is in a backlight scene, the situation where the foreground object (such as a face) is too dark can be improved, and the quality of the image acquired by the image acquisition device can be improved to reduce the situation of false detection and missed detection, thereby improving the accuracy of face recognition.

[0109] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0110] Reference Figure 2 , shows a structural block diagram of an embodiment of an exposure control device of the present invention, the device can be applied to a video acquisition device, and the device may include:

[0111] A dynamic range determination module 201, configured to determine a dynamic range of a current scene based on a first image acquired in real time by the image acquisition device under current exposure parameters;

[0112] A backlight coefficient determination module 202, configured to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene;

[0113] A first exposure adjustment module 203, configured to adjust the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter;

[0114] A face brightness calculation module 204, configured to calculate a corrected brightness value of a face region if the second image acquired in real time by the image acquisition device under the pre-exposure parameters contains a face region;

[0115] The second exposure adjustment module 205 is used to adjust the pre-exposure parameter according to the corrected brightness value to obtain a target exposure parameter.

[0116] Optionally, the face brightness calculation module includes:

[0117] A region determination submodule, used to determine a face region in the second image;

[0118] A region division submodule, used for dividing the face region into a preset number of sub-regions;

[0119] A weight determination submodule, used to determine the position weight of each sub-region and the brightness weight of each sub-region; and determine the target weight of each sub-region according to the position weight and the brightness weight of each sub-region;

[0120] The brightness calculation submodule is used to determine the corrected brightness value of the face area in the second image according to the brightness value of each sub-area and the target weight of each sub-area.

[0121] Optionally, the weight determination submodule is specifically used to determine the position weight of each subregion according to the distance between the position of each subregion and the center of the face.

[0122] Optionally, the weight determination submodule is specifically used to:

[0123] For any sub-region, if the brightness value of the sub-region does not exceed the first brightness threshold, determining the brightness weight of the sub-region to be the first weight;

[0124] If the brightness value of the sub-region exceeds the first brightness threshold but does not exceed the second brightness threshold, determining the brightness weight of the sub-region to be the second weight;

[0125] If the brightness value of the sub-region exceeds the second brightness threshold, the brightness weight of the sub-region is determined to be a third weight.

[0126] Optionally, the weight determination submodule is specifically used to:

[0127] Taking the sum of the products of the brightness value of each sub-region and the target weight of each sub-region as the first sum value;

[0128] Taking the sum of the target weights of each sub-region as the second sum value;

[0129] The ratio of the first sum value to the second sum value is used as a corrected brightness value of the face area in the second image.

[0130] Optionally, the region determination submodule is specifically used to: perform face detection on the second image, and if it is detected that the second image includes more than two face regions, determine the face region with the largest area as the face region in the second image.

[0131] Optionally, the dynamic range determination module includes:

[0132] An information acquisition submodule, used to acquire histogram statistical information of the first image, wherein the histogram statistical information includes histogram orders and the number of pixels in each order;

[0133] a brightness determination submodule, configured to determine a dark tone brightness value and a light tone brightness value of the first image according to the histogram statistical information and a preset dark tone starting order threshold, dark tone ending order threshold, light tone starting order threshold, and light tone ending order threshold;

[0134] The range determination submodule is used to determine the dynamic range of the current scene according to the dark tone brightness value and the light tone brightness value of the first image.

[0135] Optionally, the range determination submodule is specifically used to:

[0136] Obtain the dark tone brightness value and the light tone brightness value of each frame of the first image and the first N frames of images, and obtain the dark tone brightness value and the light tone brightness value of the N+1 frame of image;

[0137] The ratio of the sum of the ratios of the bright tone brightness value to the dark tone brightness value of each frame of the N+1 frames of images to N is taken as the dynamic range of the current scene.

[0138] Optionally, the first exposure adjustment module includes:

[0139] A motion detection submodule, used to perform motion detection on the current scene to obtain a motion detection result;

[0140] A first adjustment submodule, configured to adjust the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter if the motion detection result indicates that there is a moving object in the current scene;

[0141] The second adjustment submodule is configured to use the current exposure parameters of the image acquisition device as pre-exposure parameters if the motion detection result indicates that there is no moving object in the current scene.

[0142] The exposure control device of the embodiment of the present invention implements two stages: pre-exposure and secondary exposure. The pre-exposure stage is used to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene. The backlight coefficient of the current scene can reflect the exposure amount required to be adjusted for the current scene, and pre-exposure is performed according to the backlight coefficient. The secondary exposure stage is used to calculate according to the brightness information of the face area obtained after the pre-exposure to obtain the corrected brightness value of the face area in the current scene. The corrected brightness value is a brightness value obtained by secondary correction of the target brightness, which is more in line with the current backlight scene. The embodiment of the present invention jointly adjusts the exposure parameters of the image acquisition device based on the backlight intensity of the current scene and the face brightness after pre-exposure, so that the brightness of the face area in the backlight scene reaches a more optimal value. When the image acquisition device is in a backlight scene, the situation that the foreground object (such as a face) is too dark can be improved, and the quality of the image acquired by the image acquisition device can be improved to reduce the situation of false detection and missed detection, thereby improving the accuracy of face recognition.

[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0146] The embodiment of the present invention also provides a non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), the device can execute the above Figure 1 The description of the exposure control method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0147] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed by the present invention. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0148] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

[0149] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0150] The exposure control method and device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An exposure control method, characterized in that: Applied to an image acquisition device, the method comprises: Determining a dynamic range of a current scene based on a first image acquired in real time by the image acquisition device under current exposure parameters; Correcting the current target brightness according to the dynamic range of the current scene to obtain a backlight coefficient of the current scene; Adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter; If the second image acquired in real time by the image acquisition device under the pre-exposure parameters contains a face area, calculating a corrected brightness value of the face area; The pre-exposure parameter is adjusted according to the corrected brightness value to obtain a target exposure parameter.

2. The method according to claim 1, characterized in that The calculating the corrected brightness value of the face area includes: determining a face region in the second image; Dividing the face region into a preset number of sub-regions; Determine a position weight of each sub-region, and determine a brightness weight of each sub-region; Determining a target weight for each sub-region according to a position weight and a brightness weight for each sub-region; According to the brightness value of each sub-region and the target weight of each sub-region, a corrected brightness value of the face region in the second image is determined.

3. The method according to claim 2, characterized in that The determining of the position weight of each sub-region comprises: The position weight of each sub-region is determined according to the distance between the position of each sub-region and the center of the face.

4. The method according to claim 2, characterized in that: The determining the brightness weight of each sub-region comprises: For any sub-region, if the brightness value of the sub-region does not exceed the first brightness threshold, determining the brightness weight of the sub-region to be the first weight; If the brightness value of the sub-region exceeds the first brightness threshold but does not exceed the second brightness threshold, determining the brightness weight of the sub-region to be the second weight; If the brightness value of the sub-region exceeds the second brightness threshold, the brightness weight of the sub-region is determined to be a third weight.

5. The method according to claim 2, characterized in that: The step of determining the corrected brightness value of the face region in the second image according to the brightness value of each sub-region and the target weight of each sub-region includes: Taking the sum of the products of the brightness value of each sub-region and the target weight of each sub-region as the first sum value; Taking the sum of the target weights of each sub-region as the second sum value; The ratio of the first sum value to the second sum value is used as a corrected brightness value of the face area in the second image.

6. The method according to claim 2, characterized in that The determining of the face region in the second image includes: Performing face detection on the second image, if it is detected that the second image includes more than two face regions, determining the face region with the largest area as the face region in the second image.

7. The method according to claim 1, characterized in that The determining the dynamic range of the current scene based on the first image acquired in real time by the image acquisition device under the current exposure parameters includes: Acquire histogram statistical information of the first image, wherein the histogram statistical information includes histogram orders and the number of pixels in each order; Determine a dark tone brightness value and a light tone brightness value of the first image according to the histogram statistical information and a preset dark tone starting order threshold, dark tone ending order threshold, light tone starting order threshold, and light tone ending order threshold; The dynamic range of the current scene is determined according to the dark tone brightness value and the light tone brightness value of the first image.

8. The method according to claim 7, characterized in that The step of determining the dynamic range of the current scene according to the dark tone brightness value and the bright tone brightness value of the first image includes: Obtain the dark tone brightness value and the light tone brightness value of each frame of the first image and the first N frames of images, and obtain the dark tone brightness value and the light tone brightness value of the N+1 frame of image; The ratio of the sum of the ratios of the bright tone brightness value to the dark tone brightness value of each frame of the N+1 frames of images to N is taken as the dynamic range of the current scene.

9. The method according to claim 1, characterized in that: The step of adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter includes: Performing motion detection on the current scene to obtain a motion detection result; If the motion detection result indicates that there is a moving object in the current scene, adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter; If the motion detection result is that there is no moving object in the current scene, the current exposure parameter of the image acquisition device is used as the pre-exposure parameter.

10. An exposure control device, characterized in that: Applied to an image acquisition device, the device comprises: A dynamic range determination module, configured to determine a dynamic range of a current scene based on a first image acquired in real time by the image acquisition device under current exposure parameters; A backlight coefficient determination module, used to correct the current target brightness according to the dynamic range of the current scene to obtain the backlight coefficient of the current scene; A first exposure adjustment module, used for adjusting the exposure parameter of the image acquisition device according to the backlight coefficient to obtain a pre-exposure parameter; A face brightness calculation module, configured to calculate a corrected brightness value of a face region if a second image captured in real time by the image acquisition device under the pre-exposure parameters contains a face region; The second exposure adjustment module is used to adjust the pre-exposure parameter according to the corrected brightness value to obtain a target exposure parameter.

Citation Information

Cited By

  • Face brightness statistical method, exposure control method, equipment and storage medium

    CN121170869A