Infrared image face exposure method, device, equipment and storage medium

By judging the brightness of the face area in the infrared image and adjusting the exposure parameters, it solves the problem of the face area being too dark or overexposed in backlight or strong forward light scenes, and achieves clear face image acquisition and face recognition in these scenes. Recognition accuracy is improved.

CN112819722BActive Publication Date: 2024-09-20DONGGUAN VISIONX-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110157199.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-03
Publication Date
2024-09-20
Estimated Expiration
2041-02-03

AI Technical Summary

Technical Problem

In backlight scenes or strong forward light scenes, the existing technology adjusts the camera exposure parameters by adjusting the average brightness of the entire infrared image, which may cause the face area to be too dark or overexposed, making it impossible to obtain a clear face image.

Method used

By obtaining the brightness of the face area collected by the infrared camera, determine the deviation from the preset target brightness, and adjust the exposure parameters of the infrared camera so that the brightness of the face area is within the preset range, including increasing or decreasing the exposure parameters until Meet the preset brightness requirements.

Benefits of technology

In backlight or strong forward light scenes, it ensures the acquisition of clear face images, avoids the problem of over-black or over-exposure of the face area in the existing technology, and improves the accuracy of face recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112819722B
    Figure CN112819722B
Patent Text Reader

Abstract

The present application provides an infrared image face exposure method, device, equipment and storage medium, which relates to the field of image processing technology. The method includes: obtaining a face area in an infrared image collected by an infrared camera; calculating the brightness of the face area in the infrared image; determining whether the brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range; if the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera; and exposing the face area in the infrared image according to the adjusted exposure parameters. By applying the embodiments of the present application, a clear face image can be obtained when the target object is in a backlit scene or a strong front-lit scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an infrared image face exposure method, device, equipment and storage medium. Background Art

[0002] With the development of face recognition technology, it has been widely used in face payment, face unlocking, etc. Specifically, the face can be recognized by a 3D structured light module included in the face recognition device and a processor connected to the 3D structured light module.

[0003] At present, when the target object is in a backlit scene or a strong front-lit scene, the exposure parameters of the camera are mainly adjusted according to the average brightness of the entire area of ​​the target object, so that the average brightness of the entire area of ​​the target object reaches a preset brightness, and face recognition is performed based on the entire area of ​​the target object after reaching the preset brightness.

[0004] However, when recognizing a face, the main focus is on the face area. If the exposure parameters of the camera are adjusted in the above manner, the face area may be too dark or overexposed, which will result in the inability to obtain a clear face image. Summary of the invention

[0005] The purpose of the present application is to provide an infrared image face exposure method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, which can obtain clear face images when the target object is in a backlit scene or a strong front-lit scene.

[0006] In a first aspect, an embodiment of the present application provides an infrared image face exposure method, the method comprising:

[0007] Obtain the face area in the infrared image collected by the infrared camera;

[0008] Calculating the brightness of the face area in the infrared image;

[0009] Determining whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range;

[0010] If the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera;

[0011] The face region in the infrared image is exposed according to the adjusted exposure parameters.

[0012] Optionally, if the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameter of the infrared camera includes:

[0013] If the brightness deviation is not within the preset brightness deviation range, and the brightness of the face area is less than the preset target brightness, then increasing the exposure parameter of the infrared camera;

[0014] If the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is greater than the preset target brightness, the exposure parameter of the infrared camera is reduced.

[0015] Optionally, adjusting the exposure parameters of the infrared camera includes:

[0016] According to the preset unit exposure parameter, the exposure parameter of the infrared camera is adjusted until the brightness deviation between the brightness of the face area in the infrared image exposed based on the adjusted exposure parameter and the preset target brightness is within the preset brightness deviation range.

[0017] Optionally, before acquiring the face area in the infrared image captured by the infrared camera, the method further includes:

[0018] If the application layer cannot recognize the face in the infrared image, then obtaining the position of the face frame transmitted by the application layer, where the position of the face frame is the position obtained by the application layer through face recognition based on the color image acquired by the color camera;

[0019] According to the position of the face frame, an area surrounded by the face frame in the infrared image is determined as the face area.

[0020] Optionally, obtaining a face area in an infrared image captured by an infrared camera includes:

[0021] If the application layer recognizes faces from multiple frames of infrared images continuously captured by the infrared camera, then the face region of each frame of the infrared image is obtained;

[0022] The calculating the brightness of the face area in the infrared image includes:

