WO2019134094A1 - Electronic device and facial recognition method therefor - Google Patents

Electronic device and facial recognition method therefor Download PDF

Info

Publication number
WO2019134094A1
WO2019134094A1 PCT/CN2018/071361 CN2018071361W WO2019134094A1 WO 2019134094 A1 WO2019134094 A1 WO 2019134094A1 CN 2018071361 W CN2018071361 W CN 2018071361W WO 2019134094 A1 WO2019134094 A1 WO 2019134094A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
screen
fill light
preset threshold
facial recognition
Prior art date
Application number
PCT/CN2018/071361
Other languages
French (fr)
Chinese (zh)
Inventor
田浦延
Original Assignee
深圳阜时科技有限公司
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 深圳阜时科技有限公司 filed Critical 深圳阜时科技有限公司
Priority to CN201880000001.2A priority Critical patent/CN110226169A/en
Priority to PCT/CN2018/071361 priority patent/WO2019134094A1/en
Publication of WO2019134094A1 publication Critical patent/WO2019134094A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the invention relates to an electronic device and a face recognition method thereof.
  • buttons and fingerprint recognition modules cannot be set because the space is limited. Since the fingerprint recognition module cannot be set, in order to realize the identification, the industry has proposed to use the front camera on the front of the mobile phone to obtain facial information and perform facial recognition.
  • embodiments of the present invention aim to at least solve one of the technical problems existing in the prior art. To this end, embodiments of the present invention need to provide an electronic device and a face recognition method thereof.
  • the invention provides a face recognition method for an electronic device, comprising the following steps:
  • control electronic device when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light
  • S4 Match the collected facial image with a preset facial image template to determine whether the identity of the object in front is legal.
  • the electronic device when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
  • the step S1 further comprises: performing step S3 when the current ambient light intensity is greater than a preset threshold.
  • the fill light in step S2 is performed simultaneously with the acquisition of the facial image in step S3.
  • step S2 when the current ambient light intensity is less than or equal to the preset threshold, the fill light device on the front side of the control electronic device is turned on to perform front fill light.
  • one or more of the brightness, color temperature, and color of the fill light device are further adjusted when the fill light device on the front of the control electronics is turned on.
  • the fill light device on the front side of the electronic device includes a fill light source disposed at the top end of the electronic device.
  • step S2 when the current ambient light intensity is less than or equal to the preset threshold, the display screen of the electronic device is adjusted to the maximum brightness to perform front fill light.
  • the fill light source of the front end of the control electronic device is turned on, so that The supplemental light source performs front fill light together with the display screen.
  • the step S1 further includes: determining a current working state of the electronic device; determining whether face recognition is required according to the current working state of the electronic device.
  • the current working state of the electronic device includes a state of the screen, a bright screen unlocked state, and a bright screen unlocked state; and determining, according to the current working state of the electronic device, whether facial recognition is required:
  • the screen wake-up operation includes: picking up the electronic device, touching the display of the electronic device, approaching the front preset range of the electronic device, and pressing one or more of the electronic device function buttons.
  • An embodiment of the present invention provides an electronic device including an image sensor, a fill light device, an ambient light sensor, and a processor.
  • the processor is configured to: when the electronic device needs to perform face recognition, determine that the ambient light sensor collects Whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to a preset threshold, controlling the fill light device to perform front fill light; and controlling the image sensor to collect a face image of an object in front of the electronic device Matching the acquired facial image with a preset facial image template to determine whether the identity of the object in front is legal.
  • the electronic device when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
  • the processor is further configured to directly control the image sensor to acquire a facial image of an object in front of the electronic device when the current ambient light intensity is greater than a preset threshold.
  • the image sensor is located at a front end of the electronic device.
  • the fill light device includes a fill light source located at a top end of the electronic device.
  • the fill light source is a flexible light.
  • the processor is further configured to: when the current ambient light intensity is less than or equal to a preset threshold, control the fill light source to be turned on to perform front fill light.
  • one or more of the brightness, color temperature, and color of the fill light source are further adjusted when the fill light source is turned on.
  • the processor is further configured to: when the current ambient light intensity is less than or equal to the pre- When the threshold is set, the display is adjusted to the maximum brightness for front fill.
  • the processor is further configured to: if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or Equal to the preset threshold, the fill light source is controlled to be turned on.
  • the processor is further configured to: determine a current working state of the electronic device, and determine whether face recognition is required according to a current working state of the electronic device.
  • the current working state of the electronic device includes a screen state, a bright screen unlocked state, and a bright screen unlocked state; the processor is further configured to:
  • the screen wake-up operation includes: picking up the electronic device, touching the display of the electronic device, approaching the front preset range of the electronic device, and pressing one or more of the electronic device function buttons.
  • FIG. 1 is a schematic flow chart of a face recognition method according to a first embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a face recognition method according to a second embodiment of the present invention.
  • FIG. 3 is a schematic diagram of functional modules of a mobile terminal according to an embodiment of the present invention.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining “first” or “second” may include one or more of the described features either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality” is two or more unless specifically and specifically defined otherwise.
  • Contact or “touch” includes direct or indirect contact.
  • connection In the description of the present invention, it should be noted that the terms “installation”, “connected”, and “connected” are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or integrally connected; may be mechanically connected, or may be electrically connected or may communicate with each other; may be directly connected or indirectly connected through an intermediate medium, may be internal communication of two elements or interaction of two elements relationship. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
  • the facial recognition method refers to collecting facial information of an object through a camera, and matching the collected facial information with the registered facial template. If the matching is successful, the identity of the object is determined to be legal, and if the matching fails, the identity of the object is determined to be illegal.
  • the objects herein include, for example, human bodies or other living organisms.
  • the face information includes, for example, 2D image information or 3D image information.
  • facial recognition is performed based on 2D image information, it can be realized by using an existing camera, and it is not necessary to additionally provide an imaging device.
  • the camera can capture clear facial images under normal lighting conditions, and when the illumination environment is poor, it is impossible to collect clear facial images, thereby affecting facial recognition effects, for example, because the collected facial images are blurred. Long recognition process, even face recognition is not possible. In this way, the user experience is also poor.
  • Fig. 1 is a flow chart showing a face recognition method according to a first embodiment of the present invention.
  • the face recognition method includes the following steps:
  • step S1 when the electronic device needs to perform facial recognition, determine whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to the preset threshold, step S2 is performed, when the current ambient light intensity is greater than a preset threshold.
  • step S3 when the electronic device needs to perform facial recognition, determine whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to the preset threshold, step S2 is performed, when the current ambient light intensity is greater than a preset threshold.
  • the facial recognition method operates on an electronic device.
  • the electronic device is, for example, but not limited to, a suitable type of electronic product such as a consumer electronic product, a home-based electronic product, a vehicle-mounted electronic product, or a financial terminal product.
  • consumer electronic products such as mobile phones, tablets, notebook computers, desktop monitors, computer integrated machines.
  • Home-based electronic products such as smart door locks, TVs, refrigerators, wearable devices, etc.
  • Vehicle-mounted electronic products such as car navigation systems, car DVDs, etc.
  • Financial terminal products such as ATM machines, terminals for self-service business, etc.
  • the front side of the electronic device is provided with a corresponding sensing device, such as an ambient light sensor, for collecting the light intensity of the surrounding environment of the electronic device when the electronic device needs facial recognition.
  • a sensing device such as an ambient light sensor
  • the collected light intensity is strong; when the surrounding environment of the electronic device is dark, the collected light intensity is weak.
  • the illumination intensity of the surrounding environment of the electronic device can also be collected by other sensing devices, such as a camera disposed on the front of the electronic device.
  • a threshold value that is, a preset threshold value, is preset. If the ambient light intensity is greater than the preset threshold, it indicates that the electronic device can collect a clear facial image in the current environment to implement facial recognition; if the ambient light intensity is less than or equal to the preset threshold, the electronic device is in the current environment. Unable to capture a clear facial image, causing facial recognition to fail.
  • control electronic device when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light
  • the control electronic device When the current ambient light intensity is collected, and the current ambient light intensity is less than or equal to the preset threshold, the control electronic device performs front fill light, so that the illumination intensity under the environment of the electronic device is greater than a preset threshold to implement facial recognition.
  • the image sensor on the front side of the electronic device is, for example, a CCD or a CMOS image sensor, and the front image of the front object can be acquired by using the front camera provided on the front side of the existing electronic device.
  • S4 Match the collected facial image with a preset facial image template to determine whether the identity of the object in front is legal.
  • Image matching for example, adopts facial feature extraction, first extracts corresponding facial features, such as eyes, nose, eyebrows, lips, chin, etc. from the 2D image, and then extracts the extracted facial features and corresponding faces in the 2D image template. The features are compared. If the comparison is consistent, the matching is successful, and the identity of the object in front is legal. If the comparison is inconsistent, the matching fails, and the identity of the object in front is invalid.
  • the electronic device when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
  • the above steps S2 and S3 are performed simultaneously, that is, while the control electronic device performs front fill light, the image sensor on the front side of the electronic device is controlled to collect the facial image. It should be noted that, at the same time, it does not require strict consistency in time, but also has a sequence of time. It's just that the time difference is short, basically negligible, giving people the feeling that the two are at the same time.
  • step S2 further includes: controlling the fill light device on the front side of the electronic device to be turned on when the current ambient light intensity is less than or equal to the preset threshold. Further, one or more parameters of the brightness, color temperature or color of the light-filling device are also adjusted while controlling the light-filling device on the front side of the electronic device.
  • the light-filling device on the front surface of the electronic device may be a display screen of the electronic device or a fill light source located at the top of the electronic device, and the fill light source is an additional component that is dedicated to fill light. , for example, a soft light.
  • the existing structure can be used to achieve the light filling, which saves the cost.
  • the fill light is used to fill the light, although the cost is increased, it does not affect the normal operation of other components (such as the display screen), and can also achieve a better fill light effect.
  • the fill light device comprises, for example, a plurality of LEDs or other light emitting elements.
  • the brightness, color and color temperature of the light-emitting element can be controlled as needed.
  • the light signal emitted by the light-filling device is softened, so that when the facial image is collected, the user does not feel too glaring and improves. user experience. It can be understood that the specific values of the foregoing parameters are not limited, and can be flexibly selected according to actual use conditions.
  • step S2 when the current ambient light intensity is less than or equal to the preset threshold, the display screen of the electronic device is adjusted to the maximum brightness to perform front fill light.
  • the display screen is gradually increased to the maximum brightness to perform front fill light.
  • the brightness of the display can be adjusted one by one to avoid discomfort caused by sudden increase in brightness.
  • step S2 if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or equal to the preset threshold, the fill light source of the front end of the control electronic device is turned on, so that the fill light source and the light source are The display screen is used to complement the front side.
  • the fill light source at the top of the front side of the control electronic device is turned on, so that the fill light source and the display screen together fill the light. Therefore, in this embodiment, the display screen is first adjusted to the maximum brightness, and the current ambient light intensity is collected. If the current ambient light intensity is still less than or equal to the preset threshold, it indicates that the fill light of the display cannot meet the fill light requirement. The fill light source on the front side of the control electronics is turned on. If the current ambient light intensity is greater than the preset threshold, it means that the brightness of the display can meet the fill light requirement, so only the brightness of the display screen can be used to fill the light.
  • FIG. 2 is a schematic flow chart of a face recognition method according to a second embodiment of the present invention.
  • the method further includes:
  • Step S5 determining a current working state of the electronic device
  • the current working state is divided according to the display state of the display screen, for example, including the state of the information screen, the unlit state of the bright screen, and the unlocked state of the bright screen.
  • the state of the information screen means that the display screen is not lit and is in an extinguished state.
  • the unlit state of the bright screen means that the display is lit, but the unlocked interface is displayed on the display. In this state, the electronic device is not unlocked and cannot enter the running page of the electronic device.
  • the unlocked state of the bright screen means that the display is lit and the corresponding interface is displayed according to the specific operation. In this state, the electronic device has been unlocked, and the user can use the electronic device normally.
  • Step S6 Determine whether face recognition is required according to the current working state of the electronic device.
  • the user may use the electronic device at any time, so in order to quickly respond to the user's operation, some sensors on the electronic device are still in operation to monitor the electronic device.
  • Some sensors on the electronic device are still in operation to monitor the electronic device.
  • touch sensors, gravity sensors, distance sensors, and the like For example, touch sensors, gravity sensors, distance sensors, and the like.
  • the screen wake-up operation includes picking up one or more of an electronic device, a display screen of the touch electronic device, a preset range of the object near the front of the device, and a function button for pressing the electronic device. It can be understood that the screen wake-up operation of the electronic device can be flexibly set according to the needs of the user.
  • the touch sensor of the control electronic device when the electronic device is in the interest screen state, the touch sensor of the control electronic device performs touch detection, and touch action on the display screen (eg, normal touch operation, pressing operation, sliding operation) Test and respond.
  • the touch sensor When the electronic device is in the interest screen state, the touch sensor will perform touch detection at the first scanning frequency (lower power consumption state).
  • the touch sensor When it is detected that the object touches the display screen, it is determined that face recognition is required.
  • the touch sensor When the electronic device is in the unscreened state of the bright screen or the unlocked state of the bright screen, the touch sensor performs touch detection at the second scanning frequency (higher power consumption state or normal power consumption state), thereby reducing the state of the electronic device Power consumption.
  • the first scanning frequency is less than the second scanning frequency.
  • the touch sensor can also be touch-detected in a normal power consumption state.
  • the user may use the electronic device at any time in this case, so it is determined that face recognition is required, and the process proceeds to step S1.
  • the electronic device When the electronic device is in the bright-screen unlocked state, it is further determined whether there is currently an authentication request initiated by the application to the operating system, for example, the payment application initiates an authentication request for mobile payment. If there is an authentication request, it is determined that face recognition is required, and the process proceeds to step S1, otherwise the electronic device performs a normal operation.
  • the method further comprises: after the face recognition is successful, controlling the electronic device to perform a corresponding operation. For example, controlling electronic device unlocking, performing payment transaction operations, and the like.
  • FIG. 3 is a schematic diagram of functional modules of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal 100 includes an image sensor 101, a fill light device 102, an ambient light sensor 103, a processor 104, and a memory 105.
  • the ambient light sensor 103 is disposed on the front side of the electronic device for collecting the light intensity of the environment surrounding the electronic device.
  • the image sensor 101 is disposed on the front side of the electronic device for collecting a facial image of an object in front of the electronic device.
  • the light-filling device 102 is configured to fill light when the environment around the electronic device is dark to facilitate image capturing of the image sensor 101.
  • the processor 104 is configured to determine, when the electronic device needs to perform facial recognition, whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light; and the control electronic An image sensor on the front of the device collects a facial image of an object in front of the electronic device; matches the acquired facial image with a preset facial image template to determine whether the identity of the object in front is legal.
  • one or more component structures may be combined or omitted, for example, the processor 104 and the memory 105 are integrated into a control chip or the like.
  • the mobile terminal 100 can include other components (eg, communication circuitry, power supplies, buses, microphones, cameras, etc.) that are not combined or included in the components shown in FIG. Moreover, for the sake of brevity, only some of the components of the mobile terminal are shown in FIG.
  • the image sensor 101 is disposed on the front side of the electronic device, such as a CCD or CMOS image sensor.
  • the image sensor 101 does not require additional settings.
  • the front camera can be used to collect the face image.
  • the processor 104 is for including any processing circuitry that is provided to control the operation and performance of the mobile terminal 100.
  • the processor 104 is used to run an operating system, an app, a media playback application, or any other application software, and is used to handle interactions with a user, and the like.
  • the processor 104 is, for example, a control IC in which the processing circuits are integrated, or a processor cluster including distributed processing circuits, for example, a central processing unit CPU for centrally controlling various components of the electronic device, and for an electronic device.
  • Image processing GPU in graphics processing.
  • other dedicated processors such as a coprocessor for monitoring the detection results of the sensors of the electronic device, a baseband processor for electronic device communication, a face recognition processor for electronic device for face recognition, etc., may also be provided. Wait.
  • Memory 105 includes one or more computer storage media including hard disks, floppy disks, Flash, ROM, RAM, and any other suitable type of storage component or any combination thereof.
  • the memory 105 is used to store any program code files available to the processor 104, such as an operating system, application software, and functional modules, to name a few.
  • the memory 105 is also used to store processing data processed by the processor 104 and processing results such as application data, user operation information, user setting information, multimedia data, and the like. It will be appreciated that the memory 105 can be provided separately or integrated with the processor 104.
  • the computer storage medium in the memory 105 stores a plurality of program code files for the processor 104 to call to execute the unlock control method described in the foregoing embodiment, thereby implementing unlock control in the state of the electronic device.
  • the electronic device when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
  • the light-filling device 102 is disposed on the front surface of the electronic device, for example, a display screen 106 including an electronic device, and a fill light source 107 located at the top of the front surface of the electronic device.
  • the fill light source 107 is additionally provided and dedicated to supplement Light components, such as soft lights.
  • the display screen 106 is also used to display a picture.
  • one of the display screen 106 and the fill light source 107 is selected for supplemental light according to actual needs, or a combination of the two is used to fill light.
  • the processor 104 is configured to: when the current ambient light intensity is less than or equal to a preset threshold, control the fill light source to be turned on to perform front fill light.
  • the light When the light is supplemented by the display 106 of the electronic device, the light can be achieved by using the existing structure, and the cost is saved.
  • the fill light is applied by the fill light source 107, although the cost is increased, it does not affect the normal operation of other components (such as a display screen), and a better fill light effect can be achieved.
  • the fill light device 102 includes, for example, a plurality of LEDs or other light emitting elements. Further, the light-filling parameters such as brightness, color, and color temperature of the light-emitting element can be controlled as needed. In this embodiment, by controlling one or several fill light parameters of the brightness, color and color temperature of the LED, the light signal emitted by the light-filling device is softened, so that the user does not feel too glaring when performing face image acquisition. , improved user experience.
  • the processor 104 is configured to further adjust one or more parameters of the brightness, color temperature and color of the fill light source when the fill light source is turned on.
  • the processor 104 is further configured to: when the current ambient light intensity is less than or equal to a preset threshold, adjust the display screen to the maximum brightness to perform front fill light.
  • the display screen is gradually increased to the maximum brightness to perform front fill light.
  • the brightness of the display can be adjusted one by one to avoid discomfort caused by sudden increase in brightness.
  • the processor 104 is further configured to: if the sum of the current ambient light intensity and the maximum brightness of the display 106 is still less than or equal to a preset threshold, control the fill light source of the front end of the electronic device to be turned on, so that the fill light The light source 107 performs front fill light together with the display screen 106.
  • the fill light source 107 of the front end of the control electronic device is turned on, so that the fill light source 107 and the display screen 106 together perform front fill light. Therefore, in this embodiment, the display screen 106 is first adjusted to the maximum brightness, and the current ambient light intensity is collected. If the current ambient light intensity is still less than or equal to the preset threshold, it indicates that the fill light of the display screen 106 cannot meet the fill light requirement. At this time, the fill light source 107 at the front end of the control electronic device is turned on. If the current ambient light intensity is greater than the preset threshold, it means that the brightness of the display screen 106 can meet the fill light requirement, so that only the brightness of the display screen 106 can be used to fill the light.
  • the processor 104 is further configured to: determine a current working state of the electronic device, and determine whether face recognition is required according to a current working state of the electronic device.
  • the current working state is divided according to the display state of the display screen, for example, including the state of the information screen, the unlit state of the bright screen, and the unlocked state of the bright screen.
  • the state of the information screen means that the display screen is not lit and is in an extinguished state.
  • the unlit state of the bright screen means that the display is lit, but the unlocked interface is displayed on the display. In this state, the electronic device is not unlocked and cannot enter the main page of the electronic device.
  • the unlocked state of the bright screen means that the display is lit and the corresponding interface is displayed according to the specific operation. In this state, the electronic device has been unlocked, and the user can use the electronic device normally.
  • the user may use the electronic device at any time, so in order to quickly respond to the user's operation, some sensors on the electronic device are still in operation to monitor the electronic device.
  • Some sensors on the electronic device are still in operation to monitor the electronic device.
  • Use case to determine if there is a screen wake-up operation For example, touch sensors, gravity sensors, distance sensors, and the like.
  • the screen wake-up operation includes one or more of picking up the electronic device, touching the display of the electronic device, the object is close to the front preset range of the device, and pressing the function button of the electronic device. It can be understood that the screen wake-up operation of the electronic device can be flexibly set according to the needs of the user.
  • the touch sensor 108 of the control electronic device when the electronic device is in the interest screen state, the touch sensor 108 of the control electronic device performs touch detection, and touch action on the display screen 106 (for example, a normal touch) Operation, pressing operation, sliding operation) to detect and respond.
  • the touch sensor 108 When the electronic device is in the interest screen state, the touch sensor 108 will perform touch detection at the first scanning frequency (lower power consumption state).
  • the first scanning frequency lower power consumption state
  • the touch sensor 108 When the electronic device is in the bright un unlocked state or the bright-screen unlocked state, the touch sensor 108 performs touch detection at the second scanning frequency (higher power consumption state or normal power consumption state), thereby reducing the electronic device state of the screen. Power consumption. Wherein the first scanning frequency is less than the second scanning frequency. Of course, the touch sensor 108 can also be touch-detected in a normal power consumption state at all times.
  • the user may use the electronic device at any time in this case, thus determining that face recognition is required.
  • the electronic device When the electronic device is in the bright-screen unlocked state, it is further determined whether there is currently an authentication request initiated by the application to the operating system, for example, the payment application initiates an authentication request for mobile payment. If there is an authentication request, it is determined that face recognition is required, otherwise the electronic device performs normal operations.

