WO2019149099A1 - Electronic device, human face recognition method, and relevant product - Google Patents

Electronic device, human face recognition method, and relevant product Download PDF

Info

Publication number
WO2019149099A1
WO2019149099A1 PCT/CN2019/072485 CN2019072485W WO2019149099A1 WO 2019149099 A1 WO2019149099 A1 WO 2019149099A1 CN 2019072485 W CN2019072485 W CN 2019072485W WO 2019149099 A1 WO2019149099 A1 WO 2019149099A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
face image
frame
camera
user
Prior art date
Application number
PCT/CN2019/072485
Other languages
French (fr)
Chinese (zh)
Inventor
王健
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019149099A1 publication Critical patent/WO2019149099A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/141Control of illumination
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/72Combination of two or more compensation controls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Definitions

  • the present application relates to the field of electronic device technologies, and in particular, to an electronic device, a face recognition method, and related products.
  • AE automatic exposure mode
  • the embodiment of the present application provides an electronic device, a face recognition method, and related products, in order to reduce the face recognition processing time and improve the face recognition speed by collecting the ambient light intensity process by the parallel light sensor.
  • an embodiment of the present application provides an electronic device, including a processor, a light sensor, and a camera, where the light sensor, the camera, and the processor are coupled, wherein
  • the processor when detecting a face recognition request, turning on the camera;
  • the light sensor is configured to acquire an ambient light intensity during the opening process of the camera
  • the processor is further configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity
  • the camera is configured to obtain a first frame face image according to the AE initial configuration shooting user
  • the processor is further configured to: according to the first frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  • the embodiment of the present application provides a method for recognizing a face, including:
  • the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity
  • the preset operation associated with the face recognition request is performed.
  • the embodiment of the present application provides a face recognition device, including an acquiring unit, a determining unit, a shooting unit, and an executing unit, where
  • the acquiring unit when detecting the face recognition request, acquires the ambient light intensity through the light sensor during the process of turning on the camera;
  • the determining unit is configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity
  • the photographing unit is configured to obtain a first frame face image by the user according to the AE initial configuration by the camera;
  • the executing unit is configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  • an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured by The processor executes, the program comprising instructions for performing the steps in any of the methods of the second aspect of the embodiments of the present application.
  • the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute as implemented in the present application.
  • the computer comprises an electronic device.
  • an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Apply some or all of the steps described in any of the methods of the second aspect of the embodiments.
  • the computer program product can be a software installation package, the computer including an electronic device.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic flow chart of a face recognition method disclosed in an embodiment of the present application.
  • FIG. 3 is a schematic flowchart diagram of another face recognition method disclosed in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart diagram of another face recognition method disclosed in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
  • FIG. 6 is a structural block diagram of a functional unit of an electronic device disclosed in an embodiment of the present application.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the electronic device involved in the embodiments of the present application may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user devices (User Equipment, UE), mobile station (MS), terminal device, and the like.
  • UE User Equipment
  • MS mobile station
  • terminal device and the like.
  • the devices mentioned above are collectively referred to as electronic devices.
  • the electronic device described in the embodiment of the present application is provided with a face image capturing device, and the face image collecting device may be a universal camera module, such as a front camera.
  • the face image collecting device may be a universal camera module, such as a front camera.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 includes a housing, a touch display screen, a main board, a battery, and a sub board.
  • the device 110, the memory 120, the camera 130, the light sensor 140, the SIM card slot, etc., the sub-board is provided with a vibrator, an integrated sound chamber, a VOOC flash charging interface, the light sensor 140, the camera 130 and the processor 110 Coupling, where
  • the processor 110 is configured to enable the camera when detecting a face recognition request
  • the light sensor 140 is configured to acquire an ambient light intensity during the opening process of the camera 130;
  • the light sensor 140 is also referred to as a brightness sensor Light Sensor.
  • the processor 110 is further configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity
  • the camera 130 is configured to: according to the AE initial configuration, the user obtains the first frame face image;
  • the processor 110 is further configured to: according to the first frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  • AE refers to the amount of light that enters the lens on the photosensitive element during the shooting process, and is controlled by a combination of aperture, shutter, and sensitivity.
  • the electronic device automatically adjusts the exposure according to the intensity of the light, that is, the ambient light intensity, to prevent the exposure. Overexposed or insufficient, but errors occur when the scene contrast is large (such as the scene of the stage).
  • the initial configuration of the AE may specifically be an exposure light intensity and/or a light explosion time.
  • the exposure light intensity can be indicated by the (Exposure Values, EV) value.
  • the face recognition request may be triggered by the user clicking the power button of the electronic device, or triggered by the display screen of the user's touch electronic device, or triggered by opening a certain function or application, which is not limited herein.
  • the electronic device when detecting the face recognition request, notifies the camera application to enable the camera, and simultaneously acquires the ambient light intensity of the current environment detected by the light sensor, and the light sensor may be a normally open sensor.
  • the camera application enables the duration of the camera to be approximately 800 milliseconds, and the ambient light intensity detected by the light sensor is greater than 60 milliseconds, and the initial configuration time of the AE is determined to be approximately 20 milliseconds according to the ambient light intensity, that is, through parallelism.
  • the electronic device can determine the accurate initial configuration of the AE. Compared with the existing solution, the electronic device needs to determine the accurate initial configuration of the AE in the first 3 frames, which effectively reduces the processing time and improves the real-time performance.
  • the processor 110 is a control center of the electronic device, and connects various parts of the entire electronic device by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and calling and storing in the memory 120.
  • the data performing various functions of the electronic device and processing data, thereby performing overall monitoring of the electronic device.
  • the processor 110 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes the wireless communication. It will be appreciated that the modem processor may also not be integrated into the processor 110.
  • the memory 120 can be used to store software programs and modules, and the processor 110 executes various functional applications and data processing of the electronic devices by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the electronic device or the like.
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced as a whole, and the face recognition speed can be improved.
  • the processor 110 is further configured to: determine, according to the first frame, that the current user is the current user, determine a face center position in the first frame of the face image; Determining a reference image region according to the face center position; and determining a brightness mean value of the reference image region; and configured to adjust the AE initial configuration according to the brightness mean value to obtain an AE target configuration;
  • the camera 130 is further configured to: according to the AE target configuration, the user obtains a second frame face image;
  • the processor 110 is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  • the processor 110 is further configured to determine a face center point position in the first frame face image before the current user is the home owner user according to the first frame face image; Determining a reference brightness of the face region according to the face center point position; and detecting that the reference brightness is in a preset brightness interval.
  • the processor 110 is further configured to: detect that the reference brightness is not in a preset brightness interval, determine an AE compensation configuration of the face region; and use the AE compensation configuration and the The initial configuration of the AE determines the AE target configuration;
  • the camera 130 is further configured to: according to the AE target configuration, the user obtains a second frame face image;
  • the processor 110 is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  • the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  • FIG. 2 is a schematic flowchart of a method for recognizing a face according to an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the method for recognizing a face includes:
  • AE refers to the amount of light that enters the lens on the photosensitive element during the shooting process, and is controlled by a combination of aperture, shutter, and sensitivity.
  • the electronic device automatically adjusts the exposure according to the intensity of the light, that is, the ambient light intensity, to prevent the exposure. Overexposed or insufficient, but errors occur when the scene contrast is large (such as the scene of the stage).
  • the initial configuration of the AE may specifically be an exposure light intensity and/or a light explosion time.
  • the exposure light intensity can be indicated by the (Exposure Values, EV) value.
  • the face recognition request may be triggered by the user clicking the power button of the electronic device, or triggered by the display screen of the user's touch electronic device, or triggered by opening a certain function or application, which is not limited herein.
  • the electronic device when detecting the face recognition request, notifies the camera application to enable the camera, and simultaneously acquires the ambient light intensity of the current environment detected by the light sensor, and the light sensor may be a normally open sensor.
  • the camera application enables the duration of the camera to be approximately 800 milliseconds, and the ambient light intensity detected by the light sensor is greater than 60 milliseconds, and the initial configuration time of the AE is determined to be approximately 20 milliseconds according to the ambient light intensity, that is, through parallelism.
  • the electronic device can determine the accurate initial configuration of the AE. Compared with the existing solution, the electronic device needs to determine the accurate initial configuration of the AE in the first 3 frames, which effectively reduces the processing time and improves the real-time performance.
  • the electronic device obtains a first frame face image according to the AE initial configuration by the camera.
  • the electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  • the specific implementation manner of the current user being the primary user may be: the first frame face image matches the template face image of the pre-stored home owner user.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • the method further includes: if the electronic device does not recognize that the current user is the primary user according to the first frame face image, determining a face center position in the first frame face image Determining a reference image region according to the face center position; determining a brightness average of the reference image region; adjusting the AE initial configuration according to the brightness mean to obtain an AE target configuration; configuring, by the camera according to the AE target The shooting user obtains the second frame face image; if the current user is the home owner user according to the second frame face image, the preset operation associated with the face recognition request is performed.
  • the determining the reference image area according to the location of the face center may be an image area including a face image area larger than a preset area threshold, or an image area having a face image ratio greater than a preset percentage threshold. Do not make a single limit.
  • the electronic device can determine the brightness average of the reference image region including the face image, and correct the initial configuration of the AE according to the brightness average.
  • the second frame face image with more moderate exposure is captured, and the user identity is recognized according to the second frame face image, which is beneficial to improving the success rate and accuracy of the face recognition of the electronic device.
  • the method further includes: determining a face center point position in the first frame face image before the current user is the home owner user according to the first frame face image; Determining a reference brightness of the face region according to the face center point position; detecting that the reference brightness is in a preset brightness interval.
  • the preset brightness interval may be determined by using a pre-stored template face image, or determined according to the face image in the face recognition successful record, which is not limited herein.
  • the electronic device may first analyze the reference brightness of the face region of the first frame of the currently photographed face image, thereby ensuring that the exposure of the first frame face image is suitable.
  • the images are compared to improve the accuracy of face recognition of electronic devices.
  • the method further includes: the electronic device detecting that the reference brightness is not in a preset brightness interval, determining an AE compensation configuration of the face region; according to the AE compensation configuration and the AE
  • the initial configuration determines an AE target configuration; the camera obtains a second frame face image according to the AE target configuration by the camera; and if the current user is the home owner user according to the second frame face image, the face is executed Identify the preset action associated with the request.
  • AE compensation is an exposure control method, which is generally around ⁇ 2-3EV. If the ambient light source is dark, you can increase the exposure value (such as +1EV, +2EV) to highlight the sharpness of the picture. Exposure compensation is the conscious change to the "appropriate" exposure parameters that the camera automatically calculates to make the photos brighter or darker. The photographer can adjust the brightness of the photo according to his own ideas, creating unique visual effects and the like. Generally, the camera will change the aperture value or shutter speed to adjust the exposure value.
  • the electronic device may determine the AE target configuration through the AE compensation configuration of the face region, and then obtain the second frame face image by the camera according to the AE target configuration. Finally, identifying the user identity according to the second frame face image is beneficial to improving the accuracy of the face recognition of the electronic device.
  • the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  • the unlocking includes a bright screen unlocking or a screen blanking unlocking
  • the payment includes a large amount of payment or a small amount of payment
  • the application enabling the corresponding application includes a system application of the electronic device or a third party application.
  • the electronic device determines the identity of the user through face recognition, thereby completing the preset operation, and improving the security and accuracy of the electronic device performing the operation.
  • FIG. 3 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure, which is applied to an electronic device, as shown in the figure, the face recognition. Methods include:
  • the electronic device detects the face recognition request, the ambient light intensity is acquired by the light sensor during the process of turning on the camera, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
  • the electronic device obtains a first frame face image by the user according to the AE initial configuration by the camera;
  • the electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  • the electronic device determines a reference image region according to the location of the face center.
  • the electronic device determines a brightness average value of the reference image region.
  • the electronic device adjusts the initial configuration of the AE according to the brightness average value to obtain an AE target configuration.
  • the electronic device obtains a second frame face image according to the AE target configuration by the camera.
  • the electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • the electronic device can determine the brightness average of the reference image area including the face image, and correct the AE initial configuration according to the brightness average to capture the exposure.
  • the second frame of the face image is more moderate, and the user identity is recognized according to the second frame face image, which is beneficial to improving the success rate and accuracy of the face recognition of the electronic device.
  • FIG. 4 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure, which is applied to an electronic device, as shown in the figure, the face recognition. Methods include:
  • the electronic device detects the face recognition request, the ambient light intensity is acquired by the light sensor during the process of turning on the camera, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
  • the electronic device obtains a first frame face image by the user according to the AE initial configuration by the camera;
  • the electronic device determines a location of a face center point in the first frame face image
  • the electronic device determines a reference brightness of the face region according to the location of the face center point
  • the electronic device detects that the reference brightness is in a preset brightness interval.
  • the electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  • the electronic device detects that the reference brightness is not in a preset brightness interval, and determines an AE compensation configuration of the face area;
  • the electronic device determines an AE target configuration according to the AE compensation configuration and the AE initial configuration.
  • the electronic device obtains a second frame face image according to the AE target configuration by the camera.
  • S4010 The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • the electronic device may first analyze the reference brightness of the face region of the first frame of the currently photographed face image, thereby ensuring that the exposure of the first frame face image is suitable for image comparison. It is beneficial to improve the accuracy of face recognition of electronic devices.
  • the electronic device may determine the AE target configuration by using the AE compensation configuration of the face region, and then the camera obtains the second frame face image according to the AE target configuration by the camera, and finally according to the The second frame of the face image identifies the user identity, which is beneficial to improve the accuracy of face recognition of the electronic device.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising the steps of performing the following steps Instruction
  • the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity
  • the preset operation associated with the face recognition request is performed.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • the program further includes instructions for: determining, if the current user is the primary user, based on the first frame of the face image, determining the person in the first frame of the face image a face center position; and a reference image region for determining a reference image region according to the face center position; and for determining a brightness mean value of the reference image region; and for adjusting the AE initial configuration according to the brightness mean value to obtain an AE target And configured to obtain a second frame face image by the camera according to the AE target configuration; and to execute the person if the current user is the home user according to the second frame face image
  • the face recognition request is associated with a preset operation.
  • the program further includes instructions for: determining a person in the first frame of the face image before identifying the current user as the primary user according to the first frame face image a face center point position; and a reference brightness for determining a face area according to the face center point position; and for detecting that the reference brightness is within a preset brightness interval.
  • the program further includes instructions for detecting that the reference brightness is not in a preset brightness interval, determining an AE compensation configuration of the face region, and for using the AE a compensation configuration and the AE initial configuration determining an AE target configuration; and a second frame face image for capturing a user according to the AE target configuration by the camera; and for identifying a face image according to the second frame
  • the current user is the primary user, and the preset operation associated with the face recognition request is performed.
  • the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  • FIG. 6 is a block diagram of a functional unit of a face recognition device according to an embodiment of the present disclosure.
  • the face recognition device 600 is applied to an electronic device, including an acquisition unit 601, a determination unit 602, and a shooting unit. 603 and an execution unit 604, wherein
  • the acquiring unit 601 is configured to acquire an ambient light intensity by using a light sensor during the process of turning on the camera when detecting the face recognition request;
  • the determining unit 602 is configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity
  • the photographing unit 603 is configured to obtain, by the camera, a first frame face image according to the AE initial configuration shooting user;
  • the executing unit 604 is configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  • the electronic device when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
  • the determining unit 602 is further configured to determine a face center position in the first frame face image if the current user is not the home owner user according to the first frame face image; And determining a reference image region according to the face center position; and determining a brightness average of the reference image region;
  • the face recognition device 600 further includes an adjustment unit, configured to adjust the AE initial configuration according to the brightness mean value to obtain an AE target configuration;
  • the photographing unit 603 is further configured to obtain a second frame face image by the camera according to the AE target configuration by the camera;
  • the executing unit 604 is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  • the determining unit 602 is further configured to determine, in the first frame, the face image, before the executing unit 604 identifies that the current user is the primary user according to the first frame face image. a face center point position; and a reference brightness for determining a face area according to the face center point position;
  • the face recognition device 600 further includes a detecting unit, configured to detect that the reference brightness is in a preset brightness interval.
  • the detecting unit is further configured to detect that the reference brightness is not in a preset brightness interval
  • the determining unit 602 is further configured to determine an AE compensation configuration of the face region; and configured to determine an AE target configuration according to the AE compensation configuration and the AE initial configuration;
  • the photographing unit 603 is further configured to obtain a second frame face image by the camera according to the AE target configuration by the camera;
  • the executing unit 604 is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  • the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  • the electronic device described in the device embodiment of the present application is presented in the form of a functional unit.
  • the term "unit” as used herein shall be understood to mean the broadest possible meaning, and the object for implementing the functions described for each "unit” may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware.
  • a processor shared, dedicated or chipset
  • memory of the program combinatorial logic, and/or other suitable components that perform the functions described above.
  • the obtaining unit 601 may be a receiver, the determining unit 602 and the executing unit 604 may be processors, and the photographing unit 603 may be a camera.
  • the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to execute part or all of any of the methods described in the method embodiment.
  • the computer includes an electronic device.
  • the embodiment of the present application further provides a computer program product, comprising: a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute as described in the method embodiment Part or all of the steps of either method.
  • the computer program product can be a software installation package, the computer including an electronic device.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory.
  • a computer readable memory A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present application.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

