CN118279942A - Face recognition method and device, electronic equipment and storage medium - Google Patents

Face recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118279942A
CN118279942A CN202211709843.XA CN202211709843A CN118279942A CN 118279942 A CN118279942 A CN 118279942A CN 202211709843 A CN202211709843 A CN 202211709843A CN 118279942 A CN118279942 A CN 118279942A
Authority
CN
China
Prior art keywords
power
area
light source
face recognition
image
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
CN202211709843.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.)
Shanghai Jinsheng Communication Technology Co ltd
Original Assignee
Shanghai Jinsheng Communication 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 Shanghai Jinsheng Communication Technology Co ltd filed Critical Shanghai Jinsheng Communication Technology Co ltd
Priority to CN202211709843.XA priority Critical patent/CN118279942A/en
Publication of CN118279942A publication Critical patent/CN118279942A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a face recognition method, a face recognition device, electronic equipment and a storage medium, and relates to the technical field of face recognition. The method comprises the following steps: responding to a face recognition instruction, and detecting the integrity of the first area; if the first area is detected to be broken, increasing the current transmitting power of the target light source to a first target power, wherein the first target power is smaller than a first power threshold; controlling a target light source to emit light at a first target power, and acquiring a first face image in the environment through an image acquisition unit; and carrying out face recognition according to the first face image. Therefore, under the condition that the screen is broken, the emission power of the increased target light source is overlarge, so that the energy of light rays emitted by the target light source is overlarge and exceeds the human eye safety standard, and the problems of damaging human eyes and the like in the human face recognition process are avoided, namely the safety in the human eye recognition process is further ensured.

Description

