CN114093015A - Intelligent light supplementing method for face recognition, electronic equipment and storage medium - Google Patents

Intelligent light supplementing method for face recognition, electronic equipment and storage medium Download PDF

Info

Publication number
CN114093015A
CN114093015A CN202210070946.XA CN202210070946A CN114093015A CN 114093015 A CN114093015 A CN 114093015A CN 202210070946 A CN202210070946 A CN 202210070946A CN 114093015 A CN114093015 A CN 114093015A
Authority
CN
China
Prior art keywords
brightness
face
intensity
light
fill
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210070946.XA
Other languages
Chinese (zh)
Inventor
李振
王月平
冯上栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Moredian Technology Co ltd
Original Assignee
Hangzhou Moredian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Moredian Technology Co ltd filed Critical Hangzhou Moredian Technology Co ltd
Priority to CN202210070946.XA priority Critical patent/CN114093015A/en
Publication of CN114093015A publication Critical patent/CN114093015A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to an intelligent light supplementing method, electronic equipment and a storage medium for face recognition, wherein the method comprises the following steps: acquiring a face image, and extracting face region brightness from the face image; acquiring exposure control factors, and acquiring initial fill-in light intensity of a fill-in light according to the brightness of the face area and the exposure control factors; acquiring a preset supplementary lighting model, and analyzing and processing the brightness of the face area and the initial supplementary lighting intensity through the supplementary lighting model to obtain final supplementary lighting intensity; and controlling the brightness of the light supplement lamp according to the final light supplement intensity to supplement light for the human face target. The invention can dynamically adapt the intensity of the light supplement lamp according to the brightness of the human face area, and can turn off the light supplement lamp under the condition of no human face target, thereby reducing the power consumption of the equipment. Meanwhile, the intensity of the reasonable light supplement lamp is dynamically adjusted in a multi-person following environment, the intensity is locked or slowly attenuated within a period of time, the stability of light supplement of the equipment within a period of time is guaranteed, the overall imaging quality is good, and the identification of an algorithm living body is facilitated.

Description