[0023] The brightness of the face area in each frame of the infrared image is calculated to obtain the target face brightness.

[0024] Optionally, respectively calculating the brightness of the face area in each frame of the infrared image to obtain the target face brightness includes:

[0025] Dividing the face region in each frame of the infrared image into grids to obtain a plurality of face grids;

[0026] The target face brightness is obtained according to the average brightness of the multiple face grids.

[0027] Optionally, before determining whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range, the method further includes:

[0028] Acquire multiple groups of infrared sample images, each group of infrared sample images includes: multiple infrared sample images collected by the infrared camera at the same position, different groups of infrared images are infrared sample images collected by the infrared camera at different positions, and different positions correspond to different exposure parameters;

[0029] According to a preset brightness constraint condition, selecting a group of infrared sample images satisfying the preset brightness constraint condition from the multiple groups of infrared sample images as target infrared sample images;

[0030] The brightness of the face area in the target infrared sample image is used as the preset target brightness.

[0031] In a second aspect, an embodiment of the present application further provides an infrared image face exposure device, the device comprising:

[0032] An acquisition module is used to acquire the face area in the infrared image collected by the infrared camera;

[0033] A calculation module, used for calculating the brightness of the face area in the infrared image;

[0034] A judgment module, used to judge whether the brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range;

[0035] An adjustment module, configured to adjust the exposure parameters of the infrared camera if the brightness deviation is not within the preset brightness deviation range;

[0036] An exposure module is used to expose the face area in the infrared image according to the adjusted exposure parameters.

[0037] Optionally, the adjustment module is specifically used to increase the exposure parameters of the infrared camera if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is less than the preset target brightness; if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is greater than the preset target brightness, then reduce the exposure parameters of the infrared camera.

[0038] Optionally, the adjustment module is also specifically used to adjust the exposure parameters of the infrared camera according to a preset unit exposure parameter until the brightness deviation between the brightness of the face area in the infrared image after exposure based on the adjusted exposure parameter and the preset target brightness is within the preset brightness deviation range.

[0039] Optionally, the acquisition module is also used to obtain the position of the face frame transmitted by the application layer if the application layer cannot recognize the face in the infrared image, the position of the face frame being the position obtained by the application layer through face recognition based on the color image captured by the color camera; according to the position of the face frame, determine that the enclosed area of ​​the face frame in the infrared image is the face area.

[0040] Optionally, the acquisition module is specifically configured to acquire a face region of each frame of the infrared image if the application layer recognizes a face from each of the multiple frames of infrared images continuously acquired by the infrared camera;

[0041] Correspondingly, the calculation module is specifically used to calculate the brightness of the face area in each frame of the infrared image to obtain the target face brightness.

[0042] Optionally, the calculation module is further specifically used to grid the face area in each frame of the infrared image to obtain a plurality of face grids; and obtain the target face brightness according to the average brightness of the plurality of face grids.

[0043] Optionally, the acquisition module is further used to acquire multiple groups of infrared sample images, each group of infrared sample images includes: multiple infrared sample images collected by the infrared camera at the same position, different groups of infrared images are infrared sample images collected by the infrared camera at different positions, and different positions correspond to different exposure parameters;

[0044] The device also includes a selection module, which is used to select a group of infrared sample images that meet the preset brightness constraint conditions from the multiple groups of infrared sample images as target infrared sample images according to the preset brightness constraint conditions; and use the brightness of the face area in the target infrared sample image as the preset target brightness.

[0045] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the infrared image face exposure method of the first aspect above.

[0046] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the infrared image face exposure method of the first aspect are executed.

[0047] The beneficial effects of this application are:

[0048] The embodiment of the present application provides an infrared image face exposure method, device, equipment and storage medium, the method comprising: obtaining a face area in an infrared image collected by an infrared camera; calculating the brightness of the face area in the infrared image; determining whether the brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range; if the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera; exposing the face area in the infrared image according to the adjusted exposure parameters. The infrared image face exposure method provided by the embodiment of the present application focuses on the relationship between the brightness of the face area in the infrared image and the preset target brightness, and adjusts the exposure parameters of the infrared camera through the relationship, so that the brightness of the face area in the infrared image finally meets the preset requirements. The phenomenon of exposing by the brightness of the entire infrared image in the prior art is avoided, so that a clear face image can be obtained when the target object is in a backlit scene or a strong front-lit scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 A schematic diagram of the structure of an infrared image face exposure system provided in an embodiment of the present application;