An electronic device, a human face recognition method, and a relevant product. The method comprises: when a human face recognition request is detected, acquiring an ambient light intensity, by means of a light sensor, in the process of starting a camera, and determining an inital automatic exposure (AE) configuration according to the ambient light intensity (S201); photographing, by means of the camera, a user to obtain a first frame of a human face image according to the initial AE configuration (S202); and if the current user is recognized to be a householder user according to the first frame of a human face image, executing a pre-set operation associated with the human face recognition request (S203). The process of collecting an ambient light intensity by means of a parallel light sensor reduces the time duration of human face recognition processing, and facilitates the improvement of the human face recognition speed.

Description

电子装置、人脸识别方法及相关产品Electronic device, face recognition method and related products 技术领域Technical field
本申请涉及电子装置技术领域,具体涉及一种电子装置、人脸识别方法及相关产品。The present application relates to the field of electronic device technologies, and in particular, to an electronic device, a face recognition method, and related products.
背景技术Background technique
随着智能手机等电子装置的大量普及应用,智能手机能够支持的应用越来越多,功能越来越强大,智能手机向着多样化、个性化的方向发展,成为用户生活中不可缺少的电子用品。目前市场上的电子装置多采用全自动曝光方式AE,即根据被拍摄目标的亮度及镜头焦距,自动确定曝光组合(光圈*快门)的一种曝光模式。对于明暗差异较大的场景,AE技术很难满足曝光需求。With the widespread use of electronic devices such as smart phones, smart phones can support more and more applications, and their functions are becoming more and more powerful. Smartphones are developing in a diversified and personalized way, becoming an indispensable electronic product in user life. . At present, the electronic device on the market mostly adopts the automatic exposure mode AE, that is, an exposure mode that automatically determines the exposure combination (aperture*shutter) according to the brightness of the target and the focal length of the lens. For scenes with large differences in brightness and darkness, AE technology is difficult to meet the exposure needs.
发明内容Summary of the invention
本申请实施例提供了一种电子装置、人脸识别方法及相关产品,以期通过并行光线传感器采集环境光强过程减少人脸识别处理时长,提高人脸识别速度。The embodiment of the present application provides an electronic device, a face recognition method, and related products, in order to reduce the face recognition processing time and improve the face recognition speed by collecting the ambient light intensity process by the parallel light sensor.
第一方面,本申请实施例提供一种电子装置,包括处理器、光线传感器、摄像头,所述光线传感器、所述摄像头和所述处理器耦合,其中,In a first aspect, an embodiment of the present application provides an electronic device, including a processor, a light sensor, and a camera, where the light sensor, the camera, and the processor are coupled, wherein
所述处理器,用于检测到人脸识别请求时,开启所述摄像头;The processor, when detecting a face recognition request, turning on the camera;
所述光线传感器,用于在所述摄像头的开启过程中,获取环境光强;The light sensor is configured to acquire an ambient light intensity during the opening process of the camera;
所述处理器,还用于根据所述环境光强确定自动曝光AE初始配置;The processor is further configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
所述摄像头,用于根据所述AE初始配置拍摄用户得到第一帧人脸图像;The camera is configured to obtain a first frame face image according to the AE initial configuration shooting user;
所述处理器,还用于根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor is further configured to: according to the first frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
第二方面,本申请实施例提供一种人脸识别方法,包括:In a second aspect, the embodiment of the present application provides a method for recognizing a face, including:
检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光AE初始配置;When the face recognition request is detected, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;Obtaining, by the camera, the first frame face image according to the AE initial configuration shooting user;
若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。If the current user is identified as the primary user according to the first frame face image, the preset operation associated with the face recognition request is performed.
第三方面,本申请实施例提供一种人脸识别装置,包括获取单元、确定单元、拍摄单元和执行单元,其中,In a third aspect, the embodiment of the present application provides a face recognition device, including an acquiring unit, a determining unit, a shooting unit, and an executing unit, where
所述获取单元,用于检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强;The acquiring unit, when detecting the face recognition request, acquires the ambient light intensity through the light sensor during the process of turning on the camera;
所述确定单元,用于根据所述环境光强确定自动曝光AE初始配置;The determining unit is configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
所述拍摄单元,用于通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;The photographing unit is configured to obtain a first frame face image by the user according to the AE initial configuration by the camera;
所述执行单元,用于若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit is configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
第四方面,本申请实施例提供一种电子装置,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行本申请实施例第二方面任一方法中的步骤的指令。In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured by The processor executes, the program comprising instructions for performing the steps in any of the methods of the second aspect of the embodiments of the present application.
第五方面,本申请实施例提供了一种计算机可读存储介质,其中,所述计算机可读存 储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如本申请实施例第二方面任一方法中所描述的部分或全部步骤,所述计算机包括电子装置。In a fifth aspect, the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute as implemented in the present application. In some or all of the steps described in any of the methods of the second aspect, the computer comprises an electronic device.
第六方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第二方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括电子装置。In a sixth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Apply some or all of the steps described in any of the methods of the second aspect of the embodiments. The computer program product can be a software installation package, the computer including an electronic device.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1是本申请实施例提供的一种电子装置的结构示意图;1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图2是本申请实施例公开的一种人脸识别方法的流程示意图;2 is a schematic flow chart of a face recognition method disclosed in an embodiment of the present application;
图3是本申请实施例公开的另一种人脸识别方法的流程示意图;FIG. 3 is a schematic flowchart diagram of another face recognition method disclosed in an embodiment of the present application; FIG.
图4是本申请实施例公开的另一种人脸识别方法的流程示意图;4 is a schematic flowchart diagram of another face recognition method disclosed in an embodiment of the present application;
图5是本申请实施例公开的一种电子装置的结构示意图;FIG. 5 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application; FIG.
图6是本申请实施例公开的一种电子装置的功能单元组成框图。FIG. 6 is a structural block diagram of a functional unit of an electronic device disclosed in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not intended to describe a particular order. Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products, or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请实施例所涉及到的电子装置可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为电子装置。The electronic device involved in the embodiments of the present application may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user devices (User Equipment, UE), mobile station (MS), terminal device, and the like. For convenience of description, the devices mentioned above are collectively referred to as electronic devices.
本申请实施例所描述的电子装置设置有人脸图像采集装置,人脸图像采集装置可以是通用摄像头模组,如前置摄像头。下面对本申请实施例进行详细介绍。The electronic device described in the embodiment of the present application is provided with a face image capturing device, and the face image collecting device may be a universal camera module, such as a front camera. The embodiments of the present application are described in detail below.
请参阅图1,图1是本申请实施例提供了一种电子装置100的结构示意图,所述电子装置100包括:壳体、触控显示屏、主板、电池和副板,主板上设置有处理器110、存储器120、摄像头130、光线传感器140和SIM卡槽等,副板上设置有振子、一体音腔、VOOC闪充接口,所述光线传感器140、所述摄像头130与所述处理器110耦合,其中,Please refer to FIG. 1 . FIG. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. The electronic device 100 includes a housing, a touch display screen, a main board, a battery, and a sub board. The device 110, the memory 120, the camera 130, the light sensor 140, the SIM card slot, etc., the sub-board is provided with a vibrator, an integrated sound chamber, a VOOC flash charging interface, the light sensor 140, the camera 130 and the processor 110 Coupling, where
所述处理器110,用于检测到人脸识别请求时,开启所述摄像头;The processor 110 is configured to enable the camera when detecting a face recognition request;
所述光线传感器140,用于在所述摄像头130的开启过程中,获取环境光强;The light sensor 140 is configured to acquire an ambient light intensity during the opening process of the camera 130;
其中,光线传感器140又称为亮度感应器Light Sensor。The light sensor 140 is also referred to as a brightness sensor Light Sensor.
所述处理器110,还用于根据所述环境光强确定自动曝光AE初始配置;The processor 110 is further configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
所述摄像头130,用于根据所述AE初始配置拍摄用户得到第一帧人脸图像;The camera 130 is configured to: according to the AE initial configuration, the user obtains the first frame face image;
所述处理器110,还用于根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor 110 is further configured to: according to the first frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
其中,AE是指在拍摄过程中进入镜头照射在感光元件上的光量,由光圈、快门、感光度的组合来控制,具体由电子装置根据光线的强弱即环境光强自动调整曝光量,防止曝光过度或者不足,但是,在场景反差很大的时候会出现误差(比如舞台的场景)。该AE初始配置具体可以是曝光光强和/或光爆时间。其中,曝光光强可以通过(Exposure Values,EV)值来指示。Among them, AE refers to the amount of light that enters the lens on the photosensitive element during the shooting process, and is controlled by a combination of aperture, shutter, and sensitivity. Specifically, the electronic device automatically adjusts the exposure according to the intensity of the light, that is, the ambient light intensity, to prevent the exposure. Overexposed or insufficient, but errors occur when the scene contrast is large (such as the scene of the stage). The initial configuration of the AE may specifically be an exposure light intensity and/or a light explosion time. Among them, the exposure light intensity can be indicated by the (Exposure Values, EV) value.
其中,所述人脸识别请求可以由用户点击电子装置的电源键触发,或者由用户触控电子装置的显示屏触发,或者由于开启某项功能或应用而触发,此处不做唯一限定。The face recognition request may be triggered by the user clicking the power button of the electronic device, or triggered by the display screen of the user's touch electronic device, or triggered by opening a certain function or application, which is not limited herein.
具体实现中,电子装置在检测到人脸识别请求时,通知相机应用程序启用摄像头,同时获取光线传感器检测的当前环境的环境光强,该光线传感器可以是常开的传感器,实际实验中发现,相机应用程序启用摄像头的时长大约在800毫秒,而获取光线传感器检测到的环境光强的时长大于60毫秒,根据该环境光强确定AE初始配置的时长大约20毫秒,也就是说,通过并行可以保证摄像头启用完成之前,电子装置就可以确定准确的AE初始配置,相对于现有方案中电子装置需要在前3帧确定准确的AE初始配置,有效的降低了处理时长,提高实时性。In a specific implementation, when detecting the face recognition request, the electronic device notifies the camera application to enable the camera, and simultaneously acquires the ambient light intensity of the current environment detected by the light sensor, and the light sensor may be a normally open sensor. The camera application enables the duration of the camera to be approximately 800 milliseconds, and the ambient light intensity detected by the light sensor is greater than 60 milliseconds, and the initial configuration time of the AE is determined to be approximately 20 milliseconds according to the ambient light intensity, that is, through parallelism. Before the camera is enabled, the electronic device can determine the accurate initial configuration of the AE. Compared with the existing solution, the electronic device needs to determine the accurate initial configuration of the AE in the first 3 frames, which effectively reduces the processing time and improves the real-time performance.
其中,处理器110是电子装置的控制中心,利用各种接口和线路连接整个电子装置的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行电子装置的各种功能和处理数据,从而对电子装置进行整体监控。可选的,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,所述调制解调处理器也可以不集成到处理器110中。存储器120可用于存储软件程序以及模块,处理器110通过运行存储在存储器120的软件程序以及模块,从而执行电子装置的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据电子装置的使用所创建的数据等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The processor 110 is a control center of the electronic device, and connects various parts of the entire electronic device by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and calling and storing in the memory 120. The data, performing various functions of the electronic device and processing data, thereby performing overall monitoring of the electronic device. Optionally, the processor 110 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes the wireless communication. It will be appreciated that the modem processor may also not be integrated into the processor 110. The memory 120 can be used to store software programs and modules, and the processor 110 executes various functional applications and data processing of the electronic devices by running software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the electronic device or the like. Moreover, memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光 线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced as a whole, and the face recognition speed can be improved.
在一个可能的示例中,所述处理器110还用于:根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;以及用于根据所述人脸中心位置确定参考图像区域;以及用于确定所述参考图像区域的亮度均值;以及用于根据所述亮度均值调整所述AE初始配置,得到AE目标配置;In a possible example, the processor 110 is further configured to: determine, according to the first frame, that the current user is the current user, determine a face center position in the first frame of the face image; Determining a reference image region according to the face center position; and determining a brightness mean value of the reference image region; and configured to adjust the AE initial configuration according to the brightness mean value to obtain an AE target configuration;
所述摄像头130,还用于根据所述AE目标配置拍摄用户得到第二帧人脸图像;The camera 130 is further configured to: according to the AE target configuration, the user obtains a second frame face image;
所述处理器110,还用于根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor 110 is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
在一个可能的示例中,所述处理器110根据所述第一帧人脸图像识别出当前用户为户主用户之前,还用于确定所述第一帧人脸图像中人脸中心点位置;以及用于根据所述人脸中心点位置确定人脸区域的参考亮度;以及用于检测到所述参考亮度在预设亮度区间。In one possible example, the processor 110 is further configured to determine a face center point position in the first frame face image before the current user is the home owner user according to the first frame face image; Determining a reference brightness of the face region according to the face center point position; and detecting that the reference brightness is in a preset brightness interval.
在本可能的示例中,所述处理器110还用于:检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;以及用于根据所述AE补偿配置和所述AE初始配置确定AE目标配置;In the presently possible example, the processor 110 is further configured to: detect that the reference brightness is not in a preset brightness interval, determine an AE compensation configuration of the face region; and use the AE compensation configuration and the The initial configuration of the AE determines the AE target configuration;
所述摄像头130,还用于根据所述AE目标配置拍摄用户得到第二帧人脸图像;The camera 130 is further configured to: according to the AE target configuration, the user obtains a second frame face image;
所述处理器110,还用于根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor 110 is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
在一个可能的示例中,所述人脸识别请求关联的预设操作至少包括以下任意一种:解锁、支付、应用启动。In one possible example, the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
请参阅图2,图2是本申请实施例提供了一种人脸识别方法的流程示意图,应用于电子装置,如图所示,本人脸识别方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of a method for recognizing a face according to an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the method for recognizing a face includes:
S201,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光(Automatic Exposure,AE)初始配置;S201, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure (AE) is determined according to the ambient light intensity;
其中,AE是指在拍摄过程中进入镜头照射在感光元件上的光量,由光圈、快门、感光度的组合来控制,具体由电子装置根据光线的强弱即环境光强自动调整曝光量,防止曝光过度或者不足,但是,在场景反差很大的时候会出现误差(比如舞台的场景)。该AE初始配置具体可以是曝光光强和/或光爆时间。其中,曝光光强可以通过(Exposure Values,EV)值来指示。Among them, AE refers to the amount of light that enters the lens on the photosensitive element during the shooting process, and is controlled by a combination of aperture, shutter, and sensitivity. Specifically, the electronic device automatically adjusts the exposure according to the intensity of the light, that is, the ambient light intensity, to prevent the exposure. Overexposed or insufficient, but errors occur when the scene contrast is large (such as the scene of the stage). The initial configuration of the AE may specifically be an exposure light intensity and/or a light explosion time. Among them, the exposure light intensity can be indicated by the (Exposure Values, EV) value.
其中,所述人脸识别请求可以由用户点击电子装置的电源键触发,或者由用户触控电子装置的显示屏触发,或者由于开启某项功能或应用而触发,此处不做唯一限定。The face recognition request may be triggered by the user clicking the power button of the electronic device, or triggered by the display screen of the user's touch electronic device, or triggered by opening a certain function or application, which is not limited herein.
具体实现中,电子装置在检测到人脸识别请求时,通知相机应用程序启用摄像头,同时获取光线传感器检测的当前环境的环境光强,该光线传感器可以是常开的传感器,实际实验中发现,相机应用程序启用摄像头的时长大约在800毫秒,而获取光线传感器检测到的环境光强的时长大于60毫秒,根据该环境光强确定AE初始配置的时长大约20毫秒,也就是说,通过并行可以保证摄像头启用完成之前,电子装置就可以确定准确的AE初始配置,相对于现有方案中电子装置需要在前3帧确定准确的AE初始配置,有效的降低了处理时长,提高实时性。In a specific implementation, when detecting the face recognition request, the electronic device notifies the camera application to enable the camera, and simultaneously acquires the ambient light intensity of the current environment detected by the light sensor, and the light sensor may be a normally open sensor. The camera application enables the duration of the camera to be approximately 800 milliseconds, and the ambient light intensity detected by the light sensor is greater than 60 milliseconds, and the initial configuration time of the AE is determined to be approximately 20 milliseconds according to the ambient light intensity, that is, through parallelism. Before the camera is enabled, the electronic device can determine the accurate initial configuration of the AE. Compared with the existing solution, the electronic device needs to determine the accurate initial configuration of the AE in the first 3 frames, which effectively reduces the processing time and improves the real-time performance.
S202,所述电子装置通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;S202. The electronic device obtains a first frame face image according to the AE initial configuration by the camera.
S203,所述电子装置若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。S203. The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
其中,所述识别出当前用户为户主用户的具体实现方式可以是:所述第一帧人脸图像 与预存的户主用户的模板人脸图像的相匹配。The specific implementation manner of the current user being the primary user may be: the first frame face image matches the template face image of the pre-stored home owner user.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
在一个可能的示例中,所述方法还包括:若所述电子装置根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;根据所述人脸中心位置确定参考图像区域;确定所述参考图像区域的亮度均值;根据所述亮度均值调整所述AE初始配置,得到AE目标配置;通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。In a possible example, the method further includes: if the electronic device does not recognize that the current user is the primary user according to the first frame face image, determining a face center position in the first frame face image Determining a reference image region according to the face center position; determining a brightness average of the reference image region; adjusting the AE initial configuration according to the brightness mean to obtain an AE target configuration; configuring, by the camera according to the AE target The shooting user obtains the second frame face image; if the current user is the home owner user according to the second frame face image, the preset operation associated with the face recognition request is performed.
其中,所述根据所述人脸中心位置确定参考图像区域可以是包括人脸影像面积大于预设面积阈值的图像区域,或者是人脸影像占比大于预设占比阈值的图像区域,此处不做唯一限定。The determining the reference image area according to the location of the face center may be an image area including a face image area larger than a preset area threshold, or an image area having a face image ratio greater than a preset percentage threshold. Do not make a single limit.
可见,本示例中,针对逆光拍摄等容易导致人脸图像曝光不足或者曝光过度的场景,电子装置能够确定包括人脸影像的参考图像区域的亮度均值,并根据该亮度均值修正AE初始配置,以拍摄得到曝光度更为适中的第二帧人脸图像,并根据该第二帧人脸图像识别用户身份,有利于提高电子装置人脸识别的成功率和准确度。It can be seen that, in this example, for scenes that are likely to cause under-exposed or overexposed facial images, such as backlight shooting, the electronic device can determine the brightness average of the reference image region including the face image, and correct the initial configuration of the AE according to the brightness average. The second frame face image with more moderate exposure is captured, and the user identity is recognized according to the second frame face image, which is beneficial to improving the success rate and accuracy of the face recognition of the electronic device.
在一个可能的示例中,所述若根据所述第一帧人脸图像识别出当前用户为户主用户之前,所述方法还包括:确定所述第一帧人脸图像中人脸中心点位置;根据所述人脸中心点位置确定人脸区域的参考亮度;检测到所述参考亮度在预设亮度区间。In a possible example, the method further includes: determining a face center point position in the first frame face image before the current user is the home owner user according to the first frame face image; Determining a reference brightness of the face region according to the face center point position; detecting that the reference brightness is in a preset brightness interval.
其中,所述预设亮度区间可以通过预存的模板人脸图像来确定,或者根据人脸识别成功记录中的人脸图像来确定,此处不做唯一限定。The preset brightness interval may be determined by using a pre-stored template face image, or determined according to the face image in the face recognition successful record, which is not limited herein.
可见,本示例中,电子装置在进行图像比对之前,可以先分析当前拍摄的第一帧人脸图像的人脸区域的参考亮度,从而确保该第一帧人脸图像的曝光度是适合进行图像比对的,有利于提高电子装置人脸识别的准确度。It can be seen that, in this example, before the image comparison is performed, the electronic device may first analyze the reference brightness of the face region of the first frame of the currently photographed face image, thereby ensuring that the exposure of the first frame face image is suitable. The images are compared to improve the accuracy of face recognition of electronic devices.
在本可能的示例中,所述方法还包括:所述电子装置检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;根据所述AE补偿配置和所述AE初始配置确定AE目标配置;通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。In this possible example, the method further includes: the electronic device detecting that the reference brightness is not in a preset brightness interval, determining an AE compensation configuration of the face region; according to the AE compensation configuration and the AE The initial configuration determines an AE target configuration; the camera obtains a second frame face image according to the AE target configuration by the camera; and if the current user is the home owner user according to the second frame face image, the face is executed Identify the preset action associated with the request.
其中,AE补偿是一种曝光控制方式,一般常见在±2-3EV左右,如果环境光源偏暗,即可增加曝光值(如调整为+1EV、+2EV)以突显画面的清晰度。曝光补偿就是有意识地变更摄像头自动演算出的“合适”曝光参数,让照片更明亮或者更昏暗的拍摄手法。拍摄者可以根据自己的想法调节照片的明暗程度,创造出独特的视觉效果等。一般来说摄像头会变更光圈值或者快门速度来进行曝光值的调节。Among them, AE compensation is an exposure control method, which is generally around ±2-3EV. If the ambient light source is dark, you can increase the exposure value (such as +1EV, +2EV) to highlight the sharpness of the picture. Exposure compensation is the conscious change to the "appropriate" exposure parameters that the camera automatically calculates to make the photos brighter or darker. The photographer can adjust the brightness of the photo according to his own ideas, creating unique visual effects and the like. Generally, the camera will change the aperture value or shutter speed to adjust the exposure value.
可见,本示例中,针对参考亮度不在预设亮度区间的情况,电子装置可以通过人脸区域的AE补偿配置确定AE目标配置,进而通过摄像头根据该AE目标配置拍摄用户得到第二帧人脸图像,最终根据该第二帧人脸图像识别用户身份,有利于提高电子装置人脸识别的准确度。It can be seen that, in this example, for the case where the reference brightness is not in the preset brightness interval, the electronic device may determine the AE target configuration through the AE compensation configuration of the face region, and then obtain the second frame face image by the camera according to the AE target configuration. Finally, identifying the user identity according to the second frame face image is beneficial to improving the accuracy of the face recognition of the electronic device.
在一个可能的示例中,所述人脸识别请求关联的预设操作至少包括以下任意一种:解 锁、支付、应用启动。In one possible example, the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
其中,所述解锁包括亮屏解锁或者熄屏解锁等,支付包括大额支付或者小额支付,应用启用对应的应用包括电子装置的系统应用或者第三方应用。The unlocking includes a bright screen unlocking or a screen blanking unlocking, and the payment includes a large amount of payment or a small amount of payment, and the application enabling the corresponding application includes a system application of the electronic device or a third party application.
可见,本示例中,电子装置通过人脸识别确定用户身份,进而完成预设操作,提高电子装置执行操作的安全性和准确度。It can be seen that, in this example, the electronic device determines the identity of the user through face recognition, thereby completing the preset operation, and improving the security and accuracy of the electronic device performing the operation.
与所述图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种人脸识别方法的流程示意图,应用于电子装置,如图所示,本人脸识别方法包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure, which is applied to an electronic device, as shown in the figure, the face recognition. Methods include:
S301,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光AE初始配置;S301. When the electronic device detects the face recognition request, the ambient light intensity is acquired by the light sensor during the process of turning on the camera, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
S302,所述电子装置通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;S302, the electronic device obtains a first frame face image by the user according to the AE initial configuration by the camera;
S303,所述电子装置若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。S303. The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
S304,所述电子装置若根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;S304, if the electronic device does not recognize that the current user is the primary user according to the first frame face image, determining a face center position in the first frame face image;
S305,所述电子装置根据所述人脸中心位置确定参考图像区域;S305. The electronic device determines a reference image region according to the location of the face center.
S306,所述电子装置确定所述参考图像区域的亮度均值;S306. The electronic device determines a brightness average value of the reference image region.
S307,所述电子装置根据所述亮度均值调整所述AE初始配置,得到AE目标配置;S307. The electronic device adjusts the initial configuration of the AE according to the brightness average value to obtain an AE target configuration.
S308,所述电子装置通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;S308. The electronic device obtains a second frame face image according to the AE target configuration by the camera.
S309,所述电子装置若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。S309. The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
此外,针对逆光拍摄等容易导致人脸图像曝光不足或者曝光过度的场景,电子装置能够确定包括人脸影像的参考图像区域的亮度均值,并根据该亮度均值修正AE初始配置,以拍摄得到曝光度更为适中的第二帧人脸图像,并根据该第二帧人脸图像识别用户身份,有利于提高电子装置人脸识别的成功率和准确度。In addition, the electronic device can determine the brightness average of the reference image area including the face image, and correct the AE initial configuration according to the brightness average to capture the exposure. The second frame of the face image is more moderate, and the user identity is recognized according to the second frame face image, which is beneficial to improving the success rate and accuracy of the face recognition of the electronic device.
与所述图2所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种人脸识别方法的流程示意图,应用于电子装置,如图所示,本人脸识别方法包括:4, FIG. 4 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure, which is applied to an electronic device, as shown in the figure, the face recognition. Methods include:
S401,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光AE初始配置;S401. When the electronic device detects the face recognition request, the ambient light intensity is acquired by the light sensor during the process of turning on the camera, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
S402,所述电子装置通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;S402, the electronic device obtains a first frame face image by the user according to the AE initial configuration by the camera;
S403,所述电子装置确定所述第一帧人脸图像中人脸中心点位置;S403, the electronic device determines a location of a face center point in the first frame face image;
S404,所述电子装置根据所述人脸中心点位置确定人脸区域的参考亮度;S404, the electronic device determines a reference brightness of the face region according to the location of the face center point;
S405,所述电子装置检测到所述参考亮度在预设亮度区间。S405. The electronic device detects that the reference brightness is in a preset brightness interval.
S406,所述电子装置若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。S406. The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
S407,所述电子装置检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;S407, the electronic device detects that the reference brightness is not in a preset brightness interval, and determines an AE compensation configuration of the face area;
S408,所述电子装置根据所述AE补偿配置和所述AE初始配置确定AE目标配置;S408. The electronic device determines an AE target configuration according to the AE compensation configuration and the AE initial configuration.
S409,所述电子装置通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;S409. The electronic device obtains a second frame face image according to the AE target configuration by the camera.
S4010,所述电子装置若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。S4010: The electronic device performs a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
此外,电子装置在进行图像比对之前,可以先分析当前拍摄的第一帧人脸图像的人脸区域的参考亮度,从而确保该第一帧人脸图像的曝光度是适合进行图像比对的,有利于提高电子装置人脸识别的准确度。In addition, before performing image comparison, the electronic device may first analyze the reference brightness of the face region of the first frame of the currently photographed face image, thereby ensuring that the exposure of the first frame face image is suitable for image comparison. It is beneficial to improve the accuracy of face recognition of electronic devices.
此外,针对参考亮度不在预设亮度区间的情况,电子装置可以通过人脸区域的AE补偿配置确定AE目标配置,进而通过摄像头根据该AE目标配置拍摄用户得到第二帧人脸图像,最终根据该第二帧人脸图像识别用户身份,有利于提高电子装置人脸识别的准确度。In addition, for the case where the reference brightness is not in the preset brightness interval, the electronic device may determine the AE target configuration by using the AE compensation configuration of the face region, and then the camera obtains the second frame face image according to the AE target configuration by the camera, and finally according to the The second frame of the face image identifies the user identity, which is beneficial to improve the accuracy of face recognition of the electronic device.
与所述图2、图3、图4所示的实施例一致的,请参阅图5,图5是本申请实施例提供的一种电子装置的结构示意图,如图所示,该电子装置包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行以下步骤的指令;Referring to FIG. 2, FIG. 3 and FIG. 4, FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising the steps of performing the following steps Instruction
检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光AE初始配置;When the face recognition request is detected, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;Obtaining, by the camera, the first frame face image according to the AE initial configuration shooting user;
若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。If the current user is identified as the primary user according to the first frame face image, the preset operation associated with the face recognition request is performed.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
在一个可能的示例中,所述程序还包括用于执行以下操作的指令:若根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;以及用于根据所述人脸中心位置确定参考图像区域;以及用于确定所述参考图像区域的亮度均值;以及用于根据所述亮度均值调整所述AE初始配置,得到AE目标配置;以及用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;以及用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。In one possible example, the program further includes instructions for: determining, if the current user is the primary user, based on the first frame of the face image, determining the person in the first frame of the face image a face center position; and a reference image region for determining a reference image region according to the face center position; and for determining a brightness mean value of the reference image region; and for adjusting the AE initial configuration according to the brightness mean value to obtain an AE target And configured to obtain a second frame face image by the camera according to the AE target configuration; and to execute the person if the current user is the home user according to the second frame face image The face recognition request is associated with a preset operation.
在一个可能的示例中,所述程序还包括用于执行以下操作的指令:在根据所述第一帧人脸图像识别出当前用户为户主用户之前,确定所述第一帧人脸图像中人脸中心点位置;以及用于根据所述人脸中心点位置确定人脸区域的参考亮度;以及用于检测到所述参考亮度在预设亮度区间。In one possible example, the program further includes instructions for: determining a person in the first frame of the face image before identifying the current user as the primary user according to the first frame face image a face center point position; and a reference brightness for determining a face area according to the face center point position; and for detecting that the reference brightness is within a preset brightness interval.
在一个可能的示例中,所述程序还包括用于执行以下操作的指令:检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;以及用于根据所述AE补偿配置和所述AE初始配置确定AE目标配置;以及用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;以及用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。In one possible example, the program further includes instructions for detecting that the reference brightness is not in a preset brightness interval, determining an AE compensation configuration of the face region, and for using the AE a compensation configuration and the AE initial configuration determining an AE target configuration; and a second frame face image for capturing a user according to the AE target configuration by the camera; and for identifying a face image according to the second frame The current user is the primary user, and the preset operation associated with the face recognition request is performed.
在一个可能的示例中,所述人脸识别请求关联的预设操作至少包括以下任意一种:解锁、支付、应用启动。In one possible example, the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
与上述实施例一致的,图6是本申请实施例提供的一种人脸识别装置的功能单元组成框图,该人脸识别装置600应用于电子装置,包括获取单元601、确定单元602、拍摄单元603和执行单元604,其中,FIG. 6 is a block diagram of a functional unit of a face recognition device according to an embodiment of the present disclosure. The face recognition device 600 is applied to an electronic device, including an acquisition unit 601, a determination unit 602, and a shooting unit. 603 and an execution unit 604, wherein
所述获取单元601,用于检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强;The acquiring unit 601 is configured to acquire an ambient light intensity by using a light sensor during the process of turning on the camera when detecting the face recognition request;
所述确定单元602,用于根据所述环境光强确定自动曝光AE初始配置;The determining unit 602 is configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
所述拍摄单元603,用于通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;The photographing unit 603 is configured to obtain, by the camera, a first frame face image according to the AE initial configuration shooting user;
所述执行单元604,用于若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit 604 is configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
可以看出,本申请实施例中,电子装置检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据环境光强确定自动曝光AE初始配置,其次,通过摄像头根据AE初始配置拍摄用户得到第一帧人脸图像,最后,若根据第一帧人脸图像识别出当前用户为户主用户,执行人脸识别请求关联的预设操作。由于摄像头开启过程需要几百毫秒,光线传感器采集环境光强仅需要几十毫秒,故而在开启摄像头过程中并行光线传感器采集环境光强过程,可以整体减少光线传感器处理时长,提高人脸识别速度。It can be seen that, in the embodiment of the present application, when the electronic device detects the face recognition request, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, the initial configuration of the automatic exposure AE is determined according to the ambient light intensity, and secondly, the camera is passed. The user obtains the first frame face image according to the AE initial configuration shooting. Finally, if the current user is the home owner user according to the first frame face image, the preset operation associated with the face recognition request is performed. Since the camera opening process takes several hundred milliseconds, the light sensor only needs tens of milliseconds to collect the ambient light intensity. Therefore, when the parallel light sensor collects the ambient light intensity during the process of turning on the camera, the processing time of the light sensor can be reduced overall, and the face recognition speed can be improved.
在一个可能的示例中,所述确定单元602还用于:若根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;以及用于根据所述人脸中心位置确定参考图像区域;以及用于确定所述参考图像区域的亮度均值;In a possible example, the determining unit 602 is further configured to determine a face center position in the first frame face image if the current user is not the home owner user according to the first frame face image; And determining a reference image region according to the face center position; and determining a brightness average of the reference image region;
所述人脸识别装置600还包括调整单元,所述调整单元,用于根据所述亮度均值调整所述AE初始配置,得到AE目标配置;The face recognition device 600 further includes an adjustment unit, configured to adjust the AE initial configuration according to the brightness mean value to obtain an AE target configuration;
所述拍摄单元603,还用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;The photographing unit 603 is further configured to obtain a second frame face image by the camera according to the AE target configuration by the camera;
所述执行单元604,还用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit 604 is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
在一个可能的示例中,所述确定单元602在所述执行单元604根据所述第一帧人脸图像识别出当前用户为户主用户之前,还用于:确定所述第一帧人脸图像中人脸中心点位置;以及用于根据所述人脸中心点位置确定人脸区域的参考亮度;In a possible example, the determining unit 602 is further configured to determine, in the first frame, the face image, before the executing unit 604 identifies that the current user is the primary user according to the first frame face image. a face center point position; and a reference brightness for determining a face area according to the face center point position;
所述人脸识别装置600还包括检测单元,所述检测单元,用于检测到所述参考亮度在预设亮度区间。The face recognition device 600 further includes a detecting unit, configured to detect that the reference brightness is in a preset brightness interval.
在本可能的示例中,所述检测单元,还用于检测到所述参考亮度不在预设亮度区间;In the possible example, the detecting unit is further configured to detect that the reference brightness is not in a preset brightness interval;
所述确定单元602,还用于确定所述人脸区域的AE补偿配置;以及用于根据所述AE 补偿配置和所述AE初始配置确定AE目标配置;The determining unit 602 is further configured to determine an AE compensation configuration of the face region; and configured to determine an AE target configuration according to the AE compensation configuration and the AE initial configuration;
所述拍摄单元603,还用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;The photographing unit 603 is further configured to obtain a second frame face image by the camera according to the AE target configuration by the camera;
所述执行单元604,还用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit 604 is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
在一个可能的示例中,所述人脸识别请求关联的预设操作至少包括以下任意一种:解锁、支付、应用启动。In one possible example, the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
需要注意的是,本申请装置实施例所描述的电子装置是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组件。It should be noted that the electronic device described in the device embodiment of the present application is presented in the form of a functional unit. The term "unit" as used herein shall be understood to mean the broadest possible meaning, and the object for implementing the functions described for each "unit" may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware. A processor (shared, dedicated or chipset) and memory of the program, combinatorial logic, and/or other suitable components that perform the functions described above.
其中,所述获取单元601可以是接收器,所述确定单元602和执行单元604可以是处理器,所述拍摄单元603可以是摄像头。The obtaining unit 601 may be a receiver, the determining unit 602 and the executing unit 604 may be processors, and the photographing unit 603 may be a camera.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如所述方法实施例中记载的任一方法的部分或全部步骤,所述计算机包括电子装置。The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to execute part or all of any of the methods described in the method embodiment. In the step, the computer includes an electronic device.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如所述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括电子装置。The embodiment of the present application further provides a computer program product, comprising: a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute as described in the method embodiment Part or all of the steps of either method. The computer program product can be a software installation package, the computer including an electronic device.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present application is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present application. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在所述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the embodiment, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。所述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出 来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present application. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable memory, and the memory can include: a flash drive , read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or CD.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been described in detail above. The principles and implementations of the present application are described in the specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present application. A person skilled in the art will have a change in the specific embodiments and the scope of the application according to the idea of the present application. In summary, the content of the present specification should not be construed as limiting the present application.

