A method, apparatus, and device for photographing brightness compensation

By identifying and expanding the processing face area in the on-board driver monitoring system, calculating and transmitting brightness compensation information, the shortcomings of the analog camera in brightness compensation are solved, and higher driving monitoring accuracy and stability are achieved.

CN115802166BActive Publication Date: 2025-05-30SHENZHEN STREAMING VIDEO TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211266993.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2025-05-30
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

In the existing vehicle driver monitoring system, it is difficult for analog cameras to ensure the stability and real-timeness of the monitoring function, and global brightness compensation and fixed-area brightness compensation are difficult to adapt to multiple driving scenarios, which cannot meet the strict requirements for driving monitoring accuracy.

Method used

By obtaining the target image captured by the target camera, identifying and expanding the processed face area, obtaining the second face area, and calculating the brightness compensation information based on the brightness related information of the first face area and the second face area, and transmitting it to the target camera to perform local brightness compensation.

Benefits of technology

It improves the fault tolerance of local dynamic brightness compensation, reduces the requirements for data transmission, adapts to multiple driving scenarios, improves the accuracy of driving monitoring, and effectively reduces the calculation amount of brightness compensation, ensuring the stability and real-timeness of monitoring functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115802166B_ABST
    Figure CN115802166B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of vehicle security technology, and provides a shooting brightness compensation method, device, and equipment. The shooting brightness compensation method includes: obtaining a target image captured by a target camera; wherein, the target camera is a camera equipped with an analog chip; identifying a first face area in the target image, and performing dilation processing on the first face area to obtain a second face area; obtaining brightness compensation information according to the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area; transmitting the position information corresponding to the second face area and the brightness compensation information to the target camera, and controlling the target camera to perform brightness compensation on the shooting area corresponding to the position information according to the brightness compensation information. The above method can ensure the stability and real-time performance of the vehicle monitoring function, and meet the strict requirements for the accuracy of driving monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of vehicle security, and particularly relates to a method, device, and equipment for compensating shooting brightness. Background Art

[0002] In the technical field of vehicle security, a driver monitoring system (DMS, Driver Monitor System) can realize functions such as driver fatigue monitoring, driver attention monitoring, dangerous driving behavior monitoring, and driver identity recognition, which can effectively improve vehicle driving safety.

[0003] Currently, although digital cameras (i.e., cameras equipped with digital chips) that can implement the functions of the driver monitoring system have been popularized, the price of such digital cameras is not advantageous. If an analog camera (i.e., a camera equipped with an analog chip) is used to implement the functions of the driver monitoring system, on the one hand, it is difficult to ensure the stability and real-time performance of the monitoring function due to the inability of the analog chip to process complex algorithms. On the other hand, the methods of global brightness compensation and fixed-region brightness compensation are also difficult to adapt to various driving scenarios and meet the strict requirements for the accuracy of driving monitoring. Summary of the Invention

[0004] Embodiments of this application provide a method, device, and equipment for compensating shooting brightness, which can solve the above problems.

[0005] In a first aspect, embodiments of this application provide a method for compensating shooting brightness, including: obtaining a target image captured by a target camera; where the target camera is a camera equipped with an analog chip; identifying a first face region in the target image, and performing dilation processing on the first face region to obtain a second face region; obtaining brightness compensation information according to the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region; transmitting the position information corresponding to the second face region and the brightness compensation information to the target camera, and controlling the target camera to perform brightness compensation on the shooting region corresponding to the position information according to the brightness compensation information.

[0006] Further, the step of performing dilation processing on the first face region to obtain a second face region includes: obtaining the area information corresponding to the first face region and the area information corresponding to a target image block; where the area information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule; if the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies a preset first brightness compensation condition, performing dilation processing on the first face region to obtain the second face region.

[0007] Further, the dilating the first face region to obtain a second face region includes the steps of: obtaining size information corresponding to the target image block, where the size information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule; and obtaining the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule.

[0008] Further, the obtaining the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule includes the steps of: obtaining the center of the face region corresponding to the first face region; starting from the center of the face region, and performing dilation processing in the directions on both sides of the first axis and the directions on both sides of the second axis respectively with the size information corresponding to the target image block as the size information of the dilation unit corresponding thereto, to obtain the second face region; where if the overlapping area ratio corresponding to the current dilation unit meets a preset dilation condition, continue the dilation processing for the current dilation unit, and if the overlapping area ratio corresponding to the current dilation unit does not meet the preset dilation condition, stop the dilation processing for the current dilation unit, and the overlapping area ratio corresponding to the current dilation unit is the ratio of the overlapping area information between the current dilation unit and the first face region to the area information corresponding to the first face region.

[0009] Further, the brightness compensation information is the sum of first brightness compensation information and second brightness compensation information; the obtaining the brightness compensation information according to the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region includes the steps of: obtaining the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region; obtaining the area information corresponding to the bright region in the first face region and the area information corresponding to the dark region in the first face region, where the brightness information of each pixel point in the bright region is higher than the average brightness information corresponding to the first face region, and the brightness information of each pixel point in the dark region is not higher than the average brightness information corresponding to the first face region; determining the first brightness compensation information according to the area information corresponding to the bright region and the area information corresponding to the dark region; and determining the second brightness compensation information according to the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region.