Abstract

An electronic device and a facial recognition method therefor. The facial recognition method comprises: S1, when an electronic device requires facial recognition, determining whether the intensity of current ambient light is less than or equal to a preset threshold; S2, if the intensity of the current ambient light is less than or equal to the preset threshold, controlling the electronic device to perform front light supplement; S3, controlling an image sensor on the front side of the electronic device to acquire a facial image of an object in front of the electronic device; and S4, matching the acquired facial image with a preset facial image template to determine whether the identity of the object in front of the electronic device is valid. The electronic device operates the facial recognition method.

Description

电子设备及其面部识别方法Electronic device and face recognition method thereof 技术领域Technical field
本发明涉及一种电子设备及其面部识别方法。The invention relates to an electronic device and a face recognition method thereof.
背景技术Background technique
随着智能手机的全面屏发展趋势,手机正面的屏占比越来越高,因此手机正面因为空间位置受限无法再设置其他组件,例如按键,指纹识别模组等。由于无法设置指纹识别模组,为了实现身份识别,业界提出了采用手机正面的前置摄像头获取面部信息,并进行面部识别。With the trend of full-screen development of smart phones, the proportion of screens on the front of mobile phones is getting higher and higher. Therefore, other components such as buttons and fingerprint recognition modules cannot be set because the space is limited. Since the fingerprint recognition module cannot be set, in order to realize the identification, the industry has proposed to use the front camera on the front of the mobile phone to obtain facial information and perform facial recognition.
但是现有的面部识别技术的识别效果还需要提高。However, the recognition effect of the existing facial recognition technology needs to be improved.
发明内容Summary of the invention
本发明实施方式旨在至少解决现有技术中存在的技术问题之一。为此,本发明实施方式需要提供一种电子设备及其面部识别方法。The embodiments of the present invention aim to at least solve one of the technical problems existing in the prior art. To this end, embodiments of the present invention need to provide an electronic device and a face recognition method thereof.
本发明提供一种电子设备的面部识别方法,包括以下步骤:The invention provides a face recognition method for an electronic device, comprising the following steps:
S1,当电子设备需要进行面部识别时,判断当前环境光强度是否小于或等于预设阈值;S1, when the electronic device needs to perform facial recognition, determine whether the current ambient light intensity is less than or equal to a preset threshold;
S2,当当前环境光强度小于或等于预设阈值时,控制电子设备进行正面补光;S2, when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light;
S3,控制电子设备正面的图像传感器,采集电子设备前方物体的面部图像;S3, controlling an image sensor on the front side of the electronic device to collect a facial image of an object in front of the electronic device;
S4,将所采集的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。S4: Match the collected facial image with a preset facial image template to determine whether the identity of the object in front is legal.
本发明实施方式中,在需要进行面部识别时,若电子设备周围环境较暗,则控制电子设备进行补光,从而使得电子设备能采集到清晰的面部图像,提高面部识别效果,提升用户体验。In the embodiment of the present invention, when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
在某些实施方式中,所述步骤S1之后进一步包括:当当前环境光强度大于预设阈值时,执行所述步骤S3。In some embodiments, the step S1 further comprises: performing step S3 when the current ambient light intensity is greater than a preset threshold.
在某些实施方式中,所述步骤S2中补光与步骤S3中面部图像的采集同时进行。In some embodiments, the fill light in step S2 is performed simultaneously with the acquisition of the facial image in step S3.
在某些实施方式中,在所述步骤S2中:当当前环境光强度小于或等于预设阈值时, 控制电子设备正面的补光装置开启,以进行正面补光。In some embodiments, in the step S2: when the current ambient light intensity is less than or equal to the preset threshold, the fill light device on the front side of the control electronic device is turned on to perform front fill light.
在某些实施方式中,当控制电子设备正面的补光装置开启时,进一步调整补光装置的亮度、色温和颜色中的一个或几个参数。In some embodiments, one or more of the brightness, color temperature, and color of the fill light device are further adjusted when the fill light device on the front of the control electronics is turned on.
在某些实施方式中,所述电子设备正面的补光装置包括设置在电子设备正面顶端的补光光源。In some embodiments, the fill light device on the front side of the electronic device includes a fill light source disposed at the top end of the electronic device.
在某些实施方式中,在所述步骤S2中:当当前环境光强度小于或等于预设阈值时,调节电子设备的显示屏至最大亮度,以进行正面补光。In some embodiments, in the step S2: when the current ambient light intensity is less than or equal to the preset threshold, the display screen of the electronic device is adjusted to the maximum brightness to perform front fill light.
在某些实施方式中,在所述步骤S2中,若当前环境光强度与显示屏的最大亮度之和仍然小于或等于预设阈值,则控制电子设备正面顶端的补光光源开启,以使所述补光光源与所述显示屏一起进行正面补光。In some embodiments, in the step S2, if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or equal to the preset threshold, the fill light source of the front end of the control electronic device is turned on, so that The supplemental light source performs front fill light together with the display screen.
在某些实施方式中,所述步骤S1之前进一步包括:判断电子设备的当前工作状态;根据电子设备的当前工作状态,确定是否需要进行面部识别。In some embodiments, the step S1 further includes: determining a current working state of the electronic device; determining whether face recognition is required according to the current working state of the electronic device.
在某些实施方式中,所述电子设备的当前工作状态包括息屏状态、亮屏未解锁状态、亮屏已解锁状态;所述根据电子设备的当前工作状态,确定是否需要进行面部识别包括:In some embodiments, the current working state of the electronic device includes a state of the screen, a bright screen unlocked state, and a bright screen unlocked state; and determining, according to the current working state of the electronic device, whether facial recognition is required:
当电子设备处于息屏状态时,判断是否有屏幕唤醒操作;当确定有屏幕唤醒操作时,确定需要进行面部识别;Determining whether there is a screen wake-up operation when the electronic device is in the interest screen state; determining that face recognition is required when determining that there is a screen wake-up operation;
当电子设备处于亮屏未解锁状态时,确定需要进行面部识别;Determining that facial recognition is required when the electronic device is in a bright, ununlocked state;
当电子设备处于亮屏已解锁状态时,判断当前是否存在应用程序发起的身份验证请求,若存在身份验证请求,确定需要进行面部识别。When the electronic device is in the unlocked state of the bright screen, it is determined whether there is an application-initiated authentication request currently, and if there is an authentication request, it is determined that facial recognition is required.
在某些实施方式中,所述屏幕唤醒操作包括:拿起电子设备、触摸电子设备的显示屏、物体靠近电子设备正面预设范围、按压电子设备功能按键中的一种或几种。In some embodiments, the screen wake-up operation includes: picking up the electronic device, touching the display of the electronic device, approaching the front preset range of the electronic device, and pressing one or more of the electronic device function buttons.
本发明实施方式提供了一种电子设备,包括图像传感器、补光装置、环境光传感器、以及处理器;所述处理器用于:在电子设备需要进行面部识别时,判断所述环境光传感器采集到的当前环境光强度是否小于或等于预设阈值;当当前环境光强度小于或等于预设阈值时,控制所述补光装置进行正面补光;控制所述图像传感器采集电子设备前方物体的面部图像;将所采集到的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。An embodiment of the present invention provides an electronic device including an image sensor, a fill light device, an ambient light sensor, and a processor. The processor is configured to: when the electronic device needs to perform face recognition, determine that the ambient light sensor collects Whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to a preset threshold, controlling the fill light device to perform front fill light; and controlling the image sensor to collect a face image of an object in front of the electronic device Matching the acquired facial image with a preset facial image template to determine whether the identity of the object in front is legal.
本发明实施方式中,在需要进行面部识别时,若电子设备周围环境较暗,则控制电子设备进行补光,从而使得电子设备能采集到清晰的面部图像,提高面部识别效果,提升用户体验。In the embodiment of the present invention, when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
在某些实施方式中,所述处理器进一步用于:当当前环境光强度大于预设阈值时,直接控制所述图像传感器采集电子设备前方物体的面部图像。In some embodiments, the processor is further configured to directly control the image sensor to acquire a facial image of an object in front of the electronic device when the current ambient light intensity is greater than a preset threshold.
在某些实施方式中,所述图像传感器位于所述电子设备的正面顶端。In some embodiments, the image sensor is located at a front end of the electronic device.
在某些实施方式中,所述补光装置包括位于电子设备正面顶端的补光光源。In some embodiments, the fill light device includes a fill light source located at a top end of the electronic device.
在某些实施方式中,所述补光光源为柔性灯。In some embodiments, the fill light source is a flexible light.
在某些实施方式中,所述处理器进一步用于:当当前环境光强度小于或等于预设阈值时,控制所述补光光源开启,以进行正面补光。In some embodiments, the processor is further configured to: when the current ambient light intensity is less than or equal to a preset threshold, control the fill light source to be turned on to perform front fill light.
在某些实施方式中,在控制所述补光光源开启时,进一步调整补光光源的亮度、色温和颜色中的一个或几个参数。In some embodiments, one or more of the brightness, color temperature, and color of the fill light source are further adjusted when the fill light source is turned on.
在某些实施方式中,当所述补光装置包括位于电子设备正面的显示屏,且所述显示屏还用于显示画面;所述处理器进一步用于:当当前环境光强度小于或等于预设阈值时,调节所述显示屏至最大亮度,以进行正面补光。In some embodiments, when the fill light device includes a display screen located on the front side of the electronic device, and the display screen is further used to display a screen; the processor is further configured to: when the current ambient light intensity is less than or equal to the pre- When the threshold is set, the display is adjusted to the maximum brightness for front fill.
在某些实施方式中,当所述补光装置还包括位于电子设备正面顶端的补光光源时,所述处理器进一步用于:若当前环境光强度与显示屏的最大亮度之和仍然小于或等于预设阈值,则控制所述补光光源开启。In some embodiments, when the light-filling device further includes a fill light source located at the top of the front surface of the electronic device, the processor is further configured to: if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or Equal to the preset threshold, the fill light source is controlled to be turned on.
在某些实施方式中,所述处理器进一步用于:判断电子设备的当前工作状态,根据电子设备的当前工作状态,确定是否需要进行面部识别。In some embodiments, the processor is further configured to: determine a current working state of the electronic device, and determine whether face recognition is required according to a current working state of the electronic device.
在某些实施方式中,所述电子设备的当前工作状态包括息屏状态、亮屏未解锁状态、亮屏已解锁状态;所述处理器进一步用于:In some embodiments, the current working state of the electronic device includes a screen state, a bright screen unlocked state, and a bright screen unlocked state; the processor is further configured to:
当电子设备处于息屏状态时,判断是否有屏幕唤醒操作;当判断有屏幕唤醒操作时,确定需要进行面部识别;When the electronic device is in the state of the interest screen, it is determined whether there is a screen wake-up operation; when it is determined that there is a screen wake-up operation, it is determined that face recognition is required;
当电子设备处于亮屏未解锁状态时,确定需要进行面部识别;Determining that facial recognition is required when the electronic device is in a bright, ununlocked state;
当电子设备处于亮屏已解锁状态时,判断当前是否存在应用程序发起的身份验证请求,若存在身份验证请求,确定需要进行面部识别。When the electronic device is in the unlocked state of the bright screen, it is determined whether there is an application-initiated authentication request currently, and if there is an authentication request, it is determined that facial recognition is required.
在某些实施方式中,所述屏幕唤醒操作包括:拿起电子设备、触摸电子设备的显示屏、物体靠近电子设备正面预设范围、按压电子设备功能按键中的一种或几种。In some embodiments, the screen wake-up operation includes: picking up the electronic device, touching the display of the electronic device, approaching the front preset range of the electronic device, and pressing one or more of the electronic device function buttons.
本发明实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明实施方式的实践了解到。Additional aspects and advantages of the embodiments of the invention will be set forth in part in
附图说明DRAWINGS
本发明实施方式的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the embodiments of the present invention will become apparent and readily understood from
图1是本发明第一实施方式的面部识别方法的流程示意图;1 is a schematic flow chart of a face recognition method according to a first embodiment of the present invention;
图2是本发明第二实施方式的面部识别方法的流程示意图;2 is a schematic flow chart of a face recognition method according to a second embodiment of the present invention;
图3是本发明一实施方式的移动终端的功能模块示意图。FIG. 3 is a schematic diagram of functional modules of a mobile terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。“接触”或“触摸”包括直接接触或间接接触。In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" or "second" may include one or more of the described features either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality" is two or more unless specifically and specifically defined otherwise. "Contact" or "touch" includes direct or indirect contact.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通信;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that the terms "installation", "connected", and "connected" are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or integrally connected; may be mechanically connected, or may be electrically connected or may communicate with each other; may be directly connected or indirectly connected through an intermediate medium, may be internal communication of two elements or interaction of two elements relationship. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
下文的公开提供了许多不同的实施方式或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设定进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设定之间的关系。此外,本发明提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the invention. In addition, the present invention may be repeated with reference to the numerals and/or reference numerals in the various examples, which are for the purpose of simplification and clarity, and do not indicate the relationship between the various embodiments and/or settings discussed. Moreover, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the use of other processes and/or the use of other materials.
进一步地,所描述的特征、结构可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本发明的实施方式的充分理解。然而,本领域技术人员应意识到,没有所述特定细节中的一个或更多,或者采用其它的结构、组元等,也可以实践本发明的技术方案。在其它情况下,不详细示出或描述公知结构或者操作以避免模糊本发明。Further, the described features, structures may be combined in one or more embodiments in any suitable manner. In the following description, numerous specific details are set forth However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details or other structures, components, and the like. In other instances, well-known structures or operations are not shown or described in detail to avoid obscuring the invention.
面部识别方法是指通过摄像头采集物体的面部信息,并将采集到的面部信息与注册的面部模板进行匹配,匹配成功则确定物体的身份合法,匹配失败则确定物体的身份非法。The facial recognition method refers to collecting facial information of an object through a camera, and matching the collected facial information with the registered facial template. If the matching is successful, the identity of the object is determined to be legal, and if the matching fails, the identity of the object is determined to be illegal.
这里的物体例如包括人体或其他的生物体。面部信息例如包括2D图像信息或3D图像信息。基于2D图像信息进行面部识别时,利用现有的摄像头即可实现,不需要额外设置摄像装置。但是该摄像头在正常光照环境下能采集到清晰的面部图像,而在光照环境较差时,则无法采集到清晰的面部图像,从而影响面部识别效果,例如因采集到的面部图像较模糊而需要较长的识别过程,甚至无法实现面部识别。如此,还造成用户体验较差。The objects herein include, for example, human bodies or other living organisms. The face information includes, for example, 2D image information or 3D image information. When facial recognition is performed based on 2D image information, it can be realized by using an existing camera, and it is not necessary to additionally provide an imaging device. However, the camera can capture clear facial images under normal lighting conditions, and when the illumination environment is poor, it is impossible to collect clear facial images, thereby affecting facial recognition effects, for example, because the collected facial images are blurred. Long recognition process, even face recognition is not possible. In this way, the user experience is also poor.
对此,本发明实施方式提出一种无论何种光照环境下都能实现面部识别的面部识别方法,提升面部识别效果。参照图1,图1是本发明第一实施方式的面部识别方法的流程示意图。该面部识别方法包括以下步骤:In this regard, the embodiments of the present invention provide a face recognition method capable of realizing face recognition regardless of any illumination environment, and improving the face recognition effect. Referring to Fig. 1, Fig. 1 is a flow chart showing a face recognition method according to a first embodiment of the present invention. The face recognition method includes the following steps:
S1,当电子设备需要进行面部识别时,判断当前环境光强度是否小于或等于预设阈值;当当前环境光强度小于或等于预设阈值时,执行步骤S2,当当前环境光强度大于预设阈值时,执行步骤S3;S1, when the electronic device needs to perform facial recognition, determine whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to the preset threshold, step S2 is performed, when the current ambient light intensity is greater than a preset threshold. At step S3;
该面部识别方法运行于一电子设备。该电子设备例如但不局限为消费性电子产品、家居式电子产品、车载式电子产品、金融终端产品等合适类型的电子产品。其中,消费性电子产品如为手机、平板电脑、笔记本电脑、桌面显示器、电脑一体机等。家居式电子产品如为智能门锁、电视、冰箱、穿戴式设备等。车载式电子产品如为车载导航仪、车载DVD等。金融终端产品如为ATM机、自助办理业务的终端等。The facial recognition method operates on an electronic device. The electronic device is, for example, but not limited to, a suitable type of electronic product such as a consumer electronic product, a home-based electronic product, a vehicle-mounted electronic product, or a financial terminal product. Among them, consumer electronic products such as mobile phones, tablets, notebook computers, desktop monitors, computer integrated machines. Home-based electronic products such as smart door locks, TVs, refrigerators, wearable devices, etc. Vehicle-mounted electronic products such as car navigation systems, car DVDs, etc. Financial terminal products such as ATM machines, terminals for self-service business, etc.
电子设备正面设有相应的传感设备,例如环境光传感器,用于在电子设备需要进行面部识别时,采集电子设备的周围环境的光照强度。当电子设备的周围环境较亮时,采集到的光照强度则较强;当电子设备的周围环境较暗时,采集到的光照强度则较弱。当然,该电子设备的周围环境的光照强度还可以采用其他的传感设备进行采集,例如电子设备正面设置的摄像头。The front side of the electronic device is provided with a corresponding sensing device, such as an ambient light sensor, for collecting the light intensity of the surrounding environment of the electronic device when the electronic device needs facial recognition. When the surrounding environment of the electronic device is bright, the collected light intensity is strong; when the surrounding environment of the electronic device is dark, the collected light intensity is weak. Of course, the illumination intensity of the surrounding environment of the electronic device can also be collected by other sensing devices, such as a camera disposed on the front of the electronic device.
本发明实施例中,通过预设一个临界值,即预设阈值。若环境光强度大于该预设阈值,则表示电子设备在当前环境下能采集到清晰的面部图像,以实现面部识别;若环境光强度小于或等于预设阈值,则表示电子设备在当前环境下无法采集到清晰的面部图像,造成面部识别失败。In the embodiment of the present invention, a threshold value, that is, a preset threshold value, is preset. If the ambient light intensity is greater than the preset threshold, it indicates that the electronic device can collect a clear facial image in the current environment to implement facial recognition; if the ambient light intensity is less than or equal to the preset threshold, the electronic device is in the current environment. Unable to capture a clear facial image, causing facial recognition to fail.
S2,当当前环境光强度小于或等于预设阈值时,控制电子设备进行正面补光;S2, when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light;
当采集到当前环境光强度,且该当前环境光强度小于或等于预设阈值时,控制电子设备进行正面补光,从而使得电子设备周围环境下的光照强度大于预设阈值,以实现面部识别。When the current ambient light intensity is collected, and the current ambient light intensity is less than or equal to the preset threshold, the control electronic device performs front fill light, so that the illumination intensity under the environment of the electronic device is greater than a preset threshold to implement facial recognition.
S3,控制电子设备正面的图像传感器,采集电子设备前方物体的面部图像;S3, controlling an image sensor on the front side of the electronic device to collect a facial image of an object in front of the electronic device;
电子设备正面的图像传感器例如为CCD、CMOS图像传感器,利用现有电子设备正面设置的前置摄像头即可实现前方物体的面部图像的采集。The image sensor on the front side of the electronic device is, for example, a CCD or a CMOS image sensor, and the front image of the front object can be acquired by using the front camera provided on the front side of the existing electronic device.
S4,将所采集的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。S4: Match the collected facial image with a preset facial image template to determine whether the identity of the object in front is legal.
电子设备在使用之前,使用者需要进行面部信息注册,形成面部模板,并存储,以用于面部识别时2D图像的匹配。图像匹配例如采用面部特征提取的方式,先从2D图像中提取相应的面部特征,例如眼睛、鼻子、眉毛、嘴唇、下颚等等,然后将该提取到的面部特征与2D图像模板中的相应面部特征进行比对,若比对一致则匹配成功,确认前方物体的身份合法;若比对不一致则匹配失败,确认前方物体的身份不合法。Before the electronic device is used, the user needs to register the face information, form a face template, and store it for matching of the 2D image at the time of face recognition. Image matching, for example, adopts facial feature extraction, first extracts corresponding facial features, such as eyes, nose, eyebrows, lips, chin, etc. from the 2D image, and then extracts the extracted facial features and corresponding faces in the 2D image template. The features are compared. If the comparison is consistent, the matching is successful, and the identity of the object in front is legal. If the comparison is inconsistent, the matching fails, and the identity of the object in front is invalid.
本发明实施方式中,在需要进行面部识别时,若电子设备周围环境较暗,则控制电子设备进行补光,从而使得电子设备能采集到清晰的面部图像,提高面部识别效果,提升用户体验。In the embodiment of the present invention, when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
在某些实施方式中,上述步骤S2与步骤S3将同时进行,即控制电子设备进行正面补光的同时,控制电子设备正面的图像传感器进行面部图像的采集。需要说明的是,这里说的同时,并不要求时间上的严格一致,也可以有时间上的先后顺序。只是时间相差较短,基本可以忽略不计,给人们的感觉上两者是同时进行。In some embodiments, the above steps S2 and S3 are performed simultaneously, that is, while the control electronic device performs front fill light, the image sensor on the front side of the electronic device is controlled to collect the facial image. It should be noted that, at the same time, it does not require strict consistency in time, but also has a sequence of time. It's just that the time difference is short, basically negligible, giving people the feeling that the two are at the same time.
在某些实施方式中,步骤S2进一步包括:当当前环境光强度小于或等于预设阈值时,控制电子设备正面的补光装置开启。进一步地,在控制电子设备正面的补光装置开启的同时,还调节补光装置的亮度、色温或者颜色中的一个或几个参数。In some embodiments, step S2 further includes: controlling the fill light device on the front side of the electronic device to be turned on when the current ambient light intensity is less than or equal to the preset threshold. Further, one or more parameters of the brightness, color temperature or color of the light-filling device are also adjusted while controlling the light-filling device on the front side of the electronic device.
在某些实施方式中,上述电子设备正面的补光装置既可以为电子设备的显示屏,也可以为位于电子设备顶部的补光光源,该补光光源为额外设置且专用于补光的部件,例如柔光灯。通过电子设备的显示屏进行补光时,则利用现有结构即可实现补光,节省了成本。通过补光光源进行补光时,虽然增加了成本,但是既不影响其他组件(例如显示屏)的正常工作,而且还可实现更好的补光效果。In some embodiments, the light-filling device on the front surface of the electronic device may be a display screen of the electronic device or a fill light source located at the top of the electronic device, and the fill light source is an additional component that is dedicated to fill light. , for example, a soft light. When the light is supplemented by the display of the electronic device, the existing structure can be used to achieve the light filling, which saves the cost. When the fill light is used to fill the light, although the cost is increased, it does not affect the normal operation of other components (such as the display screen), and can also achieve a better fill light effect.
进一步地,补光装置例如包括多个LED或其他发光元件。而且该发光元件的亮度、颜色以及色温可以根据需要进行控制。本实施方式中,通过控制LED的亮度、颜色以 及色温中的一个或几个参数,使得补光装置发出的光信号更加柔和,从而在进行面部图像采集时,用户不至于感觉太刺眼,提升了用户体验。可以理解的是,前述参数的具体取值不做限定,可根据实际使用情况而灵活选取。Further, the fill light device comprises, for example, a plurality of LEDs or other light emitting elements. Moreover, the brightness, color and color temperature of the light-emitting element can be controlled as needed. In this embodiment, by controlling one or several parameters of the brightness, color, and color temperature of the LED, the light signal emitted by the light-filling device is softened, so that when the facial image is collected, the user does not feel too glaring and improves. user experience. It can be understood that the specific values of the foregoing parameters are not limited, and can be flexibly selected according to actual use conditions.
在某些实施方式中,在步骤S2中:当当前环境光强度小于或等于预设阈值时,调节电子设备的显示屏至最大亮度,以进行正面补光。In some embodiments, in step S2: when the current ambient light intensity is less than or equal to the preset threshold, the display screen of the electronic device is adjusted to the maximum brightness to perform front fill light.
若电子设备通过显示屏进行电子设备的正面补光,则在当前环境光强度小于或等于预设阈值时,控制显示屏逐渐增大到最大亮度,以进行正面补光。显示屏亮度的调节,可以逐次进行调节,以免亮度骤增对用户造成不适。If the electronic device fills the front side of the electronic device through the display screen, when the current ambient light intensity is less than or equal to the preset threshold, the display screen is gradually increased to the maximum brightness to perform front fill light. The brightness of the display can be adjusted one by one to avoid discomfort caused by sudden increase in brightness.
进一步地,在步骤S2中,若当前环境光强度与显示屏的最大亮度之和仍然小于或等于预设阈值,则控制电子设备正面顶端的补光光源开启,以使所述补光光源与所述显示屏一起进行正面补光。Further, in step S2, if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or equal to the preset threshold, the fill light source of the front end of the control electronic device is turned on, so that the fill light source and the light source are The display screen is used to complement the front side.
由于显示屏本身的发光能力有限,若显示屏的亮度无法达到补光要求,则控制电子设备正面顶端的补光光源开启,以使补光光源与显示屏一起进行正面补光。因此,本实施方式中,先调节显示屏至最大亮度,同时采集当前环境光强度,若当前环境光强度仍然小于或等于预设阈值,则表示显示屏的补光无法达到补光要求,此时控制电子设备正面顶端的补光光源开启。若当前环境光强度大于预设阈值,则表示显示屏的亮度能够达到补光要求,因此仅通过显示屏的亮度进行补光即可。Since the brightness of the display itself is limited, if the brightness of the display cannot meet the fill light requirement, the fill light source at the top of the front side of the control electronic device is turned on, so that the fill light source and the display screen together fill the light. Therefore, in this embodiment, the display screen is first adjusted to the maximum brightness, and the current ambient light intensity is collected. If the current ambient light intensity is still less than or equal to the preset threshold, it indicates that the fill light of the display cannot meet the fill light requirement. The fill light source on the front side of the control electronics is turned on. If the current ambient light intensity is greater than the preset threshold, it means that the brightness of the display can meet the fill light requirement, so only the brightness of the display screen can be used to fill the light.
当然,可变更地,为了使得控制过程简洁,也可以在判断当前环境光强度小于或等于预设阈值时,同时点亮显示屏和控制补光光源开启,使得显示屏与补光光源一起进行正面补光。如此简单、方便。Of course, in order to make the control process simple, when the current ambient light intensity is less than or equal to the preset threshold, the display screen and the control fill light source are simultaneously turned on, so that the display screen and the fill light source are positively combined. Fill light. It's so simple and convenient.
进一步地,参照图2,图2是本发明第二实施方式的面部识别方法的流程示意图。该电子设备的面部识别方法中,在上述步骤S1之前还包括:Further, referring to FIG. 2, FIG. 2 is a schematic flow chart of a face recognition method according to a second embodiment of the present invention. In the facial recognition method of the electronic device, before the step S1, the method further includes:
步骤S5,判断电子设备的当前工作状态;Step S5, determining a current working state of the electronic device;
当前工作状态按照显示屏的显示状态来分,例如包括息屏状态、亮屏未解锁状态、亮屏已解锁状态三种。其中息屏状态是指显示屏未被点亮而处于熄灭状态。亮屏未解锁状态是指显示屏被点亮,但显示屏上显示未解锁界面。该状态下,电子设备未被解锁,无法进入电子设备的运行页面。亮屏已解锁状态是指显示屏被点亮,并根据具体的操作显示相应的界面。该状态下电子设备已经解锁,使用者可以正常使用该电子设备。The current working state is divided according to the display state of the display screen, for example, including the state of the information screen, the unlit state of the bright screen, and the unlocked state of the bright screen. The state of the information screen means that the display screen is not lit and is in an extinguished state. The unlit state of the bright screen means that the display is lit, but the unlocked interface is displayed on the display. In this state, the electronic device is not unlocked and cannot enter the running page of the electronic device. The unlocked state of the bright screen means that the display is lit and the corresponding interface is displayed according to the specific operation. In this state, the electronic device has been unlocked, and the user can use the electronic device normally.
步骤S6,根据电子设备的当前工作状态,确定是否需要进行面部识别。Step S6: Determine whether face recognition is required according to the current working state of the electronic device.
具体地,当电子设备处于息屏状态时,使用者随时可能会使用该电子设备,因此为 了能快速响应使用者的操作,该电子设备上的某些传感器仍然处于工作状态,以监测电子设备的使用情况,判断是否存在屏幕唤醒操作。例如,触摸传感器、重力传感器、距离传感器等等。屏幕唤醒操作包括拿起电子设备、触摸电子设备的显示屏、物体靠近设备正面预设范围、按压电子设备的功能按键中的一种或几种。可以理解的是,该电子设备的屏幕唤醒操作可根据使用者的需要而灵活设置。Specifically, when the electronic device is in the state of the interest screen, the user may use the electronic device at any time, so in order to quickly respond to the user's operation, some sensors on the electronic device are still in operation to monitor the electronic device. Use case to determine if there is a screen wake-up operation. For example, touch sensors, gravity sensors, distance sensors, and the like. The screen wake-up operation includes picking up one or more of an electronic device, a display screen of the touch electronic device, a preset range of the object near the front of the device, and a function button for pressing the electronic device. It can be understood that the screen wake-up operation of the electronic device can be flexibly set according to the needs of the user.
以触摸传感器为例,本发明实施方式中,在电子设备处于息屏状态时,控制电子设备的触摸传感器执行触摸检测,对显示屏上的触摸动作(例如普通触摸操作、按压操作、滑动操作)进行检测及响应。当电子设备处于息屏状态时,该触摸传感器将以第一扫描频率(较低功耗状态)进行触摸检测。当检测到物体触摸显示屏,则确定需要进行面部识别。当电子设备处于亮屏未解锁状态或亮屏已解锁状态时,触摸传感器再以第二扫描频率(较高功耗状态或正常功耗状态)进行触摸检测,从而降低电子设备息屏状态时的功耗。其中第一扫描频率小于第二扫描频率。当然,可变更地,该触摸传感器也可以一直以正常功耗状态进行触摸检测。Taking the touch sensor as an example, in the embodiment of the present invention, when the electronic device is in the interest screen state, the touch sensor of the control electronic device performs touch detection, and touch action on the display screen (eg, normal touch operation, pressing operation, sliding operation) Test and respond. When the electronic device is in the interest screen state, the touch sensor will perform touch detection at the first scanning frequency (lower power consumption state). When it is detected that the object touches the display screen, it is determined that face recognition is required. When the electronic device is in the unscreened state of the bright screen or the unlocked state of the bright screen, the touch sensor performs touch detection at the second scanning frequency (higher power consumption state or normal power consumption state), thereby reducing the state of the electronic device Power consumption. Wherein the first scanning frequency is less than the second scanning frequency. Of course, the touch sensor can also be touch-detected in a normal power consumption state.
当电子设备处于亮屏未解锁状态时,这种情况下使用者随时可能使用该电子设备,因此确定需要进行面部识别,并进入步骤S1。When the electronic device is in the unlit state of the bright screen, the user may use the electronic device at any time in this case, so it is determined that face recognition is required, and the process proceeds to step S1.
当电子设备处于亮屏已解锁状态时,则要进一步判断当前是否存在应用程序向操作系统发起的身份验证请求,例如支付应用程序发起用于移动支付的身份验证请求。若存在身份验证请求,则确定需要进行面部识别,并进入步骤S1,否则电子设备进行正常的操作。When the electronic device is in the bright-screen unlocked state, it is further determined whether there is currently an authentication request initiated by the application to the operating system, for example, the payment application initiates an authentication request for mobile payment. If there is an authentication request, it is determined that face recognition is required, and the process proceeds to step S1, otherwise the electronic device performs a normal operation.
在某些实施方式中,上述步骤S4之后进一步包括:当面部识别成功后,控制所述电子设备进行相应的操作。例如控制电子设备解锁、进行支付交易操作等等。In some embodiments, after step S4 above, the method further comprises: after the face recognition is successful, controlling the electronic device to perform a corresponding operation. For example, controlling electronic device unlocking, performing payment transaction operations, and the like.
对应地,本发明一实施方式提出一种用以执行上述实施方式的方法的电子设备。该电子设备以移动终端为例,参照图3,图3是本发明一实施方式的移动终端的功能模块示意图。该移动终端100包括图像传感器101、补光装置102、环境光传感器103以及处理器104、存储器105。环境光传感器103设置于电子设备正面,用于采集电子设备周围环境的光照强度。图像传感器101设置于电子设备正面,用于采集电子设备前方物体的面部图像。补光装置102用于在电子设备周围环境较暗时进行补光,以便于图像传感器101的图像采集。处理器104用于在电子设备需要进行面部识别时,判断当前环境光强度是否小于或等于预设阈值;当当前环境光强度小于或等于预设阈值时,控制电子设备进行正面补光;控制电子设备正面的图像传感器,采集电子设备前方物体的面部图 像;将所采集的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。Correspondingly, an embodiment of the present invention provides an electronic device for performing the method of the above embodiment. The electronic device is exemplified by a mobile terminal. Referring to FIG. 3, FIG. 3 is a schematic diagram of functional modules of a mobile terminal according to an embodiment of the present invention. The mobile terminal 100 includes an image sensor 101, a fill light device 102, an ambient light sensor 103, a processor 104, and a memory 105. The ambient light sensor 103 is disposed on the front side of the electronic device for collecting the light intensity of the environment surrounding the electronic device. The image sensor 101 is disposed on the front side of the electronic device for collecting a facial image of an object in front of the electronic device. The light-filling device 102 is configured to fill light when the environment around the electronic device is dark to facilitate image capturing of the image sensor 101. The processor 104 is configured to determine, when the electronic device needs to perform facial recognition, whether the current ambient light intensity is less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light; and the control electronic An image sensor on the front of the device collects a facial image of an object in front of the electronic device; matches the acquired facial image with a preset facial image template to determine whether the identity of the object in front is legal.
需要说明的是,在一些实施方式中,可以组合或省略一个或多个部件结构,例如处理器104与存储器105集成为一控制芯片等等。另外,该移动终端100可以包括未组合或未包括在图3中所示部件中的其他部件(例如,通信电路、电源、总线、麦克风、摄像头等等)。而且,为了简洁,图3中仅示出了移动终端的部分部件。It should be noted that, in some embodiments, one or more component structures may be combined or omitted, for example, the processor 104 and the memory 105 are integrated into a control chip or the like. Additionally, the mobile terminal 100 can include other components (eg, communication circuitry, power supplies, buses, microphones, cameras, etc.) that are not combined or included in the components shown in FIG. Moreover, for the sake of brevity, only some of the components of the mobile terminal are shown in FIG.
具体地,图像传感器101设置于电子设备正面,例如为CCD、CMOS图像传感器。该图像传感器101不需要额外设置,例如现有电子设备正面设置前置摄像头时,则可以利用该前置摄像头进行面部图像的采集。当然,也可以根据拍摄需求设置对应拍摄参数的图像传感器,专用于面部识别时进行面部图像的采集。Specifically, the image sensor 101 is disposed on the front side of the electronic device, such as a CCD or CMOS image sensor. The image sensor 101 does not require additional settings. For example, when the front camera is disposed on the front side of the existing electronic device, the front camera can be used to collect the face image. Of course, it is also possible to set an image sensor corresponding to the shooting parameters according to the shooting requirements, and to collect the facial image for facial recognition.
处理器104用于包括为控制移动终端100的操作和性能而设置的任何处理电路。该处理器104被用于运行操作系统、app应用、媒体播放应用,或者任何其他应用软件,以及被用于处理与用户之间的交互操作等等。该处理器104例如为各处理电路集成在一起的控制IC,或者为包括分布设置的各处理电路的处理器集群,例如用于集中控制电子设备各元部件的中央处理器CPU、用于电子设备中图形处理的图像处理器GPU。当然,还可以设置其他专用处理器,例如用于监测电子设备的各传感器的检测结果的协处理器、用于电子设备通讯的基带处理器、用于电子设备进行面部识别的面部识别处理器等等。The processor 104 is for including any processing circuitry that is provided to control the operation and performance of the mobile terminal 100. The processor 104 is used to run an operating system, an app, a media playback application, or any other application software, and is used to handle interactions with a user, and the like. The processor 104 is, for example, a control IC in which the processing circuits are integrated, or a processor cluster including distributed processing circuits, for example, a central processing unit CPU for centrally controlling various components of the electronic device, and for an electronic device. Image processing GPU in graphics processing. Of course, other dedicated processors, such as a coprocessor for monitoring the detection results of the sensors of the electronic device, a baseband processor for electronic device communication, a face recognition processor for electronic device for face recognition, etc., may also be provided. Wait.
存储器105例如包括一个或多个计算机存储介质,该存储介质包括硬盘、软盘、Flash、ROM、RAM,以及任何其他适合类型的存储部件或者它们的任意组合。存储器105用于存储可供处理器104调用的任何程序代码文件,例如操作系统、应用软件以及功能模块等等。该存储器105还用于存储处理器104处理的处理数据以及处理结果,例如应用数据、用户操作信息、用户设置信息,多媒体数据等等。可以理解的是,该存储器105可以单独设置,也可以与处理器104集成在一起。 Memory 105, for example, includes one or more computer storage media including hard disks, floppy disks, Flash, ROM, RAM, and any other suitable type of storage component or any combination thereof. The memory 105 is used to store any program code files available to the processor 104, such as an operating system, application software, and functional modules, to name a few. The memory 105 is also used to store processing data processed by the processor 104 and processing results such as application data, user operation information, user setting information, multimedia data, and the like. It will be appreciated that the memory 105 can be provided separately or integrated with the processor 104.
进一步地,该存储器105中的计算机存储介质存储有多个程序代码文件,以供处理器104调用,用以执行上述实施方式描述的解锁控制方法,从而实现电子设备息屏状态下的解锁控制。Further, the computer storage medium in the memory 105 stores a plurality of program code files for the processor 104 to call to execute the unlock control method described in the foregoing embodiment, thereby implementing unlock control in the state of the electronic device.
本发明实施方式中,在需要进行面部识别时,若电子设备周围环境较暗,则控制电子设备进行补光,从而使得电子设备能采集到清晰的面部图像,提高面部识别效果,提升用户体验。In the embodiment of the present invention, when facial recognition is required, if the surrounding environment of the electronic device is dark, the electronic device is controlled to fill light, so that the electronic device can collect a clear facial image, improve the facial recognition effect, and improve the user experience.
在某些实施方式中,该补光装置102设置于电子设备正面,例如包括电子设备的显 示屏106、位于电子设备正面顶端的补光光源107,该补光光源107为额外设置且专用于补光的部件,例如柔光灯。其中显示屏106还用于显示画面。在进行面部识别时,根据实际需要来选择使用显示屏106和补光光源107中的一个进行补光,或者两者结合进行补光。例如,通过补光光源107进行补光时,处理器104用于:当当前环境光强度小于或等于预设阈值时,控制补光光源开启,以进行正面补光。In some embodiments, the light-filling device 102 is disposed on the front surface of the electronic device, for example, a display screen 106 including an electronic device, and a fill light source 107 located at the top of the front surface of the electronic device. The fill light source 107 is additionally provided and dedicated to supplement Light components, such as soft lights. The display screen 106 is also used to display a picture. When performing face recognition, one of the display screen 106 and the fill light source 107 is selected for supplemental light according to actual needs, or a combination of the two is used to fill light. For example, when the fill light source 107 is used to fill light, the processor 104 is configured to: when the current ambient light intensity is less than or equal to a preset threshold, control the fill light source to be turned on to perform front fill light.
通过电子设备的显示屏106进行补光时,则利用现有结构即可实现补光,节省了成本。通过补光光源107进行补光时,虽然增加了成本,但是既不影响其他组件(例如显示屏)的正常工作,而且还可实现更好的补光效果。When the light is supplemented by the display 106 of the electronic device, the light can be achieved by using the existing structure, and the cost is saved. When the fill light is applied by the fill light source 107, although the cost is increased, it does not affect the normal operation of other components (such as a display screen), and a better fill light effect can be achieved.
补光装置102例如包括多个LED或其他发光元件。而且该发光元件的亮度、颜色以及色温等补光参数可以根据需要进行控制。本实施方式中,通过控制LED的亮度、颜色以及色温中的一个或几个补光参数,将使得补光装置发出的光信号更加柔和,从而在进行面部图像采集时,用户不至于感觉太刺眼,提升了用户体验。例如处理器104用于:在控制补光光源开启时,进一步调整补光光源的亮度、色温和颜色中的一个或几个参数。The fill light device 102 includes, for example, a plurality of LEDs or other light emitting elements. Further, the light-filling parameters such as brightness, color, and color temperature of the light-emitting element can be controlled as needed. In this embodiment, by controlling one or several fill light parameters of the brightness, color and color temperature of the LED, the light signal emitted by the light-filling device is softened, so that the user does not feel too glaring when performing face image acquisition. , improved user experience. For example, the processor 104 is configured to further adjust one or more parameters of the brightness, color temperature and color of the fill light source when the fill light source is turned on.
在某些实施方式中,处理器104进一步用于:当当前环境光强度小于或等于预设阈值时,调节显示屏至最大亮度,以进行正面补光。In some embodiments, the processor 104 is further configured to: when the current ambient light intensity is less than or equal to a preset threshold, adjust the display screen to the maximum brightness to perform front fill light.
若电子设备通过显示屏进行电子设备的正面补光,则在当前环境光强度小于或等于预设阈值时,控制显示屏逐渐增大到最大亮度,以进行正面补光。显示屏亮度的调节,可以逐次进行调节,以免亮度骤增对用户造成不适。If the electronic device fills the front side of the electronic device through the display screen, when the current ambient light intensity is less than or equal to the preset threshold, the display screen is gradually increased to the maximum brightness to perform front fill light. The brightness of the display can be adjusted one by one to avoid discomfort caused by sudden increase in brightness.
进一步地,处理器104还用于,若当前环境光强度与显示屏106的最大亮度之和仍然小于或等于预设阈值,则控制电子设备正面顶端的补光光源开启,以使所述补光光源107与所述显示屏106一起进行正面补光。Further, the processor 104 is further configured to: if the sum of the current ambient light intensity and the maximum brightness of the display 106 is still less than or equal to a preset threshold, control the fill light source of the front end of the electronic device to be turned on, so that the fill light The light source 107 performs front fill light together with the display screen 106.
由于显示屏本身的发光能力有限,若显示屏106的亮度无法达到补光要求,则控制电子设备正面顶端的补光光源107开启,以使补光光源107与显示屏106一起进行正面补光。因此,本实施方式中,先调节显示屏106至最大亮度,同时采集当前环境光强度,若当前环境光强度仍然小于或等于预设阈值,则表示显示屏106的补光无法达到补光要求,此时控制电子设备正面顶端的补光光源107开启。若当前环境光强度大于预设阈值,则表示显示屏106的亮度能够达到补光要求,因此仅通过显示屏106的亮度进行补光即可。Since the illumination capability of the display screen itself is limited, if the brightness of the display screen 106 cannot meet the fill light requirement, the fill light source 107 of the front end of the control electronic device is turned on, so that the fill light source 107 and the display screen 106 together perform front fill light. Therefore, in this embodiment, the display screen 106 is first adjusted to the maximum brightness, and the current ambient light intensity is collected. If the current ambient light intensity is still less than or equal to the preset threshold, it indicates that the fill light of the display screen 106 cannot meet the fill light requirement. At this time, the fill light source 107 at the front end of the control electronic device is turned on. If the current ambient light intensity is greater than the preset threshold, it means that the brightness of the display screen 106 can meet the fill light requirement, so that only the brightness of the display screen 106 can be used to fill the light.
进一步地,上述处理器104还用于:判断电子设备的当前工作状态,根据电子设备 的当前工作状态,确定是否需要进行面部识别。Further, the processor 104 is further configured to: determine a current working state of the electronic device, and determine whether face recognition is required according to a current working state of the electronic device.
当前工作状态按照显示屏的显示状态来分,例如包括息屏状态、亮屏未解锁状态、亮屏已解锁状态三种。其中息屏状态是指显示屏未被点亮而处于熄灭状态。亮屏未解锁状态是指显示屏被点亮,但显示屏上显示未解锁界面。该状态下,电子设备未被解锁,无法进入电子设备的主页面。亮屏已解锁状态是指显示屏被点亮,并根据具体的操作显示相应的界面。该状态下电子设备已经解锁,使用者可以正常使用该电子设备。The current working state is divided according to the display state of the display screen, for example, including the state of the information screen, the unlit state of the bright screen, and the unlocked state of the bright screen. The state of the information screen means that the display screen is not lit and is in an extinguished state. The unlit state of the bright screen means that the display is lit, but the unlocked interface is displayed on the display. In this state, the electronic device is not unlocked and cannot enter the main page of the electronic device. The unlocked state of the bright screen means that the display is lit and the corresponding interface is displayed according to the specific operation. In this state, the electronic device has been unlocked, and the user can use the electronic device normally.
具体地,当电子设备处于息屏状态时,使用者随时可能会使用该电子设备,因此为了能快速响应使用者的操作,该电子设备上的某些传感器仍然处于工作状态,以监测电子设备的使用情况,判断是否存在屏幕唤醒操作。例如,触摸传感器、重力传感器、距离传感器等等。屏幕唤醒操作包括拿起电子设备、触摸电子设备的显示屏、物体靠近设备正面预设范围、按压电子设备的功能按键的一种或几种。可以理解的是,该电子设备的屏幕唤醒操作可根据使用者的需要而灵活设置。Specifically, when the electronic device is in the state of the interest screen, the user may use the electronic device at any time, so in order to quickly respond to the user's operation, some sensors on the electronic device are still in operation to monitor the electronic device. Use case to determine if there is a screen wake-up operation. For example, touch sensors, gravity sensors, distance sensors, and the like. The screen wake-up operation includes one or more of picking up the electronic device, touching the display of the electronic device, the object is close to the front preset range of the device, and pressing the function button of the electronic device. It can be understood that the screen wake-up operation of the electronic device can be flexibly set according to the needs of the user.
以电子设备上设置的触摸传感器108为例,本发明实施方式中,在电子设备处于息屏状态时,控制电子设备的触摸传感器108执行触摸检测,对显示屏106上的触摸动作(例如普通触摸操作、按压操作、滑动操作)进行检测及响应。当电子设备处于息屏状态时,该触摸传感器108将以第一扫描频率(较低功耗状态)进行触摸检测。当检测到物体触摸显示屏,则确定需要进行面部识别。当电子设备处于亮屏未解锁状态或亮屏已解锁状态时,触摸传感器108再以第二扫描频率(较高功耗状态或正常功耗状态)进行触摸检测,从而降低电子设备息屏状态时的功耗。其中第一扫描频率小于第二扫描频率。当然,可变更地,该触摸传感器108也可以一直以正常功耗状态进行触摸检测。Taking the touch sensor 108 provided on the electronic device as an example, in the embodiment of the present invention, when the electronic device is in the interest screen state, the touch sensor 108 of the control electronic device performs touch detection, and touch action on the display screen 106 (for example, a normal touch) Operation, pressing operation, sliding operation) to detect and respond. When the electronic device is in the interest screen state, the touch sensor 108 will perform touch detection at the first scanning frequency (lower power consumption state). When it is detected that the object touches the display screen, it is determined that face recognition is required. When the electronic device is in the bright un unlocked state or the bright-screen unlocked state, the touch sensor 108 performs touch detection at the second scanning frequency (higher power consumption state or normal power consumption state), thereby reducing the electronic device state of the screen. Power consumption. Wherein the first scanning frequency is less than the second scanning frequency. Of course, the touch sensor 108 can also be touch-detected in a normal power consumption state at all times.
当电子设备处于亮屏未解锁状态时,这种情况下使用者随时可能使用该电子设备,因此确定需要进行面部识别。When the electronic device is in a bright, ununlocked state, the user may use the electronic device at any time in this case, thus determining that face recognition is required.
当电子设备处于亮屏已解锁状态时,则要进一步判断当前是否存在应用程序向操作系统发起的身份验证请求,例如支付应用程序发起用于移动支付的身份验证请求。若存在身份验证请求,则确定需要进行面部识别,否则电子设备进行正常的操作。When the electronic device is in the bright-screen unlocked state, it is further determined whether there is currently an authentication request initiated by the application to the operating system, for example, the payment application initiates an authentication request for mobile payment. If there is an authentication request, it is determined that face recognition is required, otherwise the electronic device performs normal operations.
在本说明书的描述中,参考术语“一个实施方式”、“某些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式 结合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiment", "example", "specific example", or "some examples", etc. The specific features, structures, materials or characteristics described in the embodiments or examples are included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本发明的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施方式进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to changes, modifications, substitutions and variations.