Claims (20)

  1. 一种电子装置,其特征在于,包括处理器、光线传感器、摄像头,所述光线传感器、所述摄像头和所述处理器耦合,其中,An electronic device, comprising: a processor, a light sensor, a camera, the light sensor, the camera and the processor coupled, wherein
    所述处理器,用于检测到人脸识别请求时,开启所述摄像头;The processor, when detecting a face recognition request, turning on the camera;
    所述光线传感器,用于在所述摄像头的开启过程中,获取环境光强;The light sensor is configured to acquire an ambient light intensity during the opening process of the camera;
    所述处理器,还用于根据所述环境光强确定自动曝光AE初始配置;The processor is further configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
    所述摄像头,用于根据所述AE初始配置拍摄用户得到第一帧人脸图像;The camera is configured to obtain a first frame face image according to the AE initial configuration shooting user;
    所述处理器,还用于根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor is further configured to: according to the first frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  2. 根据权利要求1所述的电子装置,其特征在于,所述处理器还用于:根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;以及用于根据所述人脸中心位置确定参考图像区域;以及用于确定所述参考图像区域的亮度均值;以及用于根据所述亮度均值调整所述AE初始配置,得到AE目标配置;The electronic device according to claim 1, wherein the processor is further configured to: determine, according to the first frame, that the current user is the primary user, determine the first frame of the face image a face center position; and a reference image region for determining a face image position according to the face center position; and for determining a brightness mean value of the reference image region; and for adjusting the AE initial configuration according to the brightness mean value to obtain an AE Target configuration
    所述摄像头,还用于根据所述AE目标配置拍摄用户得到第二帧人脸图像;The camera is further configured to: according to the AE target configuration, the user obtains a second frame face image;
    所述处理器,还用于根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  3. 根据权利要求1所述的电子装置,其特征在于,所述处理器根据所述第一帧人脸图像识别出当前用户为户主用户之前,还用于确定所述第一帧人脸图像中人脸中心点位置;以及用于根据所述人脸中心点位置确定人脸区域的参考亮度;以及用于检测到所述参考亮度在预设亮度区间。The electronic device according to claim 1, wherein the processor is further configured to determine a person in the first frame of the face image before the current user is the primary user according to the first frame face image. a face center point position; and a reference brightness for determining a face area according to the face center point position; and for detecting that the reference brightness is within a preset brightness interval.
  4. 根据权利要求3所述的电子装置,其特征在于,所述处理器还用于:检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;以及用于根据所述AE补偿配置和所述AE初始配置确定AE目标配置;The electronic device according to claim 3, wherein the processor is further configured to: detect that the reference brightness is not in a preset brightness interval, determine an AE compensation configuration of the face region; The AE compensation configuration and the AE initial configuration determine an AE target configuration;
    所述摄像头,还用于根据所述AE目标配置拍摄用户得到第二帧人脸图像;The camera is further configured to: according to the AE target configuration, the user obtains a second frame face image;
    所述处理器,还用于根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The processor is further configured to: according to the second frame face image, identify that the current user is a primary user, and perform a preset operation associated with the face recognition request.
  5. 根据权利要求1-4任一项所述的电子装置,其特征在于,所述人脸识别请求关联的预设操作至少包括以下任意一种:解锁、支付、应用启动。The electronic device according to any one of claims 1 to 4, wherein the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  6. 一种人脸识别方法,其特征在于,包括:A face recognition method, comprising:
    检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强,根据所述环境光强确定自动曝光AE初始配置;When the face recognition request is detected, in the process of turning on the camera, the ambient light intensity is acquired by the light sensor, and the initial configuration of the automatic exposure AE is determined according to the ambient light intensity;
    通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;Obtaining, by the camera, the first frame face image according to the AE initial configuration shooting user;
    若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。If the current user is identified as the primary user according to the first frame face image, the preset operation associated with the face recognition request is performed.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6 wherein the method further comprises:
    若根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;Determining a face center position in the first frame face image according to the first frame face image not recognizing that the current user is the head user;
    根据所述人脸中心位置确定参考图像区域;Determining a reference image area according to the face center position;
    确定所述参考图像区域的亮度均值;Determining a brightness average of the reference image area;
    根据所述亮度均值调整所述AE初始配置,得到AE目标配置;Adjusting the initial configuration of the AE according to the brightness average value to obtain an AE target configuration;
    通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;Obtaining a second frame face image by the camera according to the AE target configuration;
    若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联 的预设操作。If the current user is identified as the primary user according to the second frame face image, the preset operation associated with the face recognition request is performed.
  8. 根据权利要求7所述的方法,其特征在于,所述参考图像区域包括以下任意一种:人脸影像面积大于预设面积阈值的图像区域、人脸影像占比大于预设占比阈值的图像区域。The method according to claim 7, wherein the reference image area comprises any one of the following: an image area whose face image area is larger than a preset area threshold, and an image whose face image ratio is larger than a preset percentage threshold. region.
  9. 根据权利要求6所述的方法,其特征在于,所述若根据所述第一帧人脸图像识别出当前用户为户主用户之前,所述方法还包括:The method according to claim 6, wherein the method further comprises: before the current user is the primary user, according to the first frame of the face image, the method further comprises:
    确定所述第一帧人脸图像中人脸中心点位置;Determining a face center point position in the first frame face image;
    根据所述人脸中心点位置确定人脸区域的参考亮度;Determining a reference brightness of the face region according to the location of the face center point;
    检测到所述参考亮度在预设亮度区间。The reference brightness is detected to be within a preset brightness interval.
  10. 根据权利要求9所述的方法,其特征在于,所述预设亮度区间是根据预存的模板人脸图像来确定的,或者是根据人脸识别成功记录中的人脸图像来确定的。The method according to claim 9, wherein the preset brightness interval is determined according to a pre-stored template face image, or is determined according to a face image in a face recognition successful record.
  11. 根据权利要求9或10所述的方法,其特征在于,所述方法还包括:The method according to claim 9 or 10, wherein the method further comprises:
    检测到所述参考亮度不在预设亮度区间,确定所述人脸区域的AE补偿配置;Detecting that the reference brightness is not in a preset brightness interval, determining an AE compensation configuration of the face area;
    根据所述AE补偿配置和所述AE初始配置确定AE目标配置;Determining an AE target configuration according to the AE compensation configuration and the AE initial configuration;
    通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;Obtaining a second frame face image by the camera according to the AE target configuration;
    若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。If the current user is the home owner user according to the second frame face image, the preset operation associated with the face recognition request is performed.
  12. 根据权利要求6-11任一项所述的方法,其特征在于,所述人脸识别请求关联的预设操作至少包括以下任意一种:解锁、支付、应用启动。The method according to any one of claims 6 to 11, wherein the preset operation associated with the face recognition request includes at least one of the following: unlocking, paying, and application launching.
  13. 一种人脸识别装置,其特征在于,包括获取单元、确定单元、拍摄单元和执行单元,其中,A face recognition device, comprising: an acquisition unit, a determination unit, a photographing unit, and an execution unit, wherein
    所述获取单元,用于检测到人脸识别请求时,在开启摄像头的过程中,通过光线传感器获取环境光强;The acquiring unit, when detecting the face recognition request, acquires the ambient light intensity through the light sensor during the process of turning on the camera;
    所述确定单元,用于根据所述环境光强确定自动曝光AE初始配置;The determining unit is configured to determine an initial configuration of the automatic exposure AE according to the ambient light intensity;
    所述拍摄单元,用于通过所述摄像头根据所述AE初始配置拍摄用户得到第一帧人脸图像;The photographing unit is configured to obtain a first frame face image by the user according to the AE initial configuration by the camera;
    所述执行单元,用于若根据所述第一帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit is configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the first frame face image.
  14. 根据权利要求13所述的装置,其特征在于,所述确定单元还用于:若根据所述第一帧人脸图像未识别出当前用户为户主用户,确定所述第一帧人脸图像中人脸中心位置;以及用于根据所述人脸中心位置确定参考图像区域;以及用于确定所述参考图像区域的亮度均值;The device according to claim 13, wherein the determining unit is further configured to: if the current user is not the home user according to the first frame, and determine the first frame of the face image a face center position; and a reference image area for determining a center position of the face; and for determining a brightness average of the reference image area;
    所述人脸识别装置还包括调整单元,所述调整单元,用于根据所述亮度均值调整所述AE初始配置,得到AE目标配置;The face recognition device further includes an adjustment unit, configured to adjust the AE initial configuration according to the brightness mean value to obtain an AE target configuration;
    所述拍摄单元,还用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;The photographing unit is further configured to obtain a second frame face image by the camera according to the AE target configuration shooting by the camera;
    所述执行单元,还用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  15. 根据权利要求14所述的装置,其特征在于,所述参考图像区域包括以下任意一种:人脸影像面积大于预设面积阈值的图像区域、人脸影像占比大于预设占比阈值的图像区域。The device according to claim 14, wherein the reference image area comprises any one of the following: an image area whose face image area is larger than a preset area threshold, and an image whose face image ratio is larger than a preset percentage threshold. region.
  16. 根据权利要求13所述的装置,其特征在于,所述确定单元在所述执行单元根据所述第一帧人脸图像识别出当前用户为户主用户之前,还用于:确定所述第一帧人脸图像中人脸中心点位置;以及用于根据所述人脸中心点位置确定人脸区域的参考亮度;The device according to claim 13, wherein the determining unit is further configured to: determine the first frame before the performing unit identifies that the current user is the primary user according to the first frame face image a face center point position in the face image; and a reference brightness for determining a face area according to the face center point position;
    所述人脸识别装置还包括检测单元,所述检测单元,用于检测到所述参考亮度在预设亮度区间。The face recognition device further includes a detecting unit, configured to detect that the reference brightness is in a preset brightness interval.
  17. 根据权利要求16所述的装置,其特征在于,所述预设亮度区间是根据预存的模板人脸图像来确定的,或者是根据人脸识别成功记录中的人脸图像来确定的。The apparatus according to claim 16, wherein the preset brightness interval is determined according to a pre-stored template face image, or is determined according to a face image in a face recognition successful record.
  18. 根据权利要求16或17所述的装置,其特征在于,所述检测单元,还用于检测到所述参考亮度不在预设亮度区间;The device according to claim 16 or 17, wherein the detecting unit is further configured to detect that the reference brightness is not in a preset brightness interval;
    所述确定单元,还用于确定所述人脸区域的AE补偿配置;以及用于根据所述AE补偿配置和所述AE初始配置确定AE目标配置;The determining unit is further configured to determine an AE compensation configuration of the face region; and configured to determine an AE target configuration according to the AE compensation configuration and the AE initial configuration;
    所述拍摄单元,还用于通过所述摄像头根据所述AE目标配置拍摄用户得到第二帧人脸图像;The photographing unit is further configured to obtain a second frame face image by the camera according to the AE target configuration shooting by the camera;
    所述执行单元,还用于若根据所述第二帧人脸图像识别出当前用户为户主用户,执行所述人脸识别请求关联的预设操作。The executing unit is further configured to perform a preset operation associated with the face recognition request if the current user is the home owner user according to the second frame face image.
  19. 一种电子装置,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求6-12任一项所述的方法中的步骤的指令。An electronic device, comprising: a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, The program comprises instructions for performing the steps in the method of any of claims 6-12.
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求6-12任一项所述的方法,所述计算机包括电子装置。A computer readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method of any one of claims 6-12, the computer comprising an electronic Device.
PCT/CN2019/072485 2018-01-31 2019-01-21 Electronic device, human face recognition method, and relevant product WO2019149099A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810094019.5 2018-01-31
CN201810094019.5A CN108288044B (en) 2018-01-31 2018-01-31 Electronic device, face recognition method and related product