Intelligent light supplementing method for face recognition, electronic equipment and storage medium
Technical Field
The invention relates to the field of control of face recognition terminals, in particular to an intelligent light supplementing method for face recognition, electronic equipment and a storage medium.
Background
With the rapid development of the AI technology, video intelligent terminal equipment becomes an important carrier for falling AI into the ground and commercialization, and a series of face recognition equipment, such as face attendance machines, face-brushing payment equipment, door access machines and the like, are produced and widely applied in daily life of people. At present, a face recognition terminal device basically adopts a double-camera structure, one way of camera is used for face feature comparison according to visible light color imaging, the other way of camera is used for detecting attributes of a living body (a real face) according to infrared imaging, the attributes of the living body of an infrared image are supplemented with light through an infrared light supplementing lamp with a certain wave band, and living body related attribute detection is performed by matching with a cut-off filter of a lens. And how to control the fill light intensity of external fill light lamp, all have important meanings to imaging quality and fill light power consumption life-span.
However, in the existing face recognition device, the fill light intensity of the fill light of the external fill light lamp is basically a fixed intensity configured when the device is started, so that the fill light intensity value of the fill light lamp is always fixed no matter in the daytime, at night or in a forward and backward light environment. Because the light filling lamp among the prior art can not adjust according to the change of environment or the angle of people's face, consequently there are the imaging quality poor, consume energy height and the short-lived scheduling problem of current face identification equipment.
On one hand, if the fill-in light intensity value of the fill-in light is set to be larger, the problem of poor imaging quality caused by overexposure of a human face area can occur, equipment can generate heat seriously due to higher power consumption of the equipment, and the service life of the equipment or the fill-in light is shortened; on the other hand, if the set fill-in light intensity value is small, the fill-in light effect is not obvious in a backlight environment, and the imaging quality is poor, so that algorithm identification cannot be performed.
Disclosure of Invention
The embodiment of the invention provides an intelligent light supplement method, electronic equipment and a storage medium for face recognition, and aims to at least solve the problems that dynamic light supplement cannot be realized and the power consumption of a light supplement lamp is high in the related art.
In a first aspect, an embodiment of the present invention provides an intelligent light supplement method for face recognition, where the method includes:
acquiring a face image, and extracting face region brightness from the face image;
acquiring an exposure control factor, and acquiring initial fill-in light intensity according to the exposure control factor;
acquiring a preset supplementary lighting model, and analyzing and processing the brightness of the face area and the initial supplementary lighting intensity through the supplementary lighting model to obtain final supplementary lighting intensity;
and controlling the brightness of a light supplement lamp according to the final light supplement intensity to supplement light for the human face target.
In some embodiments, after the supplementary lighting is performed on the human face target by controlling the brightness of a supplementary lighting lamp according to the final supplementary lighting intensity, the method further includes: under the condition that the human face target is not detected within the preset time, gradually attenuating the intensity of the light supplement lamp until the light supplement lamp is turned off, and setting the automatic exposure adjusting function to be in an enabling state.
Further, the face image comprises an RGB color image and an IR black and white image, and the extracting the face region brightness from the face image comprises:
detecting the RGB color image through an intelligent detection algorithm, and acquiring a first starting point coordinate of a face region in the face image and the width and height of the face region in the RGB color image;
acquiring a fixed coordinate pixel deviation value, and superposing the fixed coordinate pixel deviation value to the first starting point coordinate to obtain a second starting point coordinate of a face area in the IR black-and-white image;
and calculating the brightness of the face area according to the second starting point coordinate of the IR black-and-white image and the width and height of the face area.
Further, the calculating the brightness of the face region according to the second starting point coordinate of the IR black-and-white image and the width and height of the face region includes:
determining the face area range and the number of pixels occupied by the face in the IR black-and-white image according to the second starting point coordinate and the width and the height of the face area;
extracting the brightness component of each pixel point in the range of the face area and accumulating to obtain the total brightness;
and calculating the brightness of the face area according to the total brightness of the range of the face area and the number of pixels.
Further, obtaining an initial fill-in light intensity according to the exposure control factor, including:
multiplying the exposure control factors to obtain exposure, wherein the exposure control factors are control factors of an automatic exposure adjusting function and comprise shutter time and gain multiples;
and acquiring a pre-established logistic regression model, and inputting the exposure into the logistic regression model to obtain the initial fill-in light intensity corresponding to the exposure.
Further, the analyzing and processing the luminance of the face region and the initial fill-in light intensity through the fill-in light model to obtain a final fill-in light intensity includes:
acquiring a brightness threshold range, and comparing the brightness of the face area with the brightness threshold range;
the brightness of the face area is within the brightness threshold range, and the initial fill-in light intensity is obtained and used as the final fill-in light intensity; alternatively, the first and second electrodes may be,
the brightness of the face area is smaller than the lower limit of the brightness threshold range, and the final fill-in light intensity is obtained according to the initial fill-in light intensity, the brightness of the face area and the lower limit of the brightness threshold range; alternatively, the first and second electrodes may be,
and if the brightness of the face area is greater than the upper limit of the brightness threshold range, setting the automatic exposure adjusting function to be in an enabling state, and adjusting through the automatic exposure adjusting function.
Further, the obtaining of the final fill-in light intensity according to the initial fill-in light intensity, the luminance of the face area, and the lower limit of the luminance threshold range includes:
b1, obtaining a brightness difference according to the brightness of the face area and the lower limit of the brightness threshold range;
b2, calculating to obtain a light supplement lamp intensity compensation value corresponding to the brightness difference according to the brightness difference;
b3, superposing the initial fill-in light intensity and the fill-in light intensity compensation value to obtain final fill-in light intensity;
b4, judging whether the final fill light intensity is within the range of a brightness threshold value; if the final fill-in light intensity is not within the brightness threshold range, the final fill-in light intensity is used as a new initial fill-in light intensity, and step B1 is executed.
Further, the calculating the intensity compensation value of the fill-in light corresponding to the luminance difference according to the luminance difference includes:
acquiring a corresponding relation between the brightness difference and a fill-in lamp intensity compensation value, and performing interpolation calculation on the corresponding relation to obtain a fill-in lamp intensity compensation value corresponding to the brightness difference; alternatively, the first and second electrodes may be,
and obtaining a fitting line of the brightness difference and the light supplement lamp intensity compensation value, and obtaining the light supplement lamp intensity compensation value corresponding to the brightness difference according to the fitting line.
In a second aspect, an embodiment of the present invention provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the intelligent light supplementing method for face recognition described in the above embodiment.
In a third aspect, an embodiment of the present invention provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to execute the intelligent light supplementing method for face recognition according to the foregoing embodiment when running.
Compared with the prior art, the embodiment of the invention provides an intelligent light supplement method for face recognition, electronic equipment and a storage medium. The invention can dynamically adapt the intensity of the light supplement lamp according to the brightness of the face area, thereby not only improving the imaging quality, but also avoiding the waste of energy sources because the light supplement lamp does not work at high brightness for a long time; on the other hand, the light supplement lamp can be turned off under the condition that the human face target is not recognized within a certain time, so that the power consumption of the equipment is reduced; meanwhile, the intensity of the reasonable light supplement lamp is dynamically adjusted in a multi-person following environment, and the intensity is locked within a period of time, so that the stability of light supplement of the equipment within a period of time is ensured, the integral imaging quality is good, and the identification of an algorithm living body is facilitated; and the light supplement lamp controlled by the invention can not work in a high power consumption state for a long time, so that the influence of heating on the equipment can be reduced, and the service life of the equipment is prolonged.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of an intelligent light supplement method for face recognition according to an embodiment of the present invention;
fig. 2 is a flowchart of the step S100 in fig. 1 for obtaining the brightness of the face region;
FIG. 3 is a graph showing the relationship between the exposure control factor and the initial fill-in intensity in step S200 of FIG. 1;
fig. 4 is a flowchart of a fill-in light model for obtaining the final fill-in light intensity in step S300 in fig. 1;
fig. 5 is a flowchart of a fill-in light model in which the luminance of the face area in fig. 4 is smaller than the lower limit of the luminance threshold range.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments provided by the present invention, belong to the protection scope of the present invention. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one of ordinary skill in the art that the described embodiments of the present invention can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of the terms "a" and "an" and "the" and similar referents in the context of describing the invention are not to be construed as limiting in number, and may be construed to cover both the singular and the plural. The present invention relates to the terms "comprises," "comprising," "includes," "including," "has," "having" and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in the description of the invention are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The terms "first," "second," "third," and the like in reference to the present invention are used merely to distinguish between similar objects and not necessarily to represent a particular ordering for the objects.
The embodiment of the invention takes face attendance equipment as an example to explain the intelligent light supplementing method. The face attendance checking equipment is a binocular camera, one path of the face attendance checking equipment is a color camera, and an RGB color image can be generated; and the other path is a black-and-white camera which can generate an IR black-and-white image. The IR black-and-white image is mainly used for living body detection, the imaging brightness and quality of the IR black-and-white image depend on a light supplement lamp of the device, and in order to obtain high imaging quality, the light supplement lamp needs to be controlled to supplement light to a human face according to actual needs.
As shown in fig. 1, the intelligent light supplement method for face recognition according to the embodiment of the present invention includes the following steps.
Step S100, a face image is obtained, and face region brightness is extracted from the face image.
Specifically, in the attendance system, the camera detects a monitored scene in real time, and when a human face is detected, a human face image is generated, wherein the human face image comprises an RGB color image generated by the color camera and an IR black and white image generated by the black and white camera. In this embodiment, two lens modules of a binocular camera in the face attendance device are on the same plane, but a fixed offset exists in the field angle, and a specific value of the offset is stored in the storage device and can be directly called when face region brightness is performed on a face image. After the face image is obtained, the face is detected and identified in the face image through an intelligent detection algorithm, and after a face target is detected in the image, the brightness of the face area is extracted and calculated from the face area of the face image, and the implementation process is shown in fig. 2.
Step S110, detecting the RGB color image through an intelligent detection algorithm, and acquiring the first starting point coordinate of the face region in the face image and the width and height of the face region in the RGB color image.
In the face attendance system of the embodiment, the intelligent detection algorithm adopts a face Recognition algorithm (Facial Recognition), namely, a face image of a user is acquired through a video acquisition device (binocular camera), the position, the face shape and the angle of the Facial features of the user are calculated and analyzed by utilizing a core algorithm, and then the Facial features are compared with a template existing in a database of the user, and then the real identity of the user is judged. The invention can be based on the recognition algorithm of the human face characteristic points, the recognition algorithm of the whole human face image, the recognition algorithm based on the template, or the algorithm for recognizing by using the neural network. In the embodiment, a first initial coordinate point [ x1, y1] of a face region in an RGB color image and a width and height [ width, height ] of a pixel of the face region are obtained through an intelligent detection algorithm, that is, the position and the range size occupied by a face target in the RGB color image are determined. Since the viewing angles of the two cameras are fixed, the position of the human face target in the IR black-and-white image can be determined according to the position of the human face target in the RGB color image.
And step S120, acquiring fixed coordinate pixel deviation values of two lenses in the binocular camera equipment, and superposing the fixed coordinate pixel deviation values to the first initial point coordinate to obtain a second initial point coordinate of the face area in the IR black-and-white image.
Specifically, the fixed coordinate pixel offset value is a position offset of two lenses in the binocular imaging apparatus, and the offset is calibrated at the time of product shipment or determined in a setup, installation, and debugging process. In this embodiment, the start point coordinates [ x2= x1+ OffSet, y2= y1+ OffSet ] (second start point coordinates) and the corresponding width and height [ width, height ] of the face region in the IR black-and-white image can be obtained by superimposing the fixed coordinate pixel OffSet values OffSet of the two lens modules on the first start point coordinates. In this embodiment, since the lenses of the two cameras are on the same plane, the sizes of the areas occupied by the human face objects in the two images are the same, and therefore the width and height of the pixels in the face area in the IR black-and-white image are the same as those in the RGB color image, and therefore, the present embodiment does not perform further calculation on the width and height of the pixels in the face area in the IR black-and-white image.
In another embodiment of the invention, if the difference of the images of the faces by the two cameras is larger than the size of the face area, the difference can be obtained in the debugging process of the equipment, and in the light supplementing process, the difference is directly superposed on the width and the height of the face area in the RGB color image, so that the width and the height of the face area in the IR black-and-white image can be obtained.
And step S130, calculating the brightness of the face area according to the second starting point coordinate of the IR black-and-white image and the width and height of the face area.
Specifically, in the present invention, the width and height of the face region represent the number of pixels occupied by the face in the image. Therefore, the range of the face area occupied by the face target in the IR black-and-white image and the total number of pixels are determined according to the second starting point coordinate, the width and the height of the face image area. Extracting the brightness component of each pixel point in the range of the face area and accumulating to obtain the total brightness; in this embodiment, the brightness component Y of each pixel point in the range of the face region is all accumulated, and then the accumulated sum is divided by the total number of pixels to obtain an average value, which is used as the face region brightness FaceLuma of the IR image.
And step S200, obtaining the initial light supplement intensity of the light supplement lamp according to the exposure control factors. The exposure control factor is acquired while the auto exposure adjustment function is set to a disabled state. In the existing face recognition device, an automatic exposure adjustment function, referred to as AE adjustment, is generally provided. In this embodiment, automatic exposure adjustment control factors, such as shutter time Exp and Sensor Gain multiple Gain, of the IR image at the current time are acquired through a chip interface, and meanwhile, in order to ensure that an accurate light supplement intensity value is obtained, an automatic exposure adjustment function needs to be suspended while the shutter and Gain are kept unchanged, that is, the automatic exposure adjustment function is set to a disabled state, so as to mainly avoid interference with the intelligent light supplement method of the present invention and influence on the final light supplement precision.
In the embodiment of the present invention, the exposure amount ExpVaule is obtained by multiplying the exposure control factors, i.e., ExpVaule = Exp × Gain, and the exposure control factors are control factors of the automatic exposure adjustment function, such as the shutter time and the Gain factor. And then acquiring a pre-established logistic regression model (such as an LR linear regression model), and inputting the exposure into the logistic regression model to obtain the initial fill-in light intensity corresponding to the exposure.
In this embodiment, the logistic regression model may be established during the debugging process of the device, or multiple sets of data may be obtained according to parameters of hardware (such as shutter time of a camera, rated power of a fill light, and the like) and a debugging experience of a user, where the data includes exposure expvalue and initial fill light intensity ledstrlit corresponding to the exposure expvalue, and then a model (such as a linear regression model) is established or fitted according to the data, and the initial fill light intensity ledstrlit is calculated according to the model or a fitting line. For example, the initial fill-in light intensity LedStrInit of each exposure amount ExpVaule may be estimated according to the mapping relationship (exemplary exponential function or model) shown in fig. 3, where the greater the exposure amount ExpVaule of this embodiment is, the smaller the corresponding initial configuration IR fill-in light intensity (initial fill-in light intensity LedStrInit) is.
Step 300, acquiring a preset supplementary lighting model, and analyzing and processing the brightness of the face area and the initial supplementary lighting intensity through the supplementary lighting model to obtain a final supplementary lighting intensity L. The light supplement model of the present invention is a light supplement rule for adjusting the light supplement intensity according to the determination result after determining the brightness of the face region, and refer to fig. 4 and 5.
And S400, controlling the brightness of a light supplement lamp according to the final light supplement intensity to supplement light for the human face target.
As shown in fig. 4 and 5, a luminance threshold range [ FaceDown, FaceUp ] is first obtained, where the luminance threshold range of the present embodiment is formed by human face luminance values with relatively good imaging quality obtained through a large amount of data acquisition and analysis in advance, where FaceDown is a lower limit of the luminance threshold range, and FaceUp is an upper limit of the luminance threshold range. And after the brightness threshold range is obtained, comparing the brightness faceLuma of the face region with the brightness threshold range [ faceDown, faceUp ], and judging whether the faceLuma is in the interval [ faceDown, faceUp ].
When the brightness of the face area is within the brightness threshold range, namely faceDown is less than or equal to faceLuma and less than or equal to faceUp, the current imaging quality is relatively good, light is not needed to be supplemented to the face target, and the final light supplement intensity L is set to be zero; or the initial light supplement intensity can be used as the final light supplement intensity L to control the light supplement lamp to work, so that the face image is further optimized, and the accuracy of face recognition is improved; when the brightness of the face area is larger than the upper limit of the brightness threshold range, namely FaceLuma > FaceUp, which indicates that the face shot by the camera equipment is too bright, the final fill light intensity is set to be zero, the automatic exposure adjusting function is set to be in an enabling state, the brightness of the face area of the face image is adjusted through the automatic exposure adjusting function, and high-quality imaging quality is obtained.
When the brightness of the face region is smaller than the lower limit of the brightness threshold range, as shown in fig. 5, that is, FaceLuma < FaceDown (in fig. 4, determining FaceLuma > FaceUp, if the determination result is no), it indicates that the face is too dark at present and light supplement needs to be performed, the final fill-in light intensity L needed is obtained according to the initial fill-in light intensity, the brightness of the face region and the lower limit of the brightness threshold range,
specifically, as shown in fig. 5, a luminance difference LumaDiff is obtained according to the luminance of the face region and the lower limit of the luminance threshold range, and the calculation formula is as follows:
Figure 407646DEST_PATH_IMAGE001
(1)
then, a fill-in light intensity compensation value LedStrComp corresponding to the brightness difference is obtained through calculation according to the brightness difference, in the invention, the corresponding relation between the brightness difference and the fill-in light intensity compensation value can be obtained firstly, and interpolation calculation is carried out through the corresponding relation to obtain a fill-in light intensity compensation value corresponding to any brightness difference; or obtaining a fitted line of the brightness difference and the fill-in lamp intensity compensation value, and obtaining the fill-in lamp intensity compensation value corresponding to any brightness difference according to the fitted line.
In this embodiment, a fill light intensity compensation value ledstrcp is obtained by performing interpolation calculation according to a correspondence relationship between a plurality of luminance differences [ lumaddif 1, lumaddif 2, lumaddif 3, lumaddif 4, … … ] and a plurality of fill light intensity compensation values [ LedComp1, LedComp2, LedComp3, LedComp4, … … ], where the plurality of fill light intensity compensation values are determined by a user according to hardware characteristics and debugging experience of the fill light, and then the initial fill light intensity ledstrcp and the fill light intensity compensation value ledstrcp are superimposed to obtain a final fill light intensity, that is, the final fill light intensity L of the fill light is set to ledstrcrid + ledstrcp.
In order to ensure that the accurate fill-in light intensity is obtained, the embodiment acquires the brightness of the face region again and judges whether the brightness of the face region is within the brightness threshold range, that is, FaceDown is less than or equal to FaceLuma and less than or equal to FaceUp; and if the light intensity is within the range of the brightness threshold, locking according to the final fill-in light intensity obtained by the calculation and continuing for a preset time. If the light intensity is not within the range of the brightness threshold, firstly judging whether the final fill-in light intensity L obtained by calculation exceeds the limit of the fill-in light (namely the maximum intensity of the fill-in light), if not, taking the current final fill-in light intensity as a new initial fill-in light intensity, and recalculating a fill-in light intensity compensation value LedStrComp according to the steps; and if the final light supplement intensity exceeds the limit of the light supplement lamp, keeping the light supplement lamp stable according to the final light supplement intensity L, and then unlocking AE for adjusting the face brightness.
In other embodiments of the present invention, if the user can obtain a relatively accurate intensity compensation value of the fill-in light according to the luminance difference through experience of the user, the luminance of the face area does not need to be repeatedly compared with the luminance threshold range, and the luminance of the fill-in light is directly controlled according to the final fill-in light intensity obtained by the first calculation to fill in the face target.
In the embodiment of the invention, after the intensity of the supplementary lighting lamp is adjusted to a proper intensity value and the brightness of the supplementary lighting lamp is adjusted according to the proper intensity value (namely the final supplementary lighting intensity) to supplement the human face target, if the human face target continues to exist within a certain time, the intensity value of the supplementary lighting lamp is kept unchanged; if the human face target is not detected within the preset time, gradually attenuating the intensity of the light supplement lamp until the light supplement lamp is turned off, and setting the automatic exposure adjustment function to be in an enabling state.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In addition, in combination with the intelligent light supplement method for face recognition in the above embodiments, embodiments of the present invention may provide a storage medium to implement. The storage medium having stored thereon a computer program; when being executed by a processor, the computer program realizes any one of the intelligent supplementary lighting methods for face recognition in the embodiments.
An embodiment of the invention also provides an electronic device, which can be a terminal. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to realize an intelligent supplementary lighting method for face recognition. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic device, an external keyboard, a touch pad or a mouse, and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An intelligent supplementary lighting method for face recognition is characterized by comprising the following steps:
acquiring a face image, and extracting face region brightness from the face image;
acquiring an exposure control factor, and acquiring initial fill-in light intensity according to the exposure control factor;
acquiring a preset supplementary lighting model, and analyzing and processing the brightness of the face area and the initial supplementary lighting intensity through the supplementary lighting model to obtain final supplementary lighting intensity;
and controlling the brightness of a light supplement lamp according to the final light supplement intensity to supplement light for the human face target.
2. The intelligent supplementary lighting method according to claim 1, wherein after the supplementary lighting is performed on the human face target by controlling the brightness of a supplementary lighting lamp according to the final supplementary lighting intensity, the method further comprises:
under the condition that the human face target is not detected within the preset time, gradually attenuating the intensity of the light supplement lamp until the light supplement lamp is turned off, and setting the automatic exposure adjusting function to be in an enabling state.
3. The intelligent supplementary lighting method according to claim 2, wherein the face image comprises an RGB color image and an IR black and white image, and the extracting the face region luminance from the face image comprises:
detecting the RGB color image through an intelligent detection algorithm, and acquiring a first starting point coordinate of a face region and the width and height of the face region in the RGB color image;
acquiring a fixed coordinate pixel deviation value, and superposing the fixed coordinate pixel deviation value to the first starting point coordinate to obtain a second starting point coordinate of a face area in the IR black-and-white image;
and calculating the brightness of the face area according to the second starting point coordinate of the IR black-and-white image and the width and height of the face area.
4. The intelligent supplementary lighting method according to claim 3, wherein the calculating of the face region brightness according to the second start point coordinates of the IR black-and-white image and the width and height of the face region comprises:
determining the face area range and the number of pixels occupied by the face in the IR black-and-white image according to the second starting point coordinate and the width and the height of the face area;
extracting the brightness component of each pixel point in the range of the face area and accumulating to obtain the total brightness;
and calculating the brightness of the face area according to the total brightness of the range of the face area and the number of pixels.
5. The intelligent light supplement method according to claim 4, wherein obtaining an initial light supplement intensity according to the exposure control factor comprises:
multiplying the exposure control factors to obtain exposure, wherein the exposure control factors are control factors of an automatic exposure adjusting function and comprise shutter time and gain multiples;
and acquiring a pre-established logistic regression model, and inputting the exposure into the logistic regression model to obtain the initial fill-in light intensity corresponding to the exposure.
6. The intelligent supplementary lighting method according to claim 5, wherein the analyzing the face region brightness and the initial supplementary lighting intensity by the supplementary lighting model to obtain a final supplementary lighting intensity comprises:
acquiring a brightness threshold range, and comparing the brightness of the face area with the brightness threshold range;
the brightness of the face area is within the brightness threshold range, and the initial fill-in light intensity is obtained and used as the final fill-in light intensity; alternatively, the first and second electrodes may be,
the brightness of the face area is smaller than the lower limit of the brightness threshold range, and the final fill-in light intensity is obtained according to the initial fill-in light intensity, the brightness of the face area and the lower limit of the brightness threshold range; alternatively, the first and second electrodes may be,
and if the brightness of the face area is greater than the upper limit of the brightness threshold range, setting the automatic exposure adjusting function to be in an enabling state, and adjusting through the automatic exposure adjusting function.
7. The intelligent supplementary lighting method according to claim 6, wherein the obtaining of the final supplementary lighting intensity according to the initial supplementary lighting intensity, the luminance of the face region and the lower limit of the luminance threshold range comprises:
b1, obtaining a brightness difference according to the brightness of the face area and the lower limit of the brightness threshold range;
b2, calculating to obtain a light supplement lamp intensity compensation value corresponding to the brightness difference according to the brightness difference;
b3, superposing the initial fill-in light intensity and the fill-in light intensity compensation value to obtain final fill-in light intensity;
b4, judging whether the final fill light intensity is within the range of a brightness threshold value; if the final fill-in light intensity is not within the brightness threshold range, the final fill-in light intensity is used as a new initial fill-in light intensity, and step B1 is executed.
8. An intelligent supplementary lighting method according to claim 7, wherein the calculating to obtain the supplementary lighting intensity compensation value corresponding to the brightness difference according to the brightness difference comprises:
acquiring a corresponding relation between the brightness difference and a fill-in lamp intensity compensation value, and performing interpolation calculation on the corresponding relation to obtain a fill-in lamp intensity compensation value corresponding to the brightness difference; alternatively, the first and second electrodes may be,
and obtaining a fitting line of the brightness difference and the light supplement lamp intensity compensation value, and obtaining the light supplement lamp intensity compensation value corresponding to the brightness difference according to the fitting line.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the intelligent light supplementing method for face recognition according to any one of claims 1 to 8.
10. A storage medium, in which a computer program is stored, wherein the computer program is configured to execute the intelligent light supplementing method for face recognition according to any one of claims 1 to 8 when the computer program runs.
CN202210070946.XA 2022-01-21 2022-01-21 Intelligent light supplementing method for face recognition, electronic equipment and storage medium Pending CN114093015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210070946.XA CN114093015A (en) 2022-01-21 2022-01-21 Intelligent light supplementing method for face recognition, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210070946.XA CN114093015A (en) 2022-01-21 2022-01-21 Intelligent light supplementing method for face recognition, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114093015A true CN114093015A (en) 2022-02-25