[0051] Figure 2 A schematic diagram of a flow chart of an infrared image face exposure method provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of a flow chart of another infrared image face exposure method provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a flow chart of another infrared image face exposure method provided in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of a flow chart of another infrared image face exposure method provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of the structure of an infrared image face exposure device provided in an embodiment of the present application;

[0056] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0058] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0059] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0060] Before explaining the embodiments of the present application in detail, the application scenarios of the present application are first introduced. The application scenarios can be scenarios of face recognition, such as face payment, face unlocking, etc., which can be applied to face access control, gates, and financial industries. It should be noted that the present application does not limit the application fields. Figure 1 A schematic diagram of the structure of an infrared image face exposure system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the system may include an infrared camera 101, a color camera 102, a floodlight 103, a projector 104 and a processor 105, wherein the projector 104 is used to project speckle or other structured light to the target object; the infrared camera 101 can collect an infrared image containing the target object in combination with the floodlight 103, and send the infrared image to the processor 105; the color camera 102 can collect a color image containing the target object, and send the color image to the processor 105; the processor 105 can identify the target object according to the infrared image, the color image and a plurality of pre-stored reference images. Among them, the processor 105 can determine the target exposure parameter of the face area according to the preset target brightness and the brightness of the face area in the infrared image, so that the infrared camera 101 exposes the face area with the target exposure parameter, so that the processor 105 can obtain a clear infrared image of the face. The processor 105 can identify the target object based on the infrared image of the face, the color image and a plurality of pre-stored reference images. It can be seen that under the premise of a clear face image, the accuracy of face recognition can be improved.

[0061] The system can be pre-embedded in an image acquisition device, and the specific form of the image acquisition device can be a mobile phone, a tablet computer, a smart door lock, a wearable device, etc. It should be noted that this application does not limit the form of the image acquisition device. As long as the image acquisition device has the function of face recognition, any form falls within the scope of protection of this application.

[0062] The infrared image face exposure method mentioned in this application is illustrated as follows with reference to the accompanying drawings. Figure 2 FIG. 1 is a flow chart of an infrared image face exposure method provided in an embodiment of the present application. The method can be applied to the processor 105 in the above-mentioned infrared image face exposure system. Figure 2 As shown, the method may include:

[0063] S201: Acquire a face region in an infrared image captured by an infrared camera.

[0064] Generally, when the target object is within the acquisition range of the image acquisition device, the infrared camera on the image acquisition device can be combined with a projector, a floodlight and other units to acquire an infrared image containing the target object, wherein the floodlight can provide fill light for the target object to enhance the light intensity, and the projector can project speckles onto the target object. In other words, the infrared image acquired by the infrared camera is equivalent to a speckle pattern, and the processor can identify the target object based on the speckle pattern, a preset reference image and a color image acquired by the color camera.

[0065] Among them, after the infrared camera captures the infrared image, the application layer of the electronic device embedded with the image acquisition device can identify the face area of ​​the target object contained in the infrared image. After identifying the face area, the face area can be sent to the processor, and then the processor can obtain the face area in the infrared image captured by the infrared camera.

[0066] S202: Calculate the brightness of the face area in the infrared image.

[0067] Among them, the area framed by the face frame in the infrared image is generally used as the face area. The area framed by the face frame is extracted from the infrared image, and the brightness value of each pixel in the area is counted. The brightness of the area can be obtained according to the brightness value of each pixel.

[0068] Optionally, the brightness corresponding to the pixel with the largest brightness value can be used as the brightness of the area, or an average brightness value can be obtained based on the brightness value of each pixel, and the average brightness value can be used as the brightness of the area. Of course, other calculation methods can also be used to calculate the brightness of the area, and this application does not limit it.

[0069] S203: Determine whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range.

[0070] Among them, the preset target brightness can be pre-stored in a memory associated with the processor. After calculating the brightness of the face area, the processor can obtain the preset target brightness from the memory and calculate the brightness deviation between the brightness of the face area and the preset target brightness. When the brightness deviation is a negative value, the absolute value of the brightness deviation can be obtained. The preset brightness deviation can be set according to the recognition accuracy requirements, generally a range interval. The minimum brightness deviation between the brightness of the face area and the preset target brightness must be greater than the minimum value in the range interval, and the maximum brightness deviation between the brightness of the face area and the preset target brightness must be less than the maximum value in the range interval, so as to ensure the recognition accuracy of the target object.