Claims (23)

  1. 一种电子设备的面部识别方法,包括以下步骤:A facial recognition method for an electronic device includes the following steps:
    S1,当电子设备需要进行面部识别时,判断当前环境光强度是否小于或等于预设阈值;S1, when the electronic device needs to perform facial recognition, determine whether the current ambient light intensity is less than or equal to a preset threshold;
    S2,当当前环境光强度小于或等于预设阈值时,控制电子设备进行正面补光;S2, when the current ambient light intensity is less than or equal to a preset threshold, the control electronic device performs front fill light;
    S3,控制电子设备正面的图像传感器,采集电子设备前方物体的面部图像;S3, controlling an image sensor on the front side of the electronic device to collect a facial image of an object in front of the electronic device;
    S4,将所采集的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。S4: Match the collected facial image with a preset facial image template to determine whether the identity of the object in front is legal.
  2. 如权利要求1所述的面部识别方法,其特征在于:所述步骤S1之后进一步包括:当当前环境光强度大于预设阈值时,执行所述步骤S3。The facial recognition method according to claim 1, wherein the step S1 further comprises: performing step S3 when the current ambient light intensity is greater than a preset threshold.
  3. 如权利要求1所述的面部识别方法,其特征在于:所述步骤S2中补光与步骤S3中面部图像的采集同时进行。The face recognition method according to claim 1, wherein the fill light in the step S2 is performed simultaneously with the collection of the face image in the step S3.
  4. 如权利要求1所述的面部识别方法,其特征在于:在所述步骤S2中:当当前环境光强度小于或等于预设阈值时,控制电子设备正面的补光装置开启,以进行正面补光。The facial recognition method according to claim 1, wherein in the step S2: when the current ambient light intensity is less than or equal to a preset threshold, the light-filling device on the front of the electronic device is turned on to perform front fill light. .
  5. 如权利要求4所述的面部识别方法,其特征在于:当控制电子设备正面的补光装置开启时,进一步调整补光装置的亮度、色温和颜色中的一个或几个参数。The face recognition method according to claim 4, wherein one or more of brightness, color temperature and color of the light-filling device are further adjusted when the light-filling device on the front side of the control electronic device is turned on.
  6. 如权利要求4所述的面部识别方法,其特征在于:所述电子设备正面的补光装置包括设置在电子设备正面顶端的补光光源。The face recognition method according to claim 4, wherein the light filling means on the front side of the electronic device comprises a fill light source disposed at a top end of the front surface of the electronic device.
  7. 如权利要求1所述的面部识别方法,其特征在于:在所述步骤S2中:当当前环境光强度小于或等于预设阈值时,调节电子设备的显示屏至最大亮度,以进行正面补光。The facial recognition method according to claim 1, wherein in the step S2, when the current ambient light intensity is less than or equal to a preset threshold, the display screen of the electronic device is adjusted to the maximum brightness to perform front fill light. .
  8. 如权利要求7所述的面部识别方法,其特征在于:在所述步骤S2中,若当前环境光强度与显示屏的最大亮度之和仍然小于或等于预设阈值,则控制电子设备正面顶端的补光光源开启,以使所述补光光源与所述显示屏一起进行正面补光。The facial recognition method according to claim 7, wherein in the step S2, if the sum of the current ambient light intensity and the maximum brightness of the display screen is still less than or equal to a preset threshold, the front end of the electronic device is controlled. The fill light source is turned on to cause the fill light source to perform front fill light together with the display screen.
  9. 如权利要求1-8中任意一项所述的面部识别方法,其特征在于:所述步骤S1之前进一步包括:判断电子设备的当前工作状态;根据电子设备的当前工作状态,确定是否需要进行面部识别。The facial recognition method according to any one of claims 1 to 8, wherein the step S1 further comprises: determining a current working state of the electronic device; determining whether a face is required according to a current working state of the electronic device Identification.
  10. 如权利要求9所述的面部识别方法,其特征在于:所述电子设备的当前工作状态包括息屏状态、亮屏未解锁状态、亮屏已解锁状态;所述根据电子设备的当前工作状态,确定是否需要进行面部识别包括:The facial recognition method according to claim 9, wherein the current working state of the electronic device comprises a state of the screen, a bright screen unlocked state, and a bright screen unlocked state; and according to the current working state of the electronic device, Determining if facial recognition is required includes:
    当电子设备处于息屏状态时,判断是否有屏幕唤醒操作;当确定有屏幕唤醒操作时,确定需要进行面部识别;Determining whether there is a screen wake-up operation when the electronic device is in the interest screen state; determining that face recognition is required when determining that there is a screen wake-up operation;
    当电子设备处于亮屏未解锁状态时,确定需要进行面部识别;Determining that facial recognition is required when the electronic device is in a bright, ununlocked state;
    当电子设备处于亮屏已解锁状态时,判断当前是否存在应用程序发起的身份验证请求,若存在身份验证请求,确定需要进行面部识别。When the electronic device is in the unlocked state of the bright screen, it is determined whether there is an application-initiated authentication request currently, and if there is an authentication request, it is determined that facial recognition is required.
  11. 如权利要求10所述的面部识别方法,其特征在于:所述屏幕唤醒操作包括:拿起电子设备、触摸电子设备的显示屏、物体靠近电子设备正面预设范围、按压电子设备功能按键中的一种或几种。The facial recognition method according to claim 10, wherein the screen wake-up operation comprises: picking up the electronic device, touching the display screen of the electronic device, approaching the front surface of the electronic device, and pressing the function button of the electronic device. One or several.
  12. 一种电子设备,包括图像传感器、补光装置、环境光传感器、以及处理器;所述处理器用于:在电子设备需要进行面部识别时,判断所述环境光传感器采集到的当前环境光强度是否小于或等于预设阈值;当当前环境光强度小于或等于预设阈值时,控制所述补光装置进行正面补光;控制所述图像传感器采集电子设备前方物体的面部图像;将所采集到的面部图像与预设的面部图像模板进行匹配,以确定前方物体的身份是否合法。An electronic device includes an image sensor, a fill light device, an ambient light sensor, and a processor; the processor is configured to: determine whether the current ambient light intensity collected by the ambient light sensor is when the electronic device needs to perform face recognition And less than or equal to a preset threshold; when the current ambient light intensity is less than or equal to a preset threshold, controlling the fill light device to perform front fill light; controlling the image sensor to collect a face image of an object in front of the electronic device; The facial image is matched with a preset facial image template to determine whether the identity of the object in front is legal.
  13. 如权利要求12所述的电子设备,其特征在于:所述处理器进一步用于:当当前环境光强度大于预设阈值时,直接控制所述图像传感器采集电子设备前方物体的面部图像。The electronic device according to claim 12, wherein the processor is further configured to directly control the image sensor to collect a facial image of an object in front of the electronic device when the current ambient light intensity is greater than a preset threshold.
  14. 如权利要求12所述的电子设备,其特征在于:所述图像传感器位于所述电子设备的正面顶端。The electronic device of claim 12 wherein said image sensor is located at a front end of said electronic device.
  15. 如权利要求12所述的电子设备,其特征在于:所述补光装置包括位于电子设备正面顶端的补光光源。The electronic device of claim 12 wherein said fill light means comprises a fill light source located at a top end of the electronic device.
  16. 如权利要求15所述的电子设备,其特征在于:所述补光光源为柔性灯。The electronic device of claim 15 wherein said fill light source is a flexible light.
  17. 如权利要求15所述的电子设备,其特征在于:所述处理器进一步用于:当当前环境光强度小于或等于预设阈值时,控制所述补光光源开启,以进行正面补光。The electronic device according to claim 15, wherein the processor is further configured to: when the current ambient light intensity is less than or equal to a preset threshold, control the fill light source to be turned on to perform front fill light.
  18. 如权利要求17所述的电子设备,其特征在于:在控制所述补光光源开启时,进一步调整补光光源的亮度、色温和颜色中的一个或几个参数。The electronic device according to claim 17, wherein one or more parameters of brightness, color temperature and color of the fill light source are further adjusted when the fill light source is controlled to be turned on.
  19. 如权利要求1所述的电子设备,其特征在于:所述补光装置包括位于电子设备正面的显示屏,且所述显示屏还用于显示画面;所述处理器进一步用于:当当前环境光强度小于或等于预设阈值时,调节所述显示屏至最大亮度,以进行正面补光。The electronic device according to claim 1, wherein said light filling means comprises a display screen located on the front side of the electronic device, and said display screen is further used for displaying a picture; said processor is further for: when the current environment When the light intensity is less than or equal to the preset threshold, the display screen is adjusted to the maximum brightness to perform front fill light.
  20. 如权利要求19所述的电子设备,其特征在于:所述补光装置还包括位于电子设 备正面顶端的补光光源时,所述处理器进一步用于:若当前环境光强度与显示屏的最大亮度之和仍然小于或等于预设阈值,则控制所述补光光源开启。The electronic device according to claim 19, wherein when the light-filling device further comprises a fill light source located at a top end of the electronic device, the processor is further configured to: if the current ambient light intensity and the maximum display screen If the sum of the brightness is still less than or equal to the preset threshold, then the fill light source is controlled to be turned on.
  21. 如权利要求12-20中任意一项所述的电子设备,其特征在于:所述处理器进一步用于:判断电子设备的当前工作状态,根据电子设备的当前工作状态,确定是否需要进行面部识别。The electronic device according to any one of claims 12 to 20, wherein the processor is further configured to: determine a current working state of the electronic device, and determine whether face recognition is required according to a current working state of the electronic device. .
  22. 如权利要求21所述的电子设备,其特征在于:所述电子设备的当前工作状态包括息屏状态、亮屏未解锁状态、亮屏已解锁状态;所述处理器进一步用于:The electronic device according to claim 21, wherein the current working state of the electronic device comprises a state of the screen, a bright screen unlocked state, and a bright screen unlocked state; and the processor is further configured to:
    当电子设备处于息屏状态时,判断是否有屏幕唤醒操作;当判断有屏幕唤醒操作时,确定需要进行面部识别;When the electronic device is in the state of the interest screen, it is determined whether there is a screen wake-up operation; when it is determined that there is a screen wake-up operation, it is determined that face recognition is required;
    当电子设备处于亮屏未解锁状态时,确定需要进行面部识别;Determining that facial recognition is required when the electronic device is in a bright, ununlocked state;
    当电子设备处于亮屏已解锁状态时,判断当前是否存在应用程序发起的身份验证请求,若存在身份验证请求,确定需要进行面部识别。When the electronic device is in the unlocked state of the bright screen, it is determined whether there is an application-initiated authentication request currently, and if there is an authentication request, it is determined that facial recognition is required.
  23. 如权利要求22所述的电子设备,其特征在于:所述屏幕唤醒操作包括:拿起电子设备、触摸电子设备的显示屏、物体靠近电子设备正面预设范围、按压电子设备功能按键中的一种或几种。The electronic device according to claim 22, wherein the screen wake-up operation comprises: picking up the electronic device, touching the display screen of the electronic device, approaching the front preset range of the electronic device, and pressing one of the function buttons of the electronic device Kind or several.