[0010] Further, determining the first brightness compensation information according to the area information corresponding to the bright part area and the area information corresponding to the dark part area includes the steps of: obtaining first area ratio information according to the ratio of the area information corresponding to the dark part area to the area information corresponding to the bright part area; and obtaining the first brightness compensation information according to the first area ratio information, preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information.

[0011] Further, obtaining the first brightness compensation information according to the first area ratio information, preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information includes the steps of: determining a target area ratio interval where the first area ratio is located according to the first area ratio information and the preset area ratio information; wherein, the end values of the target area ratio interval are two adjacent preset area ratio information; and linearly interpolating to obtain the first brightness compensation information according to the first area ratio information and the brightness compensation reference information corresponding to the end values.

[0012] Further, determining the second brightness compensation information according to the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area includes the steps of: if the difference between the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area satisfies a preset second brightness compensation condition, and the difference between the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area is greater than zero, determining the second brightness compensation information according to a preset first brightness compensation rule; wherein, the preset first brightness compensation rule is used to increase the brightness compensation information; if the difference between the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area satisfies a preset second brightness compensation condition, and the difference between the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area is not greater than zero, determining the second brightness compensation information according to a preset second brightness compensation rule; wherein, the preset second brightness compensation rule is used to decrease the brightness compensation information.

[0013] In a second aspect, an embodiment of the present application provides a shooting brightness compensation device, including: a first acquisition unit configured to acquire a target image captured by a target camera; wherein the target camera is a camera equipped with an analog chip; a first dilation unit configured to identify a first face region in the target image and dilate the first face region to obtain a second face region; a second acquisition unit configured to obtain brightness compensation information based on the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region; a first compensation unit configured to transmit the position information corresponding to the second face region and the brightness compensation information to the target camera, and control the target camera to perform brightness compensation on the shooting region corresponding to the position information according to the brightness compensation information.

[0014] Further, the first dilation unit includes a third acquisition unit and a first determination unit. The third acquisition unit is configured to acquire the area information corresponding to the first face region and the area information corresponding to a target image block; wherein the area information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule. The first determination unit is configured to, if the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies a preset first brightness compensation condition, dilate the first face region to obtain the second face region.

[0015] Further, the first dilation unit includes a fourth acquisition unit and a second dilation unit. The fourth acquisition unit is configured to acquire the size information corresponding to the target image block; wherein the size information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule. The second dilation unit is configured to obtain the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule.

[0016] Further, the second dilation unit is specifically configured to: acquire the center of the face region corresponding to the first face region; starting from the center of the face region, with the size information corresponding to the target image block as the size information corresponding to the dilation unit, perform dilation processing in the directions on both sides of the first axis and the directions on both sides of the second axis respectively to obtain the second face region; wherein, if the overlapping area ratio corresponding to the current dilation unit satisfies a preset dilation condition, continue the dilation processing for the current dilation unit, and if the overlapping area ratio corresponding to the current dilation unit does not satisfy the preset dilation condition, stop the dilation processing for the current dilation unit. The overlapping area ratio corresponding to the current dilation unit is the ratio of the overlapping area information between the current dilation unit and the first face region to the area information corresponding to the first face region.

[0017] Further, the second acquisition unit includes a fifth acquisition unit, a sixth acquisition unit, a first calculation unit, and a second calculation unit; the fifth acquisition unit is configured to acquire the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region; the sixth acquisition unit is configured to acquire the area information corresponding to the bright region in the first face region and the area information corresponding to the dark region in the first face region; wherein, the luminance information corresponding to each pixel point in the bright region is higher than the average luminance information corresponding to the first face region, and the luminance information corresponding to each pixel point in the dark region is not higher than the average luminance information corresponding to the first face region; the first calculation unit is configured to determine the first luminance compensation information according to the area information corresponding to the bright region and the area information corresponding to the dark region; the second calculation unit is configured to determine the second luminance compensation information according to the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region.

[0018] Further, the first calculation unit includes a third calculation unit and a fourth calculation unit. The third calculation unit is configured to obtain first area ratio information according to the ratio of the area information corresponding to the dark region to the area information corresponding to the bright region; the fourth calculation unit is configured to obtain the first luminance compensation information according to the first area ratio information, the preset area ratio information, and the luminance compensation reference information corresponding to each preset area ratio information.

[0019] Further, the fourth calculation unit is specifically configured to: determine the target area ratio interval where the first area ratio is located according to the first area ratio information and the preset area ratio information; wherein, the end values of the target area ratio interval are two adjacent preset area ratio information; linearly interpolate to obtain the first luminance compensation information according to the first area ratio information and the luminance compensation reference information corresponding to the end values.

[0020] Further, the second calculation unit is specifically configured to: if the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region satisfies a preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region is greater than zero, determine the second luminance compensation information according to a preset first luminance compensation rule; wherein the preset first luminance compensation rule is used to increase the luminance compensation information; if the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region satisfies a preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region is not greater than zero, determine the second luminance compensation information according to a preset second luminance compensation rule; wherein the preset second luminance compensation rule is used to decrease the luminance compensation information.

[0021] In a third aspect, an embodiment of the present application provides a shooting luminance compensation device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect above is implemented.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.