[0071] S204: If the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera.

[0072] S205: Expose the face region in the infrared image according to the adjusted exposure parameters.

[0073] Among them, when the processor determines that the brightness deviation is less than the minimum value within the preset brightness deviation range or the brightness deviation is greater than the maximum value within the preset brightness deviation range, it proves that the brightness of the face area still meets the preset requirement, and the preset requirement refers to within the preset brightness deviation range. The processor can adjust the exposure parameters according to the size relationship between the brightness of the face area and the preset target brightness. Among them, the exposure parameters may include exposure time and / or gain, and of course, may also include other parameters that affect the brightness of the face area, which are not limited in this application.

[0074] The purpose of adjusting the exposure parameters of the infrared camera is to make the brightness of the face area closer and closer to the preset target brightness. When the brightness of the face area after exposure using the current exposure parameters meets the preset requirements, it is proved that the current exposure parameters are the target exposure parameters.

[0075] In summary, the infrared image face exposure method provided by the present application includes: obtaining the face area in the infrared image collected by the infrared camera; calculating the brightness of the face area in the infrared image; judging whether the brightness deviation between the brightness of the face area and the preset target brightness is within the preset brightness deviation range; if the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera; exposing the face area in the infrared image according to the adjusted exposure parameters. The infrared image face exposure method provided by the embodiment of the present application focuses on the relationship between the brightness of the face area in the infrared image and the preset target brightness, and adjusts the exposure parameters of the infrared camera through the relationship, so that the brightness of the face area in the infrared image finally meets the preset requirements. The phenomenon of exposing by the brightness of the entire infrared image in the prior art is avoided, so that a clear face image can be obtained when the target object is in a backlit scene or a strong front-lit scene.

[0076] Optionally, if the brightness deviation is not within the preset brightness deviation range, the exposure parameters of the infrared camera are adjusted, including: if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is less than the preset target brightness, the exposure parameters of the infrared camera are increased; if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is greater than the preset target brightness, the exposure parameters of the infrared camera are reduced.

[0077] When the processor determines that the brightness of the face area is less than the preset target brightness, and the degree of being less than is not within the preset deviation range, the processor can use the preset target brightness as a reference to increase the exposure parameters of the infrared camera; similarly, when the processor determines that the brightness of the face area is greater than the preset target brightness, and the degree of being greater than is not within the preset deviation range, the processor can use the preset target brightness as a reference to reduce the exposure parameters of the infrared camera. In general, regardless of the above situation, when adjusting the exposure parameters based on exposure time and gain, the exposure time is adjusted first. If, after adjusting the exposure time, the brightness deviation between the brightness of the face area and the preset target brightness of the face area is within the preset brightness deviation range, there is no need to adjust the gain, which can avoid the phenomenon of noise in the face area.

[0078] Optionally, the above-mentioned adjustment of the exposure parameters of the infrared camera includes: adjusting the exposure parameters of the infrared camera according to a preset unit exposure parameter until the brightness deviation between the brightness of the face area in the infrared image after exposure based on the adjusted exposure parameter and the preset target brightness is within the preset brightness deviation range.

[0079] Among them, when the processor determines that the brightness deviation between the brightness of the current face area and the preset target brightness is not within the preset brightness deviation range, the exposure parameter of the infrared camera can be adjusted for the first time according to the preset unit exposure parameter, so that the infrared camera exposes the face area with the adjusted exposure parameter. The processor then determines whether the brightness deviation between the brightness of the face area and the preset target brightness is within the preset brightness deviation range. If the brightness deviation is still not within the preset brightness deviation range, the exposure parameter of the infrared camera is continued to be adjusted for the second time according to the preset unit exposure parameter, so that the infrared camera exposes the face area with the adjusted exposure parameter, and so on, ultimately making the brightness deviation between the brightness of the face area and the preset target brightness within the preset brightness deviation range.

[0080] Figure 3 A schematic diagram of another infrared image face exposure method provided in an embodiment of the present application. Figure 3 As shown, optionally, before obtaining the face area in the infrared image captured by the infrared camera, the method may further include:

[0081] S301. If the application layer cannot recognize a face in the infrared image, obtain a position of a face frame transmitted by the application layer, where the position of the face frame is a position obtained by the application layer through face recognition based on a color image captured by a color camera.