PCT/CN2018/071361 2018-01-04 2018-01-04 Electronic device and facial recognition method therefor WO2019134094A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880000001.2A CN110226169A (en) 2018-01-04 2018-01-04 Electronic equipment and its face recognition method
PCT/CN2018/071361 WO2019134094A1 (en) 2018-01-04 2018-01-04 Electronic device and facial recognition method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/071361 WO2019134094A1 (en) 2018-01-04 2018-01-04 Electronic device and facial recognition method therefor

Publications (1)

Publication Number Publication Date
WO2019134094A1 true WO2019134094A1 (en) 2019-07-11

Family

ID=67143503

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/071361 WO2019134094A1 (en) 2018-01-04 2018-01-04 Electronic device and facial recognition method therefor

Country Status (2)

Country Link
CN (1) CN110226169A (en)
WO (1) WO2019134094A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338984A (en) * 2021-12-27 2022-04-12 深圳市海洋王铁路照明技术有限公司 Screen-off shooting method and device for work recorder, recorder and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400108A (en) * 2013-07-10 2013-11-20 北京小米科技有限责任公司 Face identification method and device as well as mobile terminal
US9367127B1 (en) * 2008-09-26 2016-06-14 Philip Raymond Schaefer System and method for detecting facial gestures for control of an electronic device
CN106210471A (en) * 2016-07-19 2016-12-07 成都百威讯科技有限责任公司 A kind of outdoor face recognition method and system
CN107506752A (en) * 2017-09-18 2017-12-22 艾普柯微电子(上海)有限公司 Face identification device and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170109569A1 (en) * 2015-08-28 2017-04-20 Hongtae KIM Hybrid face recognition based on 3d data
CN208172794U (en) * 2018-01-04 2018-11-30 深圳阜时科技有限公司 Electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367127B1 (en) * 2008-09-26 2016-06-14 Philip Raymond Schaefer System and method for detecting facial gestures for control of an electronic device
CN103400108A (en) * 2013-07-10 2013-11-20 北京小米科技有限责任公司 Face identification method and device as well as mobile terminal
CN106210471A (en) * 2016-07-19 2016-12-07 成都百威讯科技有限责任公司 A kind of outdoor face recognition method and system
CN107506752A (en) * 2017-09-18 2017-12-22 艾普柯微电子(上海)有限公司 Face identification device and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338984A (en) * 2021-12-27 2022-04-12 深圳市海洋王铁路照明技术有限公司 Screen-off shooting method and device for work recorder, recorder and storage medium