Family

ID=80309028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210070946.XA Pending CN114093015A (en) 2022-01-21 2022-01-21 Intelligent light supplementing method for face recognition, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114093015A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114596620A (en) * 2022-05-10 2022-06-07 深圳市海清视讯科技有限公司 Light supplement control method, device and equipment for face recognition equipment and storage medium
CN114898081A (en) * 2022-06-13 2022-08-12 北京计算机技术及应用研究所 Illumination compensation method for article image recognition
CN115278099A (en) * 2022-06-29 2022-11-01 广东小天才科技有限公司 Light supplement lamp control method, terminal device and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018205229A1 (en) * 2017-05-11 2018-11-15 深圳市大疆创新科技有限公司 Supplemental light control device, system, method, and mobile device
CN110784660A (en) * 2019-11-13 2020-02-11 广州洪荒智能科技有限公司 Method, system, equipment and medium for controlling camera brightness
WO2020051898A1 (en) * 2018-09-14 2020-03-19 浙江宇视科技有限公司 Automatic exposure method and apparatus for dual-light image, and dual-light image camera and machine storage medium
CN111064899A (en) * 2019-12-06 2020-04-24 成都华为技术有限公司 Exposure parameter adjusting method and device
US20200267322A1 (en) * 2019-02-19 2020-08-20 Lite-On Electronics (Guangzhou) Limited Exposure method and image sensing device using the same
CN112738412A (en) * 2020-12-31 2021-04-30 佛山市南海天富科技有限公司 Full-automatic light supplementing method and device based on warp knitting machine flaw detection system
CN112866581A (en) * 2021-01-18 2021-05-28 盛视科技股份有限公司 Camera automatic exposure compensation method and device and electronic equipment
CN112906529A (en) * 2021-02-05 2021-06-04 深圳前海微众银行股份有限公司 Face recognition light supplementing method and device, face recognition equipment and face recognition system
CN113269036A (en) * 2021-04-13 2021-08-17 杭州魔点科技有限公司 Method, system, device and storage medium for determining face coordinates on thermal imaging
CN113630559A (en) * 2021-08-06 2021-11-09 上海商米科技集团股份有限公司 Exposure parameter adjusting method and system for image sensor and computer readable medium
CN113691735A (en) * 2020-05-18 2021-11-23 浙江宇视科技有限公司 Camera and infrared light supplementing method and device
CN113727034A (en) * 2021-08-30 2021-11-30 深圳市商汤科技有限公司 Light supplement control method, electronic device and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109923856A (en) * 2017-05-11 2019-06-21 深圳市大疆创新科技有限公司 Light supplementing control device, system, method and mobile device
WO2018205229A1 (en) * 2017-05-11 2018-11-15 深圳市大疆创新科技有限公司 Supplemental light control device, system, method, and mobile device
WO2020051898A1 (en) * 2018-09-14 2020-03-19 浙江宇视科技有限公司 Automatic exposure method and apparatus for dual-light image, and dual-light image camera and machine storage medium
US20200267322A1 (en) * 2019-02-19 2020-08-20 Lite-On Electronics (Guangzhou) Limited Exposure method and image sensing device using the same
CN110784660A (en) * 2019-11-13 2020-02-11 广州洪荒智能科技有限公司 Method, system, equipment and medium for controlling camera brightness
CN111064899A (en) * 2019-12-06 2020-04-24 成都华为技术有限公司 Exposure parameter adjusting method and device
CN113691735A (en) * 2020-05-18 2021-11-23 浙江宇视科技有限公司 Camera and infrared light supplementing method and device
CN112738412A (en) * 2020-12-31 2021-04-30 佛山市南海天富科技有限公司 Full-automatic light supplementing method and device based on warp knitting machine flaw detection system
CN112866581A (en) * 2021-01-18 2021-05-28 盛视科技股份有限公司 Camera automatic exposure compensation method and device and electronic equipment
CN112906529A (en) * 2021-02-05 2021-06-04 深圳前海微众银行股份有限公司 Face recognition light supplementing method and device, face recognition equipment and face recognition system
CN113269036A (en) * 2021-04-13 2021-08-17 杭州魔点科技有限公司 Method, system, device and storage medium for determining face coordinates on thermal imaging
CN113630559A (en) * 2021-08-06 2021-11-09 上海商米科技集团股份有限公司 Exposure parameter adjusting method and system for image sensor and computer readable medium
CN113727034A (en) * 2021-08-30 2021-11-30 深圳市商汤科技有限公司 Light supplement control method, electronic device and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114596620A (en) * 2022-05-10 2022-06-07 深圳市海清视讯科技有限公司 Light supplement control method, device and equipment for face recognition equipment and storage medium
CN114596620B (en) * 2022-05-10 2022-08-05 深圳市海清视讯科技有限公司 Light supplement control method, device and equipment for face recognition equipment and storage medium
CN114898081A (en) * 2022-06-13 2022-08-12 北京计算机技术及应用研究所 Illumination compensation method for article image recognition
CN114898081B (en) * 2022-06-13 2024-04-05 北京计算机技术及应用研究所 Illumination compensation method for object image identification
CN115278099A (en) * 2022-06-29 2022-11-01 广东小天才科技有限公司 Light supplement lamp control method, terminal device and storage medium