[0082] S302: Determine, according to the position of the face frame, an area surrounded by the face frame in the infrared image as the face area.

[0083] The application layer first performs face recognition on the infrared image collected by the infrared camera, and sends the recognition result to the processor. If the application layer can recognize the face in the infrared image, the result of the face recognition and the position of the face in the infrared image (starting point coordinates, ending point coordinates) are sent to the processor, and the processor can obtain the face area in the infrared image according to the position of the face (face frame); if the application layer cannot recognize the face in the infrared image, the result of the face recognition and the position of the face in the color image collected by the color camera (starting point coordinates, ending point coordinates) are sent to the processor, and the processor can calculate the size of the face frame according to the position of the face in the color image, and then determine the area where the face is located on the infrared image collected by the infrared camera according to the size of the face frame.

[0084] In this way, the face area in the infrared image can be indirectly determined based on the position of the face in the color image. When the face area in the infrared image cannot be recognized at the application layer, the face area in the infrared image can be ensured to be normally exposed, thereby obtaining correct face data for depth information calculation.

[0085] Optionally, the above-mentioned obtaining of the face area in the infrared image captured by the infrared camera includes: if the application layer recognizes the face from multiple frames of infrared images continuously captured by the infrared camera, then obtaining the face area of ​​each frame of infrared image; and calculating the brightness of the face area in each frame of infrared image to obtain the target face brightness.

[0086] Among them, the application layer can identify whether there are human faces in multiple frames of infrared images continuously collected by the infrared camera. When the application layer identifies that there is a human face in each frame of infrared image, the result can be sent to the processor. The processor can obtain the face area of ​​each frame of infrared image based on the position of the face in each frame of infrared image sent by the application layer.

[0087] The processor counts the brightness values ​​of the pixels on the face area in each frame of infrared image, and can calculate the brightness of the face area in each frame of infrared image according to the brightness values ​​of the pixels on the face area in each frame of infrared image, and then solves the average face brightness according to the brightness of the face area in each frame of infrared image, and uses the average face brightness as the target face brightness. It should be noted that the number of frames of continuously acquired infrared images can be 4, 5 or other, and this application does not limit it.

[0088] This can avoid the phenomenon that the processor exposes the infrared image through the infrared camera every time the infrared camera collects it, and at the same time avoid the phenomenon of brightness fluctuation caused by switching back and forth between human face and non-human face scenes.

[0089] Figure 4 A flowchart of another infrared image face exposure method provided in an embodiment of the present application is shown below. Figure 4 As shown, optionally, the above respectively calculates the brightness of the face area in each frame of infrared image to obtain the target face brightness, including:

[0090] S401, dividing the face area in each frame of infrared image into grids to obtain a plurality of face grids.

[0091] S402: Obtain the target face brightness according to the average brightness of multiple face grids.

[0092] For example, taking a frame of infrared image as an example, the face area in the infrared image is divided into a plurality of preset grids, the brightness value of each pixel in each grid is calculated respectively, and the average brightness value of the pixel is used as the brightness value of the grid, and then the brightness of the face area in the infrared image is calculated according to the brightness value of each grid. The solution process of the brightness of the face area in other frames of infrared image is similar to the above description, and finally the target face brightness is obtained according to the brightness of the face area in each frame of infrared image. The processor adjusts the exposure parameters of the infrared camera according to the target face brightness, the preset target brightness and the preset brightness deviation range, and exposes the face area in one of the frames of infrared image according to the adjusted exposure parameters, wherein one frame of infrared image can be any one of the above frames of infrared image, and this application does not limit it.

[0093] Figure 5 A flowchart of another infrared image face exposure method provided in an embodiment of the present application is shown below. Figure 5 As shown, optionally, before determining whether the brightness deviation between the brightness of the face area and the preset target brightness is within a preset brightness deviation range, the method further includes:

[0094] S501, acquiring multiple groups of infrared sample images.

[0095] Each group of infrared sample images is a plurality of infrared sample images collected by the infrared camera at the same position, and different groups of infrared images are infrared sample images collected by the infrared camera at different positions, respectively, and different positions correspond to different exposure parameters.

[0096] The sample objects can be placed at different pre-set positions, which are within the working range of the image acquisition device (such as 30cm-120cm), and each position corresponds to a different exposure parameter. The infrared camera exposes the face area on the sample object multiple times with the exposure parameter corresponding to the current position to obtain multiple infrared sample images. The infrared sample images corresponding to the current position form a group of infrared sample images. Finally, a group of infrared sample images corresponding to each position can be obtained, that is, there are as many groups of infrared sample images as there are positions.