[0023] In the embodiment of the present application, by acquiring a target image captured by a target camera, dynamically identifying a first face region, in order to reduce the data transmission volume and prevent frequent changes in the position of luminance compensation, performing dilation processing on the first face region to obtain a second face region, and transmitting the position information corresponding to the second face region to the target camera, thereby improving the fault tolerance of local dynamic highlight compensation, reducing the requirement for data transmission, and further adapting to various driving scenarios and enhancing the accuracy of driving monitoring. Moreover, based on the luminance-related information corresponding to the first face region and the luminance-related information corresponding to the second face region, the luminance compensation information is determined, which can effectively reduce the calculation amount of luminance compensation, ensure the stability and real-time performance of the monitoring function, and efficiently control the target camera to perform luminance compensation on the shooting region corresponding to the position information according to the luminance compensation information. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0025] Figure 1 is a schematic flowchart of a shooting brightness compensation method provided by the first embodiment of the present application;

[0026] Figure 2 is a schematic flowchart of S102 in a shooting brightness compensation method provided by the first embodiment of the present application;

[0027] Figure 3 is a schematic flowchart of S102 in a shooting brightness compensation method provided by the first embodiment of the present application;

[0028] Figure 4 is a schematic flowchart of S103 in a shooting brightness compensation method provided by the first embodiment of the present application;

[0029] Figure 5 is a schematic flowchart of S1033 in a shooting brightness compensation method provided by the first embodiment of the present application;

[0030] Figure 6 is a schematic diagram of a shooting brightness compensation device provided by the second embodiment of the present application;

[0031] Figure 7 is a schematic diagram of a shooting brightness compensation device provided by the third embodiment of the present application. Detailed implementation manners

[0032] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures, technologies, etc. are presented to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0033] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0034] It should also be understood that the term " / and" as used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification of this application and the appended claims, the term "if" may be construed, depending on the context, as "when", "once", "in response to determining", or "in response to detecting". Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be construed, depending on the context, to mean "once determined", "in response to determining", "once [described condition or event] is detected", or "in response to detecting [described condition or event]".

[0036] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are used only for differential description and shall not be construed as indicating or implying relative importance.

[0037] Reference to "one embodiment" or "some embodiments" or the like described in the specification of this application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] Please refer to Figure 1 , Figure 1 is a schematic flowchart of a shooting brightness compensation method provided by the first embodiment of this application. In this embodiment, the execution subject of a shooting brightness compensation method is a device with a shooting brightness compensation function. This device can be a personal computer, a server, a mobile phone, etc. This device can also be a control chip, a microcontroller, etc. This device can also be an in-vehicle DVR (MDVR, Mobile Digital Video), that is, a device that can implement in-vehicle video digital-to-analog conversion and storage compression, and can also implement various functions such as data transmission and audio playback.

[0039] In the embodiment of this application, a two-way UTC transmission function, that is, a two-way coaxial transmission function, can be realized between this device and a target camera. The target camera supports the UTC control function. Therefore, the device can control the camera through a coaxial cable. The target camera refers to a camera equipped with an analog chip.

[0040] As Figure 1 shown, the shooting brightness compensation method may include:

[0041] S101: Obtain a target image captured by a target camera; wherein, the target camera is a camera equipped with an analog chip.

[0042] The device obtains a target image captured by a target camera.

[0043] Wherein, the target camera is a camera equipped with an analog chip. It can be understood that the signal output by the target camera is an analog video signal.

[0044] In an alternative embodiment, the target camera may be an AHD camera, that is, a high-definition analog camera, and the signal output by the AHD camera is a high-definition analog video signal.

[0045] Specifically, the device receives an analog video signal from the target camera, analyzes the analog video signal, and obtains a number of frames of target images. Among them, the driver's image is recorded in the target image.

[0046] S102: Identify the first face region in the target image, and perform dilation processing on the first face region to obtain a second face region.

[0047] The device identifies the first face region in the target image. Specifically, the device identifies the first face region in the target image according to the existing face recognition algorithm, and the existing face recognition algorithm is not limited herein.

[0048] In an alternative embodiment, the first face region is the region surrounded by the face boundary pixel points. In this case, the first face region may be an irregular-shaped region.

[0049] In another alternative embodiment, an external circumscribed rectangle is determined according to a number of face boundary pixel points, and the region within the external rectangle is defined as the first face region. In this case, the first face region is a rectangular region. Compared with the irregular-shaped region, the rectangular region is more conducive to determining the position information corresponding to the first face region and calculating the area information corresponding to the first face region, etc.

[0050] Next, it will be separately described under what circumstances operations such as dilation processing will continue, and how to perform dilation processing.

[0051] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of S102 in a shooting brightness compensation method provided in the first embodiment of the present application. In S102, the dilation processing of the first face region to obtain a second face region specifically includes the steps:

[0052] S1021: Obtain the area information corresponding to the first face region and the area information corresponding to the target image block; wherein, the area information corresponding to the target image block is determined according to the size information of the target image and a preset image segmentation rule.

[0053] The device obtains the area information corresponding to the first face region and the area information corresponding to the target image block.

[0054] Among them, if the first face region is an irregular shape region, the area information corresponding to the first face region can be calculated according to the position information of the face boundary points and a preset calculus algorithm.

[0055] If the first face region is a rectangular region, the area information corresponding to the first face region can be calculated according to the width information corresponding to the rectangular region and the length information corresponding to the rectangular region.

[0056] The area information corresponding to the target image block is determined according to the size information of the target image and a preset image segmentation rule.

[0057] The target image can be a 1080P image or a 720P image. For a 1080P image, its corresponding size information is 1920*1080, and for a 720P image, its corresponding size information is 1280*720.