Face recognition method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of face recognition technologies, and in particular, to a face recognition method, device, electronic apparatus, and storage medium.
Background
Face recognition is a biological recognition technology for carrying out identity recognition based on facial feature information of people. A series of related technologies, commonly referred to as image recognition and face recognition, are used to capture images or video streams containing faces with a camera or cameras, and automatically detect and track the faces in the images, thereby performing face recognition on the detected faces.
In the related art, in order to overcome the influence of light variation, an infrared image-based face recognition technology is generally used for a face recognition function in an electronic device, so as to ensure the accuracy, stability and efficiency of face recognition. However, the face recognition component is generally disposed below the screen of the electronic device, and if the face recognition component is damaged by external force, the screen above the face recognition component breaks. At this time, the infrared light source in the face recognition based component collects face images by using the infrared light emitted by the original emission power, which is insufficient for detecting face information, thereby affecting the performance of the face recognition function.
Disclosure of Invention
The application provides a face recognition method, a face recognition device, electronic equipment and a storage medium, so as to improve the accuracy and safety of face recognition.
In a first aspect, an embodiment of the present application provides a face recognition method, which is applied to an electronic device, where the electronic device includes a screen, a target light source, and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area, and the method includes: responding to a face recognition instruction, and detecting the integrity of the first area; if the first area is detected to be broken, increasing the current transmitting power of the target light source to a first target power, wherein the first target power is smaller than a first power threshold; controlling the target light source to emit light at the first target power, and acquiring a first face image in the environment through the image acquisition unit; and carrying out face recognition according to the first face image.
In a second aspect, an embodiment of the present application provides a face recognition device, where the electronic device includes a screen, a target light source, and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area, and the device includes: the system comprises an integrity detection module, a power adjustment module, an image acquisition module and a face recognition module. The integrity detection module is used for responding to the face recognition instruction and detecting the integrity of the first area; the power adjustment module is used for increasing the current transmitting power of the target light source to a first target power if the first area is detected to be broken, and the first target power is smaller than a first power threshold value; the image acquisition module is used for controlling the target light source to emit light rays with the first target power and acquiring a first face image in the environment through the image acquisition unit; and the face recognition module is used for carrying out face recognition according to the first face image.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, the program code being callable by a processor to perform the method described above.
In the scheme provided by the application, the completeness of the first area is detected in response to a face recognition instruction; if the first area is detected to be broken, increasing the current transmitting power of the target light source to a first target power, wherein the first target power is smaller than a first power threshold; controlling a target light source to emit light at a first target power, and acquiring a first face image in the environment through an image acquisition unit; and carrying out face recognition according to the first face image. Therefore, when the first area corresponding to the target light source and the image acquisition unit on the screen is detected to be broken, the transmitting power of the target light source is increased, the definition of the acquired face image can be improved, and further the situation that the acquired face image is partially shielded due to the fact that the first area is broken and meanwhile the definition is low, face recognition fails or is inaccurate is avoided. And moreover, the emission power of the target light source after the increase is smaller than the first power threshold, so that the problem that the human eyes are damaged in the human face recognition process due to the fact that the energy of light rays emitted by the target light source is overlarge and exceeds the human eye safety standard due to overlarge emission power of the target light source after the increase is avoided, namely the safety in the human eye recognition process is further ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a face recognition method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 3 is a schematic flow chart of a face recognition method according to another embodiment of the present application.
Fig. 4 shows a flow diagram of the sub-steps of step S210 in fig. 3 in one embodiment.
Fig. 5 shows a flow diagram of the sub-steps of step S210 in fig. 3 in another embodiment.
Fig. 6 is a schematic flow chart of a face recognition method according to another embodiment of the present application.
Fig. 7 is a block diagram of a face recognition apparatus according to an embodiment of the present application.
Fig. 8 is a block diagram of an electronic device for performing a face recognition method according to an embodiment of the present application.
Fig. 9 is a storage unit for storing or carrying program codes for implementing a face recognition method according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that in some of the processes described in the specification, claims and drawings above, a plurality of operations appearing in a specific order are included, and the operations may be performed out of the order in which they appear herein or in parallel. The sequence numbers of operations such as S110, S120, etc. are merely used to distinguish between the different operations, and the sequence numbers themselves do not represent any execution order. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. And the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or sub-modules is not necessarily limited to those steps or sub-modules that are expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or sub-modules that are not expressly listed.
The inventor provides a face recognition method, a device, electronic equipment and a storage medium, and before face recognition, if a first area in a screen is detected to be broken, the current transmitting power of a target light source is improved within the range of eye safety, and then a face image is acquired to perform face recognition. The following describes the face recognition method provided by the embodiment of the present application in detail.
Referring to fig. 1, fig. 1 is a flow chart of a face recognition method according to an embodiment of the application, which is applied to an electronic device, wherein the electronic device includes a screen, a target light source and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area. The face recognition method provided by the embodiment of the application will be described in detail with reference to fig. 1. The face recognition method may include the steps of:
Step S110: and responding to the face recognition instruction, and detecting the integrity of the first area.
In this embodiment, the electronic device may be an electronic terminal with a data processing function, including but not limited to a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, an electronic book reader, an MP3 (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio layer 3) player, and an MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio layer 4) player.
In practical application, in order to improve the screen ratio of the electronic device, a full-face screen is actually realized, and a face recognition component is generally arranged below the screen, that is, a target light source and an image acquisition unit are arranged below the screen, in other words, the function of face recognition is realized through an under-screen technology. At this time, the screen may be divided into a first area and a second area, where the first area corresponds to the target light source and the image acquisition unit, and the second area is other areas except the first area in the screen.
Optionally, referring to fig. 2, the electronic device 10 includes a screen 101, a target light source 102, and an image capturing unit 103, where the target light source 102 and the image capturing unit 103 are disposed below the screen 101, a region surrounded by a dashed line in the screen 101 above the target light source and the image capturing unit 103 is a first region 104, and other regions of the screen 101 except the first region 104 are second regions 105.
It can be understood that if the first area is broken under the action of external force, the face image captured by the image capturing unit located right below the first area is blocked, and then the face recognition failure is caused. Therefore, the integrity of the first area can be detected first, that is, whether the first area is broken or not, when the face recognition instruction is received.
The face recognition instruction may be triggered by the user lifting to wake up the electronic device, by the user clicking on a screen of the electronic device, by the user pressing a physical key of the electronic device, by the user making face recognition voice, or by the user initiating payment operation, which is not limited in this embodiment, that is, other ways that may be used to trigger the face recognition function of the electronic device are also within the scope of the present application.
Step S120: if the first area is detected to be broken, the current transmitting power of the target light source is increased to a first target power, and the first target power is smaller than a first power threshold.
In this embodiment, the target light source may be an infrared light source, for example, an infrared light emitter, and correspondingly, the image capturing unit is also an infrared camera. At this time, the image collected by the image collecting unit is an infrared image, and the infrared image is an image formed by the radiation of the object collected by the image collecting unit in the infrared band emitted by the infrared light source, and the principle is that the intensity of the infrared light reflected by the object is obtained. That is, the greater the intensity of the infrared light reflected by the object, the clearer the infrared image, i.e., the more useful information the infrared image contains, which is more conducive to image recognition.
Therefore, if the first area is detected to be broken, the acquired face image is partially shielded, the current transmitting power of the target light source can be increased to the first target power, and the infrared light intensity reflected by the face is further increased, so that the face area of the non-shielded part in the acquired face image is clearer, namely, the useful information is more contained, and finally, the success rate of face recognition based on the acquired face image can be improved. The first target power is smaller than a first power threshold, the first power threshold is calculated based on that laser reaches a human eye safety standard critical value, namely, the target light source is controlled to emit laser at the first target power smaller than the first power threshold, and the problems of laser loss and the like emitted by the target light source for human eyes can be avoided.
The first target power may be a preset power value, or may be a value adjusted according to a preset power adjustment algorithm, that is, the power of the current transmitting power may be gradually increased for multiple times, so that the power value after each increase is ensured to be smaller than the first power threshold. The current emission power may be understood as the emission power of the target light source, and thus, increasing the current emission power of the target light source may be by increasing the driving current or the driving voltage through the target light source, or the like, which is not limited in this embodiment.
Step S130: and controlling the target light source to emit light at the first target power, and acquiring a first face image in the environment through the image acquisition unit.
Further, the electronic device may control the target light source to emit infrared laser at the first target power, and then acquire a first face image in the environment through the image acquisition unit. The first face image is a face image of a target user in a shooting range of the image acquisition unit, wherein the target user can be a user with a relative distance from the electronic equipment smaller than a preset distance.
Step S140: and carrying out face recognition according to the first face image.
Finally, after the first face image is obtained, face recognition can be carried out on the target user through the first face image. Specifically, matching a first face image with each preset face image in a preset face image set in the electronic equipment, and if any preset face image is not matched with the first face image, determining that the target user does not have the operation authority on the electronic equipment. If the preset face image is matched with the first face image, preliminarily determining that the target user has the operation authority on the electronic equipment; further, in order to improve the accuracy of face recognition, as the first face image is a 2-dimensional infrared image, after the speckle pattern acquired by the infrared camera is subjected to image processing, the depth information of each pixel point in the face image is calculated, so that a face depth image corresponding to the first face image is obtained; then, matching the face depth image with each preset face depth image in a preset face depth image set, and if any one of the preset face depth images is matched with the face depth image corresponding to the first face image, determining that the target user has the operation authority on the electronic equipment; if any preset face depth image is not matched with the face depth image corresponding to the first face image, determining that the target user does not have the operation authority on the electronic equipment
In some embodiments, the image acquisition unit may be preset to acquire a plurality of first face images in the environment, that is, the image acquisition unit is controlled to acquire the face images for a plurality of times within a preset time period; therefore, each first face image can be matched with each preset face image in the preset face image set, namely face matching is carried out for a plurality of times, the preset face image is matched with the first face image in each face matching, and then the operation authority of the target user on the electronic equipment is preliminarily determined. Therefore, the accuracy of face recognition can be improved, and the occurrence of problems such as false recognition and the like can be reduced.
In some embodiments, if the face recognition according to the first face image fails, a first prompt message is output, where the first prompt message is used to prompt that the face recognition function cannot be started currently. The failure of face recognition does not mean that the target user does not have the operation authority for the electronic device, but means that the electronic device fails to match the first face image with the preset face image in the preset face image set, that is, the useful information contained in the first face image is too little, for example, a shielding area in the first face image is large, so that image matching cannot be performed. Optionally, the first prompting information may be used to prompt that the face recognition function cannot be started at present, and also may prompt that the first area of the screen of the user electronic device is broken, please repair in time, and prompt the user to perform authentication in other authentication modes, where the other authentication modes at least include authentication modes such as voiceprint authentication, fingerprint authentication, and password authentication, and the embodiment is not limited to this.
In this embodiment, when a first area on the screen corresponding to the target light source and the image acquisition unit is detected to have a break, the transmitting power of the target light source is increased, so that the definition of the acquired face image can be improved, and further, the situation that the acquired face image is partially blocked due to the fact that the first area is broken and meanwhile, the definition is low, and face recognition fails or is inaccurate is avoided. And moreover, the emission power of the target light source after the increase is smaller than the first power threshold, so that the problem that the human eyes are damaged in the human face recognition process due to the fact that the energy of light rays emitted by the target light source is overlarge and exceeds the human eye safety standard due to overlarge emission power of the target light source after the increase is avoided, namely the safety in the human eye recognition process is further ensured.
Referring to fig. 3, fig. 3 is a flow chart of a face recognition method according to another embodiment of the present application, which is applied to an electronic device, wherein the electronic device includes a screen, a target light source and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area. The face recognition method provided by the embodiment of the application will be described in detail with reference to fig. 3. The face recognition method may include the steps of:
step S210: and responding to the face recognition instruction, and detecting the integrity of the first area.
In this embodiment, the screen includes a display panel and a cover plate corresponding to the display panel, where a plurality of pixels distributed in arrays are disposed in the display panel, and the electronic device may display the content to be displayed by lighting the pixels in the display panel, and the display panel also has a touch detection function, that is, it can be detected whether the human hand touches the screen. Because the display panel is easy to break under the action of external force, the transparent cover plate corresponding to the display panel can be arranged, in particular, the transparent cover plate can be arranged above the display panel to cover the display panel and is used for protecting the display panel from being damaged and simultaneously not influencing the display of the content to be displayed.
In some embodiments, referring to fig. 4, step S210 may include the contents of steps S211A to S213A:
S211A: and acquiring a capacitance value in the display circuit corresponding to the panel region.
S212A: and if the capacitance value is in a preset capacitance value range, determining that the panel area is not broken.
S213A: and if the capacitance value is not in the preset capacitance value range, determining that the panel area is broken.
It can be understood that, although the cover plate has a certain capability of protecting the display panel from being broken by external force, if the electronic device falls from a high place, that is, under the condition of large external force, the display panel may still be broken, and if the panel region corresponding to the first region in the display panel is broken, the image acquisition unit still may influence the acquisition of the face image. Therefore, when the integrity of the first region is detected, the integrity of the panel region corresponding to the first region in the display panel may be detected first. Wherein the location of the panel area is the same as 104 in fig. 2.
Specifically, if the display panel is broken, a part of lines in the display circuit corresponding to the display panel is disconnected or broken, so that a current value in the display circuit is changed, and a capacitance value is changed. Based on the detection result, the capacitance value in the display circuit corresponding to the panel area can be detected through the preset capacitance value detection function corresponding to the display panel, and whether the capacitance value is in the preset capacitance value range is judged; if the capacitance value is detected to be in the preset capacitance value range, determining that no rupture exists in the panel area; if the capacitance value is detected not to be in the preset capacitance value range, determining that the panel area is broken. The preset capacitance value range may be obtained by statistical analysis in advance under the condition that the display panel is not broken in advance, and the historical capacitance value range of the statistical analysis is used as the preset capacitance value range and stored in the electronic device.
In some embodiments, referring to fig. 5, step S210 may include the contents of steps S211B to S213B:
S211B: and acquiring a second face image in the environment through the image acquisition unit.
S212B: if the preset image area in the second face image is detected to contain a preset facula image, determining that the cover plate area is broken, wherein the preset image area corresponds to the cover plate area.
S213B: if the preset image area in the second face image is detected not to contain the preset facula image, determining that the cover plate area is not broken.
It is understood that although the material of the cover plate provided to protect the display panel from being broken by external force is relatively hard, it is easily damaged by the large external force. Therefore, whether or not the aforementioned panel region is broken, it is necessary to determine the integrity of the cover plate region corresponding to the first region in the cover plate. Wherein the position of the cover plate area is the same as the position 104 in fig. 2.
Specifically, a second face image in the environment can be acquired through the image acquisition unit, at this time, before the second face image is acquired, the target light source is controlled to emit light by taking the preset emission power as the current emission power, and then the second face image is acquired. If the cover plate area is broken, different interfaces (air and glass interfaces) are caused at the broken positions, the photographing effect is different at the moment, and the second face image finally collected is reflected, namely, some facula images exist. Therefore, whether the preset light spot image is contained in the preset image area in the second face image can be judged, and if so, the cover plate area is determined to be broken; if not, it is determined that there is no rupture in the cover plate area.
Step S220: if the rupture of the panel area corresponding to the first area in the display panel or the rupture of the cover plate area corresponding to the first area in the cover plate is detected, the current emission power of the target light source is increased to a first target power.
Further, whether a crack is detected in a panel region of the display panel corresponding to the first region or a crack is detected in a cover plate region of the cover plate corresponding to the first region, the current emission power of the target light source is increased to a first target power, which is smaller than a first power threshold.
Step S230: and controlling the target light source to emit light at the first target power, and acquiring a first face image in the environment through the image acquisition unit.
Step S240: and carrying out face recognition according to the first face image.
In this embodiment, the specific implementation of step S230 to step S240 may refer to the content in the foregoing embodiment, and will not be described herein.
In some embodiments, after step S240, a third prompting message may be further output, where the third prompting message is used to prompt that a first area of a screen of the electronic device is broken, so that a user may learn about a breakage condition in time, and repair the screen. Specifically, the third prompt information can further specifically include damage conditions of the panel area and the cover plate area, so that a user can learn about the specific damage conditions, and further corresponding maintenance is performed.
In this embodiment, for the integrity of the panel area corresponding to the first area in the display panel, the capacitance value of the display circuit corresponding to the panel area may be detected by the capacitance value detection function of the electronic device, and based on the capacitance value, whether the panel area has a crack may be rapidly determined. Meanwhile, aiming at the integrity of the cover plate area corresponding to the first area in the cover plate, the image acquisition unit can acquire the face image, and whether the cover plate area is broken or not is rapidly judged based on whether a preset facula image exists in the face image. And then in the circumstances that any one of panel region and apron region exists the fracture, all increase the transmission power of target light source, improve the definition of the face image of gathering, and then avoided because of the first regional back of damaging, the face image of gathering exists the shielding of partial facula, the definition is lower simultaneously, leads to the face identification failure or the emergence of inaccurate scheduling condition. And moreover, the emission power of the target light source after the increase is smaller than the first power threshold, so that the problem that the human eyes are damaged in the human face recognition process due to the fact that the energy of light rays emitted by the target light source is overlarge and exceeds the human eye safety standard due to overlarge emission power of the target light source after the increase is avoided, namely the safety in the human eye recognition process is further ensured.
Referring to fig. 6, fig. 6 is a flow chart of a face recognition method according to another embodiment of the application, which is applied to an electronic device, wherein the electronic device includes a screen, a target light source and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area. The face recognition method provided by the embodiment of the present application will be described in detail with reference to fig. 6. The face recognition method may include the steps of:
step S310: and responding to the face recognition instruction, and detecting the integrity of the first area.
In this embodiment, the specific implementation of step S310 may refer to the content in the foregoing embodiment, which is not described herein.
Step S320: and if the first area is detected to be broken, acquiring the current transmitting power of the target light source.
Step S330: and if the current transmitting power is smaller than the first power threshold, acquiring a power difference value between the first power threshold and the current transmitting power.
It can be understood that the electronic device can leave a safety margin when controlling the target light source to emit laser, and the higher the safety margin is, the better the safety margin is, namely, the safety margin is 13.1 times, and the laser energy is enhanced by 13.1 times, so that the safety standard critical value of the laser eyes is reached. That is, the smaller the light emitting power of the target light source, the higher the safety to human eyes in the face recognition process.
Therefore, under the condition that the first area is detected to be broken, the current transmitting power of the target light source can be further acquired, and whether the current transmitting power is smaller than a first power threshold value or not is judged; if the current transmitting power is smaller than the first power threshold, the current transmitting power is adjusted to a second target power smaller than the first power threshold, so that damage to human eyes caused by overlarge transmitting power is avoided.
Optionally, if the current transmission power is smaller than the first power threshold, a power difference between the first power threshold and the current transmission power may be further obtained, and the difference between the current transmission power and the first power threshold may be quantified. In this case, the power difference can be regarded as a variation of the aforementioned safety margin, and the greater the power difference, the further away the laser eye safety standard threshold is characterized, and the higher the safety to the human eye.
Step S340: and if the power difference value is larger than a second power threshold value, increasing the current transmitting power of the target light source to the first target power.
Wherein the second power threshold may be a difference between the first power threshold and a third target power that is relatively close to the first power threshold, wherein the third target power is less than the first power threshold. Therefore, whether the power difference is larger than the second power threshold can be further judged, if the power difference is larger than the second power threshold, the current transmitting power of the target light source is characterized in that a space for improving exists, meanwhile, the damage to human eyes is avoided, and the current transmitting power of the target light source can be further increased to the first target power. The details of how to increase the above-mentioned embodiments can be referred to herein, and will not be described in detail.
Step S350: and controlling the target light source to emit light at the first target power, and acquiring a first face image in the environment through the image acquisition unit.
Step S360: and carrying out face recognition according to the first face image.
In this embodiment, the specific implementation of step S230 to step S240 may refer to the content in the foregoing embodiment, and will not be described herein.
Step S370: and if the power difference value is smaller than or equal to the second power threshold value, controlling the target light source to emit light rays with the current emission power, and acquiring a third face image in the environment through the image acquisition unit.
Step S380: and carrying out face recognition according to the third face image.
Step S390: if the face recognition fails, outputting second prompt information, wherein the second prompt information is used for prompting that the face recognition function cannot be started currently.
Optionally, if the power difference is less than or equal to the second power threshold, the current emission power of the target light source is represented to be very close to the laser eye safety standard critical value, and if the current emission power of the target light source is directly increased, the increased current emission power may exceed the laser eye safety standard critical value due to more or less deviation between the actual emission power of the target light source and the theoretically desired emission power, which may cause the problem of eye damage.
Therefore, under the condition that the power difference value is smaller than or equal to the second power threshold value, the current transmitting power of the target light source is not increased, the target light source is directly controlled to emit light with the current transmitting power, and then the image acquisition unit acquires a third face image in the environment. And performing face recognition based on the third face image, if the face recognition fails, the human eyes may be damaged by increasing the current emission power of the target light source at the moment, so that second prompt information is directly output to prompt the user that the face recognition function cannot be started currently. The second prompting information may also prompt the user that the first area of the screen of the electronic device is broken, please maintain in time, and prompt the user to perform authentication through other authentication modes, where the other authentication modes at least include authentication modes such as voiceprint authentication, fingerprint authentication, password authentication, and the embodiment is not limited thereto. Optionally, the second prompting information may also prompt the user to check whether the first area has dirt, because the face image acquisition of the image acquisition unit is affected when dirt is present.
In this embodiment, when detecting that a first area on the screen is broken, further determining whether the safety margin of the target light source is sufficient, that is, whether the power difference is greater than the second power threshold; if enough, the mode of increasing the emission power of the target light source in the allowed range of the laser eye safety standard critical value is adopted to improve the definition of the collected face image, so that the situation that the collected face image is partially shielded due to the fact that the first area is damaged and meanwhile the definition is lower, face recognition failure or inaccuracy and the like are avoided. If the power is insufficient, directly controlling the target light source to emit light at the current emission power, acquiring a face image through the image acquisition unit, and performing face recognition; and under the condition that the face recognition fails, outputting second prompt information to prompt that the face recognition function cannot be started currently, and under the condition that the human eye safety is protected, prompting a user to check the damage condition of the screen and maintaining in time.
Referring to fig. 7, a block diagram of a face recognition device 400 according to an embodiment of the application is shown and applied to an electronic device, where the electronic device includes a screen, a target light source, and an image acquisition unit, the screen includes a first area, and the target light source and the image acquisition unit are disposed corresponding to the first area. The apparatus 400 may include: integrity detection module 410, power adjustment module 420, image acquisition module 430, and face recognition module 440.
The integrity detection module 410 is configured to detect the integrity of the first area in response to the face recognition instruction.
The power adjustment module 420 is configured to increase the current emission power of the target light source to a first target power if the first area is detected to have a break, where the first target power is less than a first power threshold.
The image acquisition module 430 is configured to control the target light source to emit light at the first target power, and acquire a first face image in the environment through the image acquisition unit.
The face recognition module 440 is configured to perform face recognition according to the first face image.
In some embodiments, the screen includes a display panel and a cover plate disposed corresponding to the display panel, and the power adjustment module 420 may be specifically configured to increase the current emission power of the target light source to the first target power if a crack is detected in a panel area of the display panel corresponding to the first area or in a cover plate area of the cover plate corresponding to the first area.
In this manner, the integrity detection module 410 may be specifically configured to: acquiring a capacitance value in a display circuit corresponding to the panel region; if the capacitance value is in a preset capacitance value range, determining that no crack exists in the panel area; and if the capacitance value is not in the preset capacitance value range, determining that the panel area is broken.
In this manner, the integrity detection module 410 may also be specifically configured to: acquiring a second face image in the environment through the image acquisition unit; if the preset image area in the second face image is detected to contain a preset facula image, determining that the cover plate area is broken, wherein the preset image area corresponds to the cover plate area; if the preset image area in the second face image is detected not to contain the preset facula image, determining that the cover plate area is not broken.
In some implementations, the face recognition module 440 may include: and a prompting unit. The prompting unit may be configured to output first prompting information if the face recognition according to the first face image fails, where the first prompting information is used to prompt that the face recognition function cannot be started currently.
In some implementations, the power adjustment module 420 may include: the device comprises a current transmitting power acquisition unit, a power difference acquisition unit and a power difference judgment unit. The current transmitting power obtaining unit may be configured to obtain the current transmitting power of the target light source if the first area is detected to have a crack. The power difference value obtaining unit may be configured to obtain a power difference value between the first power threshold and the current transmission power if the current transmission power is smaller than the first power threshold. The power difference judging unit may be configured to: if the power difference value is larger than a second power threshold value, increasing the current transmitting power of the target light source to the first target power, and if the power difference value is smaller than or equal to the first power threshold value, controlling the target light source to emit light rays with the current transmitting power, and acquiring a third face image in the environment through the image acquisition unit; performing face recognition according to the third face image; if the face recognition fails, outputting second prompt information, wherein the second prompt information is used for prompting that the face recognition function cannot be started currently.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
In summary, in response to the face recognition instruction, the integrity of the first region is detected; if the first area is detected to be broken, increasing the current transmitting power of the target light source to a first target power, wherein the first target power is smaller than a first power threshold; controlling a target light source to emit light at a first target power, and acquiring a first face image in the environment through an image acquisition unit; and carrying out face recognition according to the first face image. Therefore, when the first area corresponding to the target light source and the image acquisition unit on the screen is detected to be broken, the transmitting power of the target light source is increased, the definition of the acquired face image can be improved, and further the situation that the acquired face image is partially shielded due to the fact that the first area is broken and meanwhile the definition is low, face recognition fails or is inaccurate is avoided. And moreover, the emission power of the target light source after the increase is smaller than the first power threshold, so that the problem that the human eyes are damaged in the human face recognition process due to the fact that the energy of light rays emitted by the target light source is overlarge and exceeds the human eye safety standard due to overlarge emission power of the target light source after the increase is avoided, namely the safety in the human eye recognition process is further ensured.
An electronic device according to the present application will be described with reference to fig. 8.
Referring to fig. 8, fig. 8 shows a block diagram of an electronic device 500 according to an embodiment of the present application, and the method according to the embodiment of the present application may be performed by the electronic device 500. The electronic device may be an electronic terminal with data processing capabilities including, but not limited to, a smart phone, tablet, notebook, desktop, smartwatch, e-book reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio layer 4) player, and the like.
The electronic device 500 in embodiments of the present application may include one or more of the following components: a processor 501, a memory 502, and one or more application programs, wherein the one or more application programs may be stored in the memory 502 and configured to be executed by the one or more processors 501, the one or more program(s) configured to perform the method as described in the foregoing method embodiments.
The processor 501 may include one or more processing cores. The processor 501 utilizes various interfaces and lines to connect various portions of the overall electronic device 500, perform various functions of the electronic device 500, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 502, and invoking data stored in the memory 502. Alternatively, the processor 501 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 501 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may also be integrated into the processor 501 and implemented solely by a communication chip.
Memory 502 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Memory 502 may be used to store instructions, programs, code sets, or instruction sets. The memory 502 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the electronic device 500 in use (such as the various correspondences described above), and so forth.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In the several embodiments provided by the present application, the illustrated or discussed coupling or direct coupling or communication connection of the modules to each other may be through some interfaces, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other forms.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Referring to fig. 9, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 600 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 600 comprises a non-transitory computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 610 may be compressed, for example, in a suitable form.
In some embodiments, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the electronic device to perform the steps of the method embodiments described above.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. The face recognition method is characterized by being applied to electronic equipment, wherein the electronic equipment comprises a screen, a target light source and an image acquisition unit, the screen comprises a first area, and the target light source and the image acquisition unit are correspondingly arranged in the first area, and the method comprises the following steps:
responding to a face recognition instruction, and detecting the integrity of the first area;
if the first area is detected to be broken, increasing the current transmitting power of the target light source to a first target power, wherein the first target power is smaller than a first power threshold;
Controlling the target light source to emit light at the first target power, and acquiring a first face image in the environment through the image acquisition unit;
And carrying out face recognition according to the first face image.
2. The method of claim 1, wherein the screen includes a display panel and a cover plate disposed corresponding to the display panel, and wherein increasing the current emission power of the target light source to the first target power if the first area is detected to have a crack comprises:
If the rupture of the panel area corresponding to the first area in the display panel or the rupture of the cover plate area corresponding to the first area in the cover plate is detected, the current emission power of the target light source is increased to a first target power.
3. The method of claim 2, wherein detecting the integrity of the first region comprises:
acquiring a capacitance value in a display circuit corresponding to the panel region;
If the capacitance value is in a preset capacitance value range, determining that no crack exists in the panel area;
And if the capacitance value is not in the preset capacitance value range, determining that the panel area is broken.
4. The method of claim 2, wherein detecting the integrity of the first region comprises:
acquiring a second face image in the environment through the image acquisition unit;
If the preset image area in the second face image is detected to contain a preset facula image, determining that the cover plate area is broken, wherein the preset image area corresponds to the cover plate area;
If the preset image area in the second face image is detected not to contain the preset facula image, determining that the cover plate area is not broken.
5. The method according to any one of claims 1-4, wherein said performing face recognition based on the first face image comprises:
If the face recognition is failed according to the first face image, outputting first prompt information, wherein the first prompt information is used for prompting that the face recognition function cannot be started currently.
6. The method of any of claims 1-4, wherein increasing the current emission power of the target light source to a first target power if a breach of the first region is detected comprises:
if the first area is detected to be broken, acquiring the current transmitting power of the target light source;
if the current transmitting power is smaller than the first power threshold, acquiring a power difference value between the first power threshold and the current transmitting power;
And if the power difference value is larger than a second power threshold value, increasing the current transmitting power of the target light source to the first target power.
7. The method of claim 6, wherein after the obtaining the power difference between the first power threshold and the current transmit power, the method further comprises:
if the power difference value is smaller than or equal to the second power threshold value, controlling the target light source to emit light rays with the current emission power, and acquiring a third face image in the environment through the image acquisition unit;
performing face recognition according to the third face image;
If the face recognition fails, outputting second prompt information, wherein the second prompt information is used for prompting that the face recognition function cannot be started currently.
8. A face recognition device, characterized in that is applied to electronic equipment, electronic equipment includes screen, target light source and image acquisition unit, the screen includes first region, target light source and image acquisition unit with first region corresponds the setting, the device includes:
the integrity detection module is used for responding to the face recognition instruction and detecting the integrity of the first area;
The power adjustment module is used for increasing the current transmitting power of the target light source to a first target power if the first area is detected to be broken, and the first target power is smaller than a first power threshold value;
The image acquisition module is used for controlling the target light source to emit light rays with the first target power and acquiring a first face image in the environment through the image acquisition unit;
and the face recognition module is used for carrying out face recognition according to the first face image.
9. An electronic device, comprising:
one or more processors;
A memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for performing the method according to any one of claims 1-7.
CN202211709843.XA 2022-12-29 2022-12-29 Face recognition method and device, electronic equipment and storage medium Pending CN118279942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211709843.XA CN118279942A (en) 2022-12-29 2022-12-29 Face recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211709843.XA CN118279942A (en) 2022-12-29 2022-12-29 Face recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118279942A true CN118279942A (en) 2024-07-02