Similar Documents

Publication Publication Date Title
CN114093015A (en) Intelligent light supplementing method for face recognition, electronic equipment and storage medium
CN104978710B (en) A kind of method and apparatus that face brightness is adjusted based on identification of taking pictures
CN108197546B (en) Illumination processing method and device in face recognition, computer equipment and storage medium
US10437972B2 (en) Image exposure method for mobile terminal based on eyeprint recognition and image exposure system
CN108090405B (en) Face recognition method and terminal
US8971628B2 (en) Face detection using division-generated haar-like features for illumination invariance
CN107818305A (en) Image processing method, device, electronic equipment and computer-readable recording medium
US8280122B2 (en) Registration device, collation device, extraction method, and program
US7853048B2 (en) Pupil color correction device and program
CN107862274A (en) U.S. face method, apparatus, electronic equipment and computer-readable recording medium
CN108734676A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN110536068A (en) Focusing method and device, electronic equipment, computer readable storage medium
CN104052933A (en) Method for determining dynamic range mode, and image obtaining apparatus
CN106941588B (en) Data processing method and electronic equipment
US9449217B1 (en) Image authentication
CN105096267A (en) Method and device for adjusting brightness of eye portion based on shooting identification
US20090290048A1 (en) Pupil color correction device and program
CN114257738A (en) Automatic exposure method, device, equipment and storage medium
CN106791451A (en) A kind of photographic method of intelligent terminal
CN110881108A (en) Image processing method and image processing apparatus
CN112861645A (en) Infrared camera dim light environment compensation method and device and electronic equipment
CN110909617B (en) Living body face detection method and device based on binocular vision
CN109068060B (en) Image processing method and device, terminal device and computer readable storage medium
CN111666869B (en) Face recognition method and device based on wide dynamic processing and electronic equipment
CN102893292A (en) Method, apparatus and computer program product for compensating eye color defects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220225

RJ01 Rejection of invention patent application after publication