Also Published As

Publication number Publication date
CN110226169A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
WO2019200578A1 (en) Electronic apparatus, and identity recognition method thereof
EP3401772B1 (en) Electronic device including a plurality of input devices and control method thereof
CN108881604B (en) Light intensity detection method and device and intelligent terminal
WO2018121428A1 (en) Living body detection method, apparatus, and storage medium
KR102357092B1 (en) Display-integrated user-classification, security and fingerprint system
CN107592419B (en) Display screen awakening method, device and mobile terminal based on fingerprint sensor
US20180032815A1 (en) Electronic device and method for iris authentication thereof
CN107408168B (en) Iris authentication method and apparatus using display information
WO2017156964A1 (en) Terminal unlocking method and terminal
CN208172794U (en) Electronic equipment
KR102488563B1 (en) Apparatus and Method for Processing Differential Beauty Effect
WO2019196909A1 (en) Fingerprint collection method and apparatus based on optical fingerprint technology, and user terminal
WO2019196075A1 (en) Electronic device and facial recognition method therefor
CN106062668B (en) Gesture equipment, for the operating method of gesture equipment and the vehicle including gesture equipment
US11380138B2 (en) Device and method for touchless palm print acquisition
WO2019196074A1 (en) Electronic device and facial recognition method therefor
CN106775538B (en) Electronic device and biometric method
KR20120139100A (en) Apparatus and method for security management using face recognition
WO2021219095A1 (en) Living body detection method, and related device
JP5529103B2 (en) Face direction detection method and information processing device
CN111684782B (en) Electronic device and control method thereof
CN113723144A (en) Face watching unlocking method and electronic equipment
CN111695509A (en) Identity authentication method, identity authentication device, machine readable medium and equipment
US9760177B1 (en) Color maps for object tracking
WO2019134094A1 (en) Electronic device and facial recognition method therefor

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: 18898340

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: 18898340

Country of ref document: EP

Kind code of ref document: A1