[0058] The preset image segmentation rule is used to indicate how to segment the target image into target image blocks.

[0059] In an optional implementation manner, the preset image segmentation rule is used to indicate that the target image is segmented into 8*8 target image blocks. In this case, for a 1920*1080 target image, the size information corresponding to the target image block is (1920 / 8)*(1080 / 8), and for a 1280*720 target image, the size information corresponding to the target image block is (1280 / 8)*(720 / 8). Furthermore, based on the size information corresponding to the target image block, the area information corresponding to the target image block can be determined.

[0060] S1022: If the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies a preset first brightness compensation condition, perform dilation processing on the first face region to obtain the second face region.

[0061] The device determines whether the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies a preset first brightness compensation condition.

[0062] If so, perform dilation processing on the first face region to obtain the second face region.

[0063] In an alternative embodiment, the first brightness compensation condition is that the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block is not less than n, where n is a positive number and can take the value of 4.

[0064] If not, no dilation processing is performed and the subsequent steps are executed. This is because if the area corresponding to the first face region is too small, abnormal jitter is likely to occur, so brightness compensation can be performed in the original brightness compensation manner of the camera.

[0065] In this embodiment, by determining whether the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies the preset first brightness compensation condition, dilation operation is performed when the preset first brightness compensation condition is satisfied, and no dilation processing is performed and the subsequent steps are not executed when the preset first brightness compensation condition is not satisfied, thereby effectively avoiding abnormal jitter of the image and improving the safety of the driving monitoring system.

[0066] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of S102 in a method for compensating shooting brightness provided in the first embodiment of the present application. In S102, the first face region is dilated to obtain a second face region, which specifically includes the steps:

[0067] S1023: Obtain the size information corresponding to the target image block; wherein, the size information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule.

[0068] How to obtain the size information corresponding to the target image block has been elaborated in detail in step S1021, and will not be elaborated here.

[0069] S1024: Obtain the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule.

[0070] The device obtains the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule.

[0071] In an alternative embodiment, the size information corresponding to the target image block is the size information corresponding to the dilation unit, where the size information corresponding to the dilation unit is the size information corresponding to the smallest unit dilated each time a dilation operation is performed. In this embodiment, the preset dilation rule is not specifically limited, and the second face region dilated based on the preset dilation rule can cover the first face region.

[0072] In another alternative embodiment, the device first obtains the center of the face region corresponding to the first face region.

[0073] Among them, if the first face region is a rectangular region, the center of the face region corresponding to the first face region is the center of the rectangular region.

[0074] After that, the device takes the center of the face region as the starting point, and uses the size information corresponding to the target image block as the size information corresponding to the dilation unit, and performs dilation processing in the directions on both sides of the first axis and the directions on both sides of the second axis respectively to obtain a second face region.

[0075] Optionally, placing the target image in a rectangular coordinate system, the first axis and the second axis can be the x-axis and the y-axis respectively. Therefore, the device takes the center of the face region as the starting point, and performs dilation in the positive and negative directions of the x-axis and the positive and negative directions of the y-axis respectively. The size information corresponding to the dilation unit is the size information corresponding to the smallest unit dilated each time a dilation operation is performed.

[0076] The following describes under what circumstances a dilation operation is performed, that is, if the overlap area ratio corresponding to the current dilation unit meets the preset dilation condition, the dilation processing for the current dilation unit continues. It can be understood that when determining whether the preset dilation condition is met, the device has not determined whether the current dilation unit is dilated. Only when the overlap area ratio corresponding to the current dilation unit meets the preset dilation condition, the device will dilate the current dilation unit, and use the current dilation unit as a reference to obtain the next dilation unit, and determine whether the overlap area ratio corresponding to the next dilation unit meets the preset dilation condition.

[0077] If the overlap area ratio corresponding to the current dilation unit does not meet the preset dilation condition, the dilation processing for the current dilation unit stops. That is to say, the device will not dilate the current dilation unit, and will not continue to use the current dilation unit as a reference to obtain the next dilation unit.

[0078] The overlap area ratio corresponding to the above-mentioned current dilation unit is the ratio of the overlap area information between the current dilation unit and the first face region to the area information corresponding to the first face region.

[0079] The preset dilation condition can be that the overlap area ratio corresponding to the current dilation unit is not less than 1 / m, where m is a positive number, and m can take the value of 4.

[0080] In an alternative embodiment, all dilated dilation units constitute the second face region. In another alternative embodiment, the device obtains the dilation units that are farthest from the center of the face region in the directions on both sides of the first axis and the directions on both sides of the second axis, and extends the borders of each dilation unit horizontally or vertically to form the second face region. It can be understood that in this case, the dilated second face region is a rectangular region.

[0081] S103: Obtain brightness compensation information based on the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area.

[0082] The device obtains brightness compensation information based on the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area.

[0083] The brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area can reflect the display state of the driver's face image in the target image, whether it is overexposed, underexposed, or even whether there is a phenomenon of uneven lighting on both sides of the face. Therefore, based on the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area, obtaining brightness compensation information can better perform dynamic brightness compensation on the driver's face when photographing.

[0084] In an alternative embodiment, please refer to Figure 4 , Figure 4 which is a schematic flowchart of S103 in a method for photographing brightness compensation provided in the first embodiment of the present application. S103 includes the steps of:

[0085] S1031: Obtain the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area.