[0097] S502 . According to a preset brightness constraint condition, select a group of infrared sample images satisfying the preset brightness constraint condition from multiple groups of infrared sample images as target infrared sample images.

[0098] S503: Using the brightness of the face area in the target infrared sample image as the preset target brightness.

[0099] Here, a group of infrared sample images is used as an example to illustrate. The brightness of the face area in each infrared sample image in the group of infrared sample images is calculated respectively, and the average brightness is obtained according to the brightness of the face area in each infrared sample image, and the average brightness is used as the brightness corresponding to the group of infrared sample images. Similarly, the brightness corresponding to other groups of infrared sample images can also be obtained, and the brightness corresponding to each group of infrared sample images is matched with the preset brightness constraint condition. The infrared sample images in the group of infrared sample images with the highest matching degree are respectively used as target sample images, and the brightness corresponding to the group of infrared sample images with the highest matching degree is used as the preset target brightness. Among them, the preset target brightness can be set according to actual needs, and this application does not limit it.

[0100] Figure 6 FIG. 1 is a schematic diagram of the structure of an infrared image face exposure device provided in an embodiment of the present application. The device can be applied to the processor 105 in the above-mentioned infrared image face exposure system. Figure 6 As shown, the device may include:

[0101] An acquisition module 601 is used to acquire a face area in an infrared image captured by an infrared camera;

[0102] A calculation module 602 is used to calculate the brightness of the face area in the infrared image;

[0103] A determination module 603 is used to determine whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range;

[0104] An adjustment module 604 is used to adjust the exposure parameters of the infrared camera if the brightness deviation is not within the preset brightness deviation range;

[0105] The exposure module 605 is used to expose the face area in the infrared image according to the adjusted exposure parameters.

[0106] Optionally, the adjustment module 604 is specifically used to increase the exposure parameters of the infrared camera if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is less than the preset target brightness; if the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is greater than the preset target brightness, then reduce the exposure parameters of the infrared camera.

[0107] Optionally, the adjustment module 604 is also specifically used to adjust the exposure parameters of the infrared camera according to a preset unit exposure parameter until the brightness deviation between the brightness of the face area in the infrared image after exposure based on the adjusted exposure parameter and the preset target brightness is within the preset brightness deviation range.

[0108] Optionally, the acquisition module 601 is also used to obtain the position of the face frame transmitted by the application layer if the application layer cannot recognize the face in the infrared image. The position of the face frame is the position obtained by the application layer based on the face recognition performed on the color image captured by the color camera; according to the position of the face frame, determine that the enclosed area of ​​the face frame in the infrared image is the face area.

[0109] Optionally, the acquisition module 601 is specifically configured to acquire a face region of each frame of infrared image if the application layer recognizes a face from each of the multiple frames of infrared image continuously acquired by the infrared camera;

[0110] Correspondingly, the calculation module 602 is specifically used to calculate the brightness of the face area in each frame of infrared image to obtain the target face brightness.

[0111] Optionally, the calculation module 602 is further specifically configured to divide the face region in each frame of the infrared image into grids to obtain a plurality of face grids; and obtain the target face brightness according to the average brightness of the plurality of face grids.

[0112] Optionally, the acquisition module 601 is further used to acquire multiple groups of infrared sample images, each group of infrared sample images includes: multiple infrared sample images collected by the infrared camera at the same position, different groups of infrared images are infrared sample images collected by the infrared camera at different positions, and different positions correspond to different exposure parameters;

[0113] The device also includes a selection module, which is used to select a group of infrared sample images that meet the preset brightness constraint condition from the multiple groups of infrared sample images as target infrared sample images; and use the brightness of the face area in the target infrared sample image as the preset target brightness.

[0114] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0115] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0116] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the specific form of the electronic device can be a mobile phone, a tablet computer, a wearable device, etc. The electronic device may include: a processor 701, a storage medium 702 and a bus 703, the storage medium 702 stores machine-readable instructions executable by the processor 701, when the electronic device is running, the processor 701 and the storage medium 702 communicate through the bus 703, and the processor 701 executes the machine-readable instructions to perform the steps of the above-mentioned infrared image face exposure method. The specific implementation method and technical effect are similar and will not be repeated here.