Family

ID=91636537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211709843.XA Pending CN118279942A (en) 2022-12-29 2022-12-29 Face recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118279942A (en)

Similar Documents

Publication Publication Date Title
US10650259B2 (en) Human face recognition method and recognition system based on lip movement information and voice information
US20200380279A1 (en) Method and apparatus for liveness detection, electronic device, and storage medium
US11281885B2 (en) Method for fingerprint recognition, electronic device, and non-transitory computer-readable storage medium
KR102139795B1 (en) Method for updating biometric feature pattern and the electronic device therefor
US11321575B2 (en) Method, apparatus and system for liveness detection, electronic device, and storage medium
WO2019033386A1 (en) Fingerprint image acquisition method and device, and terminal device
US20220148337A1 (en) Living body detection method and apparatus, electronic device, and storage medium
CN107111744B (en) Detecting spoofing attacks for video-based authentication
WO2018119734A1 (en) Control method and apparatus for display screen
KR20180109109A (en) Method of recognition based on IRIS recognition and Electronic device supporting the same
CN108875468B (en) Living body detection method, living body detection system, and storage medium
CN108090340B (en) Face recognition processing method, face recognition processing device and intelligent terminal
US20220092323A1 (en) Spoofing detection apparatus, spoofing detection method, and computer-readable recording medium
EP4033458A2 (en) Method and apparatus of face anti-spoofing, device, storage medium, and computer program product
US20210034893A1 (en) Spoofing detection apparatus, spoofing detection method, and computer-readable recording medium
US11132567B2 (en) Method for authenticating user and electronic device thereof
CN102103696A (en) Face identification system, method and identification device with system
CN118279942A (en) Face recognition method and device, electronic equipment and storage medium
CN110287861B (en) Fingerprint identification method and device, storage medium and electronic equipment
JP2007025940A (en) Crime prevention system, crime prevention device, crime prevention method and program
EP2657886B1 (en) Method and apparatus for recognizing three-dimensional object
CN110826376A (en) Marker identification method and device, terminal equipment and storage medium
CN116363744A (en) Gesture recognition method and device and computer readable storage medium
US11036971B2 (en) Face recognition method and electronic device employing the method
CN110210397B (en) Fingerprint input method and related equipment

Legal Events

Date Code Title Description
PB01 Publication