Publications (1)

Publication Number Publication Date
WO2019149099A1 true WO2019149099A1 (en) 2019-08-08

Family

ID=62836199

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/072485 WO2019149099A1 (en) 2018-01-31 2019-01-21 Electronic device, human face recognition method, and relevant product

Country Status (2)

Country Link
CN (1) CN108288044B (en)
WO (1) WO2019149099A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110687806A (en) * 2019-09-30 2020-01-14 万翼科技有限公司 Equipment control method and related device
CN111080543A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN113008404A (en) * 2021-02-22 2021-06-22 深圳市商汤科技有限公司 Temperature measuring method and device, electronic device and storage medium
CN113128921A (en) * 2019-12-31 2021-07-16 富华科精密工业(深圳)有限公司 Material management method, electronic device and computer readable storage medium
CN114973487A (en) * 2022-05-13 2022-08-30 杭州魔点科技有限公司 Face detection method, system, device and medium based on dynamic buffing
CN117714890A (en) * 2024-02-18 2024-03-15 荣耀终端有限公司 Exposure compensation method, electronic equipment and storage medium
CN117714890B (en) * 2024-02-18 2024-05-31 荣耀终端有限公司 Exposure compensation method, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108288044B (en) * 2018-01-31 2020-11-20 Oppo广东移动通信有限公司 Electronic device, face recognition method and related product
CN112446252A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Image recognition method and electronic equipment
CN116935467A (en) * 2021-08-12 2023-10-24 荣耀终端有限公司 Data processing method and device
CN117292418A (en) * 2022-03-25 2023-12-26 荣耀终端有限公司 Face recognition method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883106A (en) * 2012-10-18 2013-01-16 信利光电(汕尾)有限公司 Method of applying light sensor on camera module and terminal equipment
CN105407276A (en) * 2015-11-03 2016-03-16 北京旷视科技有限公司 Photographing method and equipment
CN105719234A (en) * 2016-01-26 2016-06-29 厦门美图之家科技有限公司 Automatic gloss removing method and system for face area and shooting terminal
CN107194379A (en) * 2017-06-28 2017-09-22 南京甄视智能科技有限公司 It can adapt to the recognition of face checking terminal and its method of work of different application scene
CN107220621A (en) * 2017-05-27 2017-09-29 北京小米移动软件有限公司 Terminal carries out the method and device of recognition of face
CN108288044A (en) * 2018-01-31 2018-07-17 广东欧珀移动通信有限公司 Electronic device, face identification method and Related product

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393598A (en) * 2007-09-21 2009-03-25 希姆通信息技术(上海)有限公司 Starting and unblock method decided by human face identification by utilizing mobile phone cam
CN102170730A (en) * 2011-04-12 2011-08-31 惠州Tcl移动通信有限公司 Mobile terminal and flash lamp control method thereof
US9160912B2 (en) * 2012-06-08 2015-10-13 Apple Inc. System and method for automatic image capture control in digital imaging
WO2013189062A1 (en) * 2012-06-21 2013-12-27 Huawei Device Co., Ltd. Color control method and communication apparatus
CN103167133B (en) * 2012-08-23 2014-11-05 深圳市金立通信设备有限公司 Mobile phone dynamic camera flash lamp luminance compensation system and method
CN102831408A (en) * 2012-08-29 2012-12-19 华南理工大学 Human face recognition method
CN102970482A (en) * 2012-11-19 2013-03-13 广东欧珀移动通信有限公司 Method for automatically starting pinkeye preventing model in photographing and photographing equipment thereof
CN105208293B (en) * 2014-06-16 2020-03-27 杭州海康威视数字技术股份有限公司 Automatic exposure control method and device for digital camera
CN104268534B (en) * 2014-10-10 2017-06-06 扬州大学 The intelligent box control system and its control method of trigger-type video monitoring
CN104735362B (en) * 2015-03-11 2017-11-07 广东欧珀移动通信有限公司 Photographic method and device
CN105208360B (en) * 2015-09-23 2017-07-25 青岛海信移动通信技术股份有限公司 Image preview method, device and the terminal of a kind of intelligent terminal
CN105245775B (en) * 2015-09-25 2018-04-24 小米科技有限责任公司 camera imaging method, mobile terminal and device
CN107563168A (en) * 2017-09-05 2018-01-09 广东欧珀移动通信有限公司 Unlocking method, device and the mobile terminal of mobile terminal
CN107609514B (en) * 2017-09-12 2021-08-06 Oppo广东移动通信有限公司 Face recognition method and related product
CN107592473A (en) * 2017-10-31 2018-01-16 广东欧珀移动通信有限公司 Exposure parameter method of adjustment, device, electronic equipment and readable storage medium storing program for executing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883106A (en) * 2012-10-18 2013-01-16 信利光电(汕尾)有限公司 Method of applying light sensor on camera module and terminal equipment
CN105407276A (en) * 2015-11-03 2016-03-16 北京旷视科技有限公司 Photographing method and equipment
CN105719234A (en) * 2016-01-26 2016-06-29 厦门美图之家科技有限公司 Automatic gloss removing method and system for face area and shooting terminal
CN107220621A (en) * 2017-05-27 2017-09-29 北京小米移动软件有限公司 Terminal carries out the method and device of recognition of face
CN107194379A (en) * 2017-06-28 2017-09-22 南京甄视智能科技有限公司 It can adapt to the recognition of face checking terminal and its method of work of different application scene
CN108288044A (en) * 2018-01-31 2018-07-17 广东欧珀移动通信有限公司 Electronic device, face identification method and Related product

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110687806A (en) * 2019-09-30 2020-01-14 万翼科技有限公司 Equipment control method and related device
CN110687806B (en) * 2019-09-30 2023-04-07 万翼科技有限公司 Equipment control method and related device
CN111080543A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN111080543B (en) * 2019-12-09 2024-03-22 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN113128921A (en) * 2019-12-31 2021-07-16 富华科精密工业(深圳)有限公司 Material management method, electronic device and computer readable storage medium
CN113008404A (en) * 2021-02-22 2021-06-22 深圳市商汤科技有限公司 Temperature measuring method and device, electronic device and storage medium
CN114973487A (en) * 2022-05-13 2022-08-30 杭州魔点科技有限公司 Face detection method, system, device and medium based on dynamic buffing
CN114973487B (en) * 2022-05-13 2024-04-30 杭州魔点科技有限公司 Face detection method, system, device and medium based on dynamic skin grinding
CN117714890A (en) * 2024-02-18 2024-03-15 荣耀终端有限公司 Exposure compensation method, electronic equipment and storage medium
CN117714890B (en) * 2024-02-18 2024-05-31 荣耀终端有限公司 Exposure compensation method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108288044A (en) 2018-07-17
CN108288044B (en) 2020-11-20