[0086] The device obtains the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area.

[0087] Among them, the average brightness information corresponding to the first face area is the average value of the brightness information corresponding to each pixel point in the first face area.

[0088] The average brightness information corresponding to the second face area is the average value of the brightness information corresponding to each pixel point in the second face area.

[0089] S1032: Obtain the area information corresponding to the bright area in the first face area and the area information corresponding to the dark area in the first face area; wherein, the brightness information corresponding to each pixel point in the bright area is higher than the average brightness information corresponding to the first face area, and the brightness information corresponding to each pixel point in the dark area is not higher than the average brightness information corresponding to the first face area.

[0090] The device obtains the area information corresponding to the bright area in the first face area and the area information corresponding to the dark area in the first face area.

[0091] Among them, the brightness information corresponding to each pixel point in the bright area is higher than the average brightness information corresponding to the first face area.

[0092] The brightness information corresponding to each pixel point in the dark area is not higher than the average brightness information corresponding to the first face area.

[0093] The area information corresponding to the bright area is determined according to the total number of pixel points in the bright area, and the area information corresponding to the dark area is determined according to the total number of pixel points in the dark area.

[0094] S1033: Determine the first brightness compensation information according to the area information corresponding to the bright area and the area information corresponding to the dark area.

[0095] In this embodiment, the brightness compensation information is the sum of the first brightness compensation information and the second brightness compensation information.

[0096] The device determines the first brightness compensation information according to the area information corresponding to the bright area and the area information corresponding to the dark area.

[0097] In an optional real-time mode, please refer to Figure 5 , Figure 5 is a schematic flowchart of S1033 in a shooting brightness compensation method provided in the first embodiment of the present application. S1033 includes the steps:

[0098] S10331: Obtain the first area ratio information according to the ratio of the area information corresponding to the dark area to the area information corresponding to the bright area.

[0099] The device obtains the first area ratio information according to the ratio of the area information corresponding to the dark area to the area information corresponding to the bright area. Among them, the area information corresponding to the dark area is expressed as Sdark, the area information corresponding to the bright area is expressed as Slight, and the first area ratio information is expressed as Sdark / Slight.

[0100] S10332: Obtain the first brightness compensation information according to the first area ratio information, the preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information.

[0101] The device obtains the first brightness compensation information according to the first area ratio information, the preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information.

[0102] For example, the preset area ratio information includes 5:1, 3:1, 1:1, 1:3, and 1:5. Each preset area ratio information corresponds to brightness compensation reference information. The brightness compensation reference information corresponding to the preset area ratio information 5:1 is T1, the brightness compensation reference information corresponding to the preset area ratio information 3:1 is T2, the brightness compensation reference information corresponding to the preset area ratio information 1:1 is T3, the brightness compensation reference information corresponding to the preset area ratio information 1:3 is T4, and the brightness compensation reference information corresponding to the preset area ratio information 1:5 is T5.

[0103] In an alternative embodiment, the device may set the brightness compensation reference information corresponding to the preset area ratio information as the first brightness compensation information according to which preset area ratio information the first area ratio information is closer to.

[0104] In another alternative embodiment, the device may determine a target area ratio interval where the first area ratio information is located according to the first area ratio information and the preset area ratio information.

[0105] Wherein, the end values of the target area ratio interval are two adjacent preset area ratio information.

[0106] For example: if the first area ratio information is 1:4, then the target area ratio interval where the first area ratio information is located is [1:3, 1:5], and the end values 1:3 and 1:5 of the target area ratio interval are two adjacent preset area ratio information in the above example.

[0107] After that, the device linearly interpolates to obtain the first brightness compensation information according to the first area ratio information and the brightness compensation reference information corresponding to the end values.

[0108] The brightness compensation reference information corresponding to the preset area ratio information 1:3 is T4, and the brightness compensation reference information corresponding to the preset area ratio information 1:5 is T5. The first area ratio information is 1:4, and its distances from the preset area ratio information 1:3 and the preset area ratio information 1:5 are the same. Therefore, the first brightness compensation information obtained by linear interpolation is (T4 + T5) / 2.

[0109] S1034: Determine the second brightness compensation information according to the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region.

[0110] The device determines the second brightness compensation information according to the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region.

[0111] The average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region have been explained above.

[0112] The average luminance information corresponding to the first face area is denoted as AvgSface.

[0113] The average luminance information AvgSAll corresponding to the second face area.

[0114] In an optional implementation, if the difference between the average luminance information corresponding to the first face area and the average luminance information corresponding to the second face area satisfies a preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face area and the average luminance information corresponding to the second face area is greater than zero, the device determines the second luminance compensation information according to a preset first luminance compensation rule.

[0115] Among them, the difference between the average luminance information corresponding to the first face area and the average luminance information corresponding to the second face area satisfies the preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face area and the average luminance information corresponding to the second face area is greater than zero, indicating that the current imaging is greatly affected by the non-first face area. Therefore, the luminance compensation information is increased by the preset first luminance compensation rule.

[0116] Optionally, the preset second luminance compensation condition is that the absolute value of the difference between the average luminance information corresponding to the first face area and the average luminance information corresponding to the second face area is greater than a first threshold, and the first threshold is denoted as tolerance. Therefore, the preset second luminance compensation condition is |AvgSface - AvgSAll| > tolerance.