[0117] Optionally, the present application also provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned infrared image face exposure method are executed.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0121] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0122] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for exposing faces in infrared images, characterized in that: The method comprises: Obtain the face area in the infrared image collected by the infrared camera; Calculating the brightness of the face area in the infrared image; Determining whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range; If the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameters of the infrared camera; wherein the exposure parameters include exposure time and / or gain; Exposing the face area in the infrared image according to the adjusted exposure parameters; The step of adjusting the exposure parameters of the infrared camera includes: adjusting the exposure time, and if after adjusting the exposure time, the brightness deviation between the brightness of the face area and the preset target brightness is within the preset brightness deviation range, then not adjusting the gain; Before determining whether a brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range, the method further includes: Acquire multiple groups of infrared sample images, each group of infrared sample images includes: multiple infrared sample images collected by the infrared camera at the same position, different groups of infrared images are infrared sample images collected by the infrared camera at different positions, and different positions correspond to different exposure parameters; According to a preset brightness constraint condition, selecting a group of infrared sample images satisfying the preset brightness constraint condition from the multiple groups of infrared sample images as target infrared sample images; The brightness of the face area in the target infrared sample image is used as the preset target brightness.

2. The method according to claim 1, characterized in that If the brightness deviation is not within the preset brightness deviation range, adjusting the exposure parameter of the infrared camera includes: If the brightness deviation is not within the preset brightness deviation range, and the brightness of the face area is less than the preset target brightness, then increasing the exposure parameter of the infrared camera; If the brightness deviation is not within the preset brightness deviation range and the brightness of the face area is greater than the preset target brightness, the exposure parameter of the infrared camera is reduced.

3. The method according to claim 1, characterized in that: The step of adjusting the exposure parameters of the infrared camera includes: According to the preset unit exposure parameter, the exposure parameter of the infrared camera is adjusted until the brightness deviation between the brightness of the face area in the infrared image exposed based on the adjusted exposure parameter and the preset target brightness is within the preset brightness deviation range.

4. The method according to claim 1, characterized in that: Before obtaining the face area in the infrared image captured by the infrared camera, the method further includes: If the application layer cannot recognize the face in the infrared image, then obtaining the position of the face frame transmitted by the application layer, where the position of the face frame is the position obtained by the application layer through face recognition based on the color image acquired by the color camera; According to the position of the face frame, an area surrounded by the face frame in the infrared image is determined as the face area.

5. The method according to claim 1, characterized in that The step of obtaining a face region in an infrared image captured by an infrared camera includes: If the application layer recognizes a human face from multiple frames of infrared images continuously captured by the infrared camera, then the face region of each frame of the infrared image is obtained; The calculating the brightness of the face area in the infrared image includes: The brightness of the face area in each frame of the infrared image is calculated to obtain the target face brightness.

6. The method according to claim 5, characterized in that The step of respectively calculating the brightness of the face area in each frame of the infrared image to obtain the target face brightness includes: Dividing the face region in each frame of the infrared image into grids to obtain a plurality of face grids; The target face brightness is obtained according to the average brightness of the multiple face grids.

7. An infrared image face exposure device, characterized in that: The device comprises: An acquisition module is used to acquire the face area in the infrared image collected by the infrared camera; A calculation module, used for calculating the brightness of the face area in the infrared image; A judgment module, used to judge whether the brightness deviation between the brightness of the face area and a preset target brightness is within a preset brightness deviation range; An adjustment module, configured to adjust the exposure parameters of the infrared camera if the brightness deviation is not within the preset brightness deviation range; wherein the exposure parameters include exposure time and / or gain; An exposure module, used for exposing the face area in the infrared image according to the adjusted exposure parameters; The adjustment module is further used to adjust the exposure time, and if after adjusting the exposure time, the brightness deviation between the brightness of the face area and the preset target brightness is within the preset brightness deviation range, the gain is not adjusted; The acquisition module is also used to acquire multiple groups of infrared sample images, each group of infrared sample images includes: multiple infrared sample images collected by the infrared camera at the same position, different groups of infrared images are infrared sample images collected by the infrared camera at different positions, and different positions correspond to different exposure parameters; according to a preset brightness constraint condition, a group of infrared sample images that meets the preset brightness constraint condition is selected from the multiple groups of infrared sample images as the target infrared sample images; and the brightness of the face area in the target infrared sample image is used as the preset target brightness.

8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the infrared image face exposure method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the infrared image face exposure method according to any one of claims 1 to 6 are executed.