Similar Documents

Publication Publication Date Title
WO2019149099A1 (en) Electronic device, human face recognition method, and relevant product
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
CN109167931B (en) Image processing method, device, storage medium and mobile terminal
EP3174285A1 (en) Camera shooting angle adjusting method and apparatus, computer program and recording medium
KR20200019728A (en) Shooting mobile terminal
KR102263537B1 (en) Electronic device and control method of the same
WO2015081556A1 (en) Photographing method for dual-camera device and dual-camera device
WO2017020382A1 (en) Photography control method, photography control device and terminal
CN109194882A (en) Image processing method, device, electronic equipment and storage medium
CN107395957B (en) Photographing method and device, storage medium and electronic equipment
CN111917980B (en) Photographing control method and device, storage medium and electronic equipment
CN110569822A (en) image processing method and device, electronic equipment and storage medium
US9888176B2 (en) Video apparatus and photography method thereof
CN109361853B (en) Image processing method, image processing device, electronic equipment and storage medium
CN108040204B (en) Image shooting method and device based on multiple cameras and storage medium
CN104935698A (en) Photographing method of smart terminal, photographing device and smart phone
EP3496391A1 (en) Method and device for capturing image and storage medium
CN110708463B (en) Focusing method, focusing device, storage medium and electronic equipment
CN106791451B (en) Photographing method of intelligent terminal
CN106657798A (en) Photographing method for intelligent terminal
CN108259767B (en) Image processing method, image processing device, storage medium and electronic equipment
CN107820025B (en) Method and device for photographing processing
CN111416936B (en) Image processing method, image processing device, electronic equipment and storage medium
CN108830194B (en) Biological feature recognition method and device
WO2023071933A1 (en) Camera photographing parameter adjustment method and apparatus and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19747650

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19747650

Country of ref document: EP

Kind code of ref document: A1