[0117] Based on the above, if |AvgSface - AvgSAll| > tolerance and AvgSface - AvgSAlla > 0, the device determines the second luminance compensation information according to the preset first luminance compensation rule.

[0118] Optionally, the preset first luminance compensation rule increases the luminance compensation information based on the backlight compensation range. That is to say, when applying the preset first luminance compensation rule, the second luminance compensation information is a positive value.

[0119] Among them, the left endpoint value of the above backlight compensation range is the normal luminance compensation reference value Tref of the analog camera in a normal scene, the right endpoint value is the maximum luminance compensation value BLCmax when the face exposure image reaches the eye details, Level = (BLCmax - Tref) / 2, and the second luminance compensation information is Level / 2.

[0120] If the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region satisfies a preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region is not greater than zero, the device determines the second luminance compensation information according to the preset second luminance compensation rule.

[0121] Among them, the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region satisfies the preset second luminance compensation condition, and the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region is not greater than zero, indicating that the exposure of the current first face region is excessive. Therefore, the luminance compensation information is reduced by the preset second luminance compensation rule.

[0122] Optionally, the preset second luminance compensation condition is that the absolute value of the difference between the average luminance information corresponding to the first face region and the average luminance information corresponding to the second face region is greater than a first threshold, and the first threshold is represented as tolerance. Therefore, the preset second luminance compensation condition is |AvgSface - AvgSAll| > tolerance.

[0123] Based on the above, if |AvgSface - AvgSAll| > tolerance and AvgSface - AvgSAll < 0, the device determines the second luminance compensation information according to the preset second luminance compensation rule.

[0124] Optionally, the preset second luminance compensation rule reduces the luminance compensation information based on the backlight compensation range. That is to say, when applying the preset second luminance compensation rule, the second luminance compensation information is negative.

[0125] Among them, the left endpoint value of the above backlight compensation range is the normal luminance compensation reference value Tref of the analog camera in a normal scene, the right endpoint value is the maximum luminance compensation value BLCmax when the face exposure image reaches the eye details, Level = (BLCmax - Tref) / 2, and the second luminance compensation information is -Level / 2.

[0126] S104: Transmit the position information corresponding to the second face region and the luminance compensation information to the target camera, and control the target camera to perform luminance compensation on the shooting region corresponding to the position information according to the luminance compensation information.

[0127] The device transmits the position information corresponding to the second face region and the luminance compensation information to the target camera, and controls the target camera to perform luminance compensation on the shooting region corresponding to the position information according to the luminance compensation information.

[0128] In an alternative embodiment, the device controls the target camera to obtain the original brightness compensation information, and performs brightness compensation on the shooting area corresponding to the position information according to the sum of the brightness compensation information and the original brightness compensation information.

[0129] In the embodiment of the present application, by obtaining the target image captured by the target camera and dynamically identifying the first face area, in order to reduce the amount of data transmission and prevent frequent changes in the position of brightness compensation, the first face area is dilated to obtain the second face area, and the position information corresponding to the second face area is transmitted to the target camera, thereby improving the fault tolerance of local dynamic highlight compensation, reducing the requirement for data transmission, and further adapting to various driving scenarios and enhancing the accuracy of driving monitoring. Moreover, based on the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area, the brightness compensation information is determined, which can effectively reduce the calculation amount of brightness compensation, ensure the stability and real-time performance of the monitoring function, and efficiently control the target camera to perform brightness compensation on the shooting area corresponding to the position information according to the brightness compensation information.

[0130] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0131] Please refer to Figure 6 , Figure 6 which is a schematic diagram of the shooting brightness compensation device provided in the second embodiment of the present application. Each unit included is used to execute Figure 1 the corresponding steps in the embodiment. For details, please refer to Figure 1 the relevant descriptions in the corresponding embodiment. For the sake of convenience of description, only the parts related to this embodiment are shown. Refer to Figure 6 , the shooting brightness compensation device 6 includes:

[0132] The first acquisition unit 61 is used to acquire the target image captured by the target camera; wherein, the target camera is a camera equipped with an analog chip;

[0133] The first dilation unit 62 is used to identify the first face area in the target image and dilate the first face area to obtain the second face area;

[0134] The second acquisition unit 63 is used to obtain the brightness compensation information according to the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area;

[0135] The first compensation unit 64 is configured to transmit the position information corresponding to the second face region and the brightness compensation information to the target camera, and control the target camera to perform brightness compensation on the shooting region corresponding to the position information according to the brightness compensation information.

[0136] Further, the first dilation unit 62 includes a third acquisition unit and a first determination unit. The third acquisition unit is configured to acquire the area information corresponding to the first face region and the area information corresponding to the target image block, where the area information corresponding to the target image block is determined according to the size information of the target image and a preset image segmentation rule. The first determination unit is configured to dilate the first face region to obtain the second face region if the ratio of the area information corresponding to the first face region to the area information corresponding to the target image block satisfies a preset first brightness compensation condition.

[0137] Further, the first dilation unit 62 includes a fourth acquisition unit and a second dilation unit. The fourth acquisition unit is configured to acquire the size information corresponding to the target image block, where the size information corresponding to the target image block is determined according to the size information of the target image and a preset image segmentation rule. The second dilation unit is configured to obtain the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule.

[0138] Further, the second dilation unit is specifically configured to: acquire the center of the face region corresponding to the first face region; starting from the center of the face region, with the size information corresponding to the target image block as the size information corresponding to the dilation unit, perform dilation processing in the directions on both sides of the first axis and the directions on both sides of the second axis to obtain the second face region. If the overlapping area ratio corresponding to the current dilation unit satisfies a preset dilation condition, continue the dilation processing for the current dilation unit. If the overlapping area ratio corresponding to the current dilation unit does not satisfy the preset dilation condition, stop the dilation processing for the current dilation unit. The overlapping area ratio corresponding to the current dilation unit is the ratio of the overlapping area information between the current dilation unit and the first face region to the area information corresponding to the first face region.

[0139] Further, the second obtaining unit 63 includes a fifth obtaining unit, a sixth obtaining unit, a first calculating unit, and a second calculating unit; the fifth obtaining unit is configured to obtain the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region; the sixth obtaining unit is configured to obtain the area information corresponding to the bright region in the first face region and the area information corresponding to the dark region in the first face region; wherein, the brightness information corresponding to each pixel point in the bright region is higher than the average brightness information corresponding to the first face region, and the brightness information corresponding to each pixel point in the dark region is not higher than the average brightness information corresponding to the first face region; the first calculating unit is configured to determine the first brightness compensation information according to the area information corresponding to the bright region and the area information corresponding to the dark region; the second calculating unit is configured to determine the second brightness compensation information according to the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region.

[0140] Further, the first calculating unit includes a third calculating unit and a fourth calculating unit. The third calculating unit is configured to obtain a first area ratio information according to the ratio of the area information corresponding to the dark region to the area information corresponding to the bright region; the fourth calculating unit is configured to obtain the first brightness compensation information according to the first area ratio information, the preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information.

[0141] Further, the fourth calculating unit is specifically configured to: determine a target area ratio interval where the first area ratio is located according to the first area ratio information and the preset area ratio information; wherein, the end values of the target area ratio interval are two adjacent preset area ratio information; linearly interpolate to obtain the first brightness compensation information according to the first area ratio information and the brightness compensation reference information corresponding to the end values.

[0142] Further, the second calculation unit is specifically configured to: if the difference between the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region satisfies a preset second brightness compensation condition, and the difference between the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region is greater than zero, determine the second brightness compensation information according to a preset first brightness compensation rule; wherein, the preset first brightness compensation rule is used to increase the brightness compensation information; if the difference between the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region satisfies a preset second brightness compensation condition, and the difference between the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region is not greater than zero, determine the second brightness compensation information according to a preset second brightness compensation rule; wherein, the preset second brightness compensation rule is used to decrease the brightness compensation information.

[0143] Please refer to Figure 7 , Figure 7 which is a schematic diagram of a shooting brightness compensation device provided in the third embodiment of the present application. As Figure 7 shown, the shooting brightness compensation device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70, such as a shooting brightness compensation program. When the processor 70 executes the computer program 72, the steps in the above-mentioned various shooting brightness compensation method embodiments are implemented, such as Figure 1 the steps S101 to S104 shown. Alternatively, when the processor 70 executes the computer program 72, the functions of each module / unit in the above-mentioned device embodiments are implemented, such as Figure 6 the functions of the first acquisition unit 61 to the first compensation unit 64 shown.

[0144] Exemplarily, the computer program 72 can be divided into one or more modules / units. The one or more modules / units are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 72 in the shooting brightness compensation device 7. For example, the computer program 72 can be divided into a first acquisition unit, a first dilation unit, a second acquisition unit, and a first compensation unit. The specific functions of each unit are as follows:

[0145] The first acquisition unit is used to acquire a target image captured by a target camera; wherein, the target camera is a camera equipped with an analog chip;

[0146] A first dilation unit for identifying a first face region in the target image and dilating the first face region to obtain a second face region;

[0147] A second acquisition unit for obtaining brightness compensation information according to the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region;

[0148] A first compensation unit for transmitting the position information corresponding to the second face region and the brightness compensation information to the target camera, and controlling the target camera to perform brightness compensation on the shooting region corresponding to the position information according to the brightness compensation information.

[0149] The shooting brightness compensation device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art can understand that Figure 7 merely examples of the shooting brightness compensation device 7, which do not constitute a limitation on the shooting brightness compensation device 7, and may include more or fewer components than shown, or combine certain components, or different components. For example, the shooting brightness compensation device may further include input / output devices, network access devices, buses, etc.

[0150] The so-called processor 70 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0151] The memory 71 may be an internal storage unit of the shooting brightness compensation device 7, such as a hard disk or memory of the shooting brightness compensation device 7. The memory 71 may also be an external storage device of the shooting brightness compensation device 7, such as a plug-in hard disk equipped on the shooting brightness compensation device 7, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the shooting brightness compensation device 7 may also include both an internal storage unit of the shooting brightness compensation device 7 and an external storage device. The memory 71 is used to store the computer program and other programs and data required by the shooting brightness compensation device. The memory 71 may also be used to temporarily store data that has been output or will be output.

[0152] It should be noted that, for the information interaction, execution process, etc. between the above-mentioned device / unit, due to the same concept as the method embodiment of the present application, for its specific functions and the technical effects brought, please refer to the method embodiment part for details, and will not be elaborated here.

[0153] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above method embodiments are implemented.

[0154] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments can be implemented.

[0155] An embodiment of the present application provides a computer program product, when the computer program product runs on a mobile terminal, it enables the mobile terminal to implement the steps in any of the above method embodiments when executed.

[0156] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0157] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0158] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0159] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0160] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for compensating shooting brightness, characterized in that, the method includes the steps of: obtaining a target image captured by a target camera; wherein, the target camera is a camera equipped with an analog chip; identifying a first face area in the target image and dilating the first face area to obtain a second face area; obtaining brightness compensation information according to the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area; transmitting the position information corresponding to the second face area and the brightness compensation information to the target camera, and controlling the target camera to perform brightness compensation on the shooting area corresponding to the position information according to the brightness compensation information; the brightness compensation information is the sum of a first brightness compensation information and a second brightness compensation information; the step of obtaining brightness compensation information according to the brightness-related information corresponding to the first face area and the brightness-related information corresponding to the second face area includes the steps of: obtaining the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area; obtaining the area information corresponding to the bright area in the first face area and the area information corresponding to the dark area in the first face area; wherein, the brightness information corresponding to each pixel point in the bright area is higher than the average brightness information corresponding to the first face area, and the brightness information corresponding to each pixel point in the dark area is not higher than the average brightness information corresponding to the first face area; determining the first brightness compensation information according to the area information corresponding to the bright area and the area information corresponding to the dark area; determining the second brightness compensation information according to the average brightness information corresponding to the first face area and the average brightness information corresponding to the second face area.

2. The method for compensating shooting brightness according to claim 1, characterized in that, the step of dilating the first face area to obtain a second face area includes the steps of: obtaining the area information corresponding to the first face area and the area information corresponding to a target image block; wherein, the area information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule; if the ratio of the area information corresponding to the first face area to the area information corresponding to the target image block meets a preset first brightness compensation condition, dilating the first face area to obtain the second face area.

3. The method for compensating shooting brightness according to claim 1, characterized in that, the step of dilating the first face area to obtain a second face area includes the steps of: obtaining the size information corresponding to the target image block; wherein, the size information corresponding to the target image block is determined according to the size information corresponding to the target image and a preset image segmentation rule; obtaining the second face area according to the first face area, the size information corresponding to the target image block and a preset dilation rule.

4. According to the method for compensating shooting brightness according to claim 3, characterized in that, Obtaining the second face region according to the first face region, the size information corresponding to the target image block, and a preset dilation rule includes the steps of: Obtaining the center of the face region corresponding to the first face region; Taking the center of the face region as a starting point, and taking the size information corresponding to the target image block as the size information of the dilation unit corresponding thereto, performing dilation processing in the directions on both sides of the first axis and the directions on both sides of the second axis respectively to obtain the second face region; wherein, if the overlapping area ratio corresponding to the current dilation unit meets the preset dilation condition, continue the dilation processing for the current dilation unit, and if the overlapping area ratio corresponding to the current dilation unit does not meet the preset dilation condition, stop the dilation processing for the current dilation unit, and the overlapping area ratio corresponding to the current dilation unit is the ratio of the overlapping area information between the current dilation unit and the first face region to the area information corresponding to the first face region.

5. The shooting brightness compensation method according to claim 1, characterized in that determining the first brightness compensation information according to the area information corresponding to the bright region and the area information corresponding to the dark region includes the steps of: Obtaining first area ratio information according to the ratio of the area information corresponding to the dark region to the area information corresponding to the bright region; Obtaining the first brightness compensation information according to the first area ratio information, the preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information.

6. The shooting brightness compensation method according to claim 5, characterized in that obtaining the first brightness compensation information according to the first area ratio information, the preset area ratio information, and the brightness compensation reference information corresponding to each preset area ratio information includes the steps of: Determining the target area ratio interval where the first area ratio is located according to the first area ratio information and the preset area ratio information; wherein, the end values of the target area ratio interval are two adjacent preset area ratio information; Linearly interpolating to obtain the first brightness compensation information according to the first area ratio information and the brightness compensation reference information corresponding to the end values.

7. A shooting brightness compensation device, characterized in that comprising: A first acquisition unit, configured to acquire a target image captured by a target camera; wherein, the target camera is a camera equipped with an analog chip; A first dilation unit, configured to identify a first face region in the target image and perform dilation processing on the first face region to obtain a second face region; A second acquisition unit, configured to obtain brightness compensation information according to the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region; A first compensation unit, configured to transmit the position information corresponding to the second face region and the brightness compensation information to the target camera, and control the target camera to perform brightness compensation on the shooting region corresponding to the position information according to the brightness compensation information; The brightness compensation information is the sum of the first brightness compensation information and the second brightness compensation information; Obtaining the brightness compensation information according to the brightness-related information corresponding to the first face region and the brightness-related information corresponding to the second face region includes: Obtaining the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region; Obtaining the area information corresponding to the bright region in the first face region and the area information corresponding to the dark region in the first face region; wherein, the brightness information corresponding to each pixel point in the bright region is higher than the average brightness information corresponding to the first face region, and the brightness information corresponding to each pixel point in the dark region is not higher than the average brightness information corresponding to the first face region; Determining the first brightness compensation information according to the area information corresponding to the bright region and the area information corresponding to the dark region; Determining the second brightness compensation information according to the average brightness information corresponding to the first face region and the average brightness information corresponding to the second face region.

8. A shooting brightness compensation device, including: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image optimizing method, image optimizing device and terminal

    CN106791471A

  • Face exposure adjustment method and device, equipment terminal and readable storage medium

    CN113989909A