CN109241832B - Face living body detection method and terminal equipment - Google Patents

Face living body detection method and terminal equipment Download PDF

Info

Publication number
CN109241832B
CN109241832B CN201810835236.5A CN201810835236A CN109241832B CN 109241832 B CN109241832 B CN 109241832B CN 201810835236 A CN201810835236 A CN 201810835236A CN 109241832 B CN109241832 B CN 109241832B
Authority
CN
China
Prior art keywords
image
living body
face
camera
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810835236.5A
Other languages
Chinese (zh)
Other versions
CN109241832A (en
Inventor
王国刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810835236.5A priority Critical patent/CN109241832B/en
Publication of CN109241832A publication Critical patent/CN109241832A/en
Application granted granted Critical
Publication of CN109241832B publication Critical patent/CN109241832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • G06Q20/40145Biometric identity checks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/66Substation equipment, e.g. for use by subscribers with means for preventing unauthorised or fraudulent calling
    • H04M1/667Preventing unauthorised calls from a telephone set
    • H04M1/67Preventing unauthorised calls from a telephone set by electronic means

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Signal Processing (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention provides a face living body detection method and terminal equipment, relates to the technical field of communication, and aims to solve the problem that when an existing terminal is used for face recognition by using a single camera, the recognition accuracy of the face recognition is low. The method is applied to a terminal device which comprises a camera with adjustable height. The method comprises the following steps: acquiring a first image acquired by a camera at a first height position and a second image acquired at a second height position; the first image and the second image both comprise a face image of a target face object; acquiring parallax information between a first image and a second image; and determining whether the target human face object is a living body according to the parallax information.

Description

Face living body detection method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a face living body detection method and terminal equipment.
Background
With the continuous development of terminal technology, the frequency of using terminal devices (e.g., smart phones, tablet computers, etc.) by users is higher and higher, and the dependence of people on the terminal devices is also enhanced. Taking a mobile phone as an example, due to the convenience brought by face unlocking, many mobile phones have a face unlocking function at present, so that face recognition can be performed by using a front camera of the mobile phone, and the mobile phone is automatically unlocked when the current user is recognized as a mobile phone owner.
Because the cost of the depth camera is higher, most of the front cameras of the mobile phones are still single cameras at present. However, when face recognition is performed using a single camera, the mobile phone cannot recognize a difference between a user's real person and a user's photograph (e.g., a print photograph or an image displayed by a display device), thereby causing a problem in that the recognition accuracy of face recognition is low.
Disclosure of Invention
The embodiment of the invention provides a face living body detection method and terminal equipment, which are used for solving the problem that the recognition accuracy of face recognition is low when a single camera is used for face recognition in the conventional terminal.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, a method for detecting a living human face is provided, and is applied to a terminal device, where the terminal device includes a camera with an adjustable height, and the method includes:
acquiring a first image acquired by the camera at a first height position and a second image acquired by the camera at a second height position; wherein the first image and the second image both comprise a face image of a target face object;
acquiring parallax information between the first image and the second image;
and determining whether the target human face object is a living body according to the parallax information.
In a second aspect, an embodiment of the present invention further provides a terminal device, including:
the acquisition module is used for acquiring a first image acquired by the camera at a first height position and a second image acquired at a second height position; wherein the first image and the second image both comprise a face image of a target face object;
the acquisition module is further configured to acquire parallax information between the first image and the second image;
and the determining module is used for determining whether the target face object is a living body according to the parallax information obtained by the obtaining module.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and operable on the processor, and when executed by the processor, the computer program implements the steps of the method for detecting a living human face according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for detecting a living human face according to the first aspect.
In the embodiment of the invention, because the height of the camera in the embodiment of the invention is adjustable, the embodiment of the invention performs living body detection on the target face object corresponding to the face image in the image by means of the parallax between the images acquired by the camera at different height positions and by utilizing the parallax information between the images acquired by the camera at different height positions, thereby accurately distinguishing whether the identified face object is a real person, improving the accuracy of face identification and further improving the reliability and safety of face unlocking.
Drawings
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a corresponding relationship between depth and parallax applied in a method for detecting a living human face according to an embodiment of the present invention;
fig. 3 is a second schematic diagram illustrating a corresponding relationship between depth and parallax applied in the method for detecting a living human face according to the embodiment of the present invention;
FIG. 4 is a flowchart of a method for detecting a living human face according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 6 is a second schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the embodiments of the present invention, "a plurality" means two or more than two.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion. In the embodiments of the present application, "of", "corresponding" and "corresponding" may be sometimes used in combination, and it should be noted that the intended meaning is consistent when the difference is not emphasized.
It should be noted that, in the embodiment of the present invention, for convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same function or action, and those skilled in the art may understand that the words such as "first" and "second" do not limit the quantity and execution order.
The terminal device in the embodiment of the invention can be a mobile terminal device and can also be a non-mobile terminal device. The mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc.; the non-mobile terminal device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, or the like; the embodiments of the present invention are not particularly limited.
In the embodiment of the invention, the terminal equipment comprises the camera with adjustable height, so that the terminal equipment can simulate the angle difference of human eyes by utilizing images collected by the camera at different height positions, thereby achieving the effect of three-dimensional imaging or depth of field detection. The camera in the present application may be a common monocular camera. It should be noted that the camera in the embodiment of the present invention is adjustable only in height position, and its horizontal position is not changed, for example, the camera can be popped up, and the camera is usually arranged on the top of the terminal device, and can be popped up from the top of the terminal device when in use.
The execution subject of the method for detecting the living human face provided by the embodiment of the present invention may be the terminal device (including a mobile terminal device and a non-mobile terminal device), or may also be a functional module and/or a functional entity capable of implementing the method for detecting the living human face in the terminal device, which may be determined specifically according to actual use requirements, and the embodiment of the present invention is not limited. The following takes a terminal device as an example to exemplarily describe the method for detecting the living human face provided by the embodiment of the present invention.
The parallax information mentioned in the embodiments of the present invention includes a parallax value, where the parallax value is a difference between two abscissa coordinates of the same pixel point in two images obtained when the target human face object is photographed at different height positions by the camera, that is, the parallax value of the pixel point, and correspondingly, the parallax values of all the pixel points in the two images form a parallax map.
The terminal in the embodiment of the present invention may be a terminal having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment applied to the method for detecting a living human face according to the embodiment of the present invention, by taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the method for detecting a living human face provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the method for detecting a living human face may operate based on the android operating system shown in fig. 1. Namely, the processor or the terminal device can realize the method for detecting the living human face provided by the embodiment of the invention by running the software program in an android operating system.
The method for detecting a living human face according to the embodiment of the present invention is described below with reference to a flowchart of the method for detecting a living human face shown in fig. 4, and as shown in fig. 4, the method for detecting a living human face according to the embodiment of the present invention includes steps 201 to 203:
step 201: the terminal equipment acquires a first image acquired by the camera at a first height position and a second image acquired at a second height position.
The first image and the second image both comprise a face image of a target face object.
In the embodiment of the invention, after receiving the first input, the terminal device controls the camera to acquire the first image at the first height position and acquire the second image at the second height position. Illustratively, taking a pop-up camera as an example, when the terminal device triggers face recognition, the pop-up camera gradually pops up, and in the process of popping up the camera, the camera acquires a first image, and when the camera pops up to a specific height, the camera is controlled to acquire a second image again.
In the embodiment of the invention, when receiving a detection request for triggering the terminal device to perform human face living body detection, the terminal device controls the camera to acquire a first image at a first height position and acquire a second image at a second height position. For example, the detection request may be specifically triggered by the following operations, for example: the method includes the steps that when a user unlocks an unlocking interface, a face recognition operation is triggered (for example, the face recognition operation is triggered in a state that the terminal device is turned off), when the user starts a certain application program, the face recognition operation is triggered (for example, the face recognition operation is triggered when the user pays on a payment interface), and the like.
Optionally, in an embodiment of the present invention, a height difference between the first height position and the second height position is greater than or equal to a target height. The larger the height difference is, the higher the detection accuracy is.
Step 202: the terminal equipment acquires parallax information between the first image and the second image.
Optionally, in an embodiment of the present invention, the disparity information may be image information of a disparity map of the first image and the second image.
Optionally, in the embodiment of the present invention, the terminal device may obtain parallax information between the first image and the second image by performing stereo matching on the first image and the second image. For example, the above-mentioned obtaining, by the terminal device, disparity information between the first image and the second image specifically includes: and the terminal equipment performs stereo matching on the first image and the second image to obtain a parallax value of each pixel point in the two images.
Before the terminal device performs stereo matching on the first image and the second image, the terminal device may reduce the size of the first image and the second image to reduce the amount of calculation when performing stereo matching on the images. For example, the size of the original image may be 6M, and the size may be reduced to 2M, or the size of the image may be reduced as a whole.
In the embodiment of the invention, because the images shot by the camera during the moving process have relative movement between the camera and the target human face object, a certain parallax relation of human face depth exists between the images shot by the camera during the moving process aiming at a real person (namely when the target human face object is a living body), and the parallax relation of the human face depth does not exist in the images shot by the camera aiming at the photos. Therefore, the embodiment of the invention performs the human face living body detection by acquiring the parallax information between the images acquired by the camera at different height positions aiming at the target human face object.
Referring to the schematic diagrams of the correspondence between parallax and depth shown in fig. 2 and 3, if O1 is the position of the camera at the first height position, O2 is the position of the camera at the second height position, f is used to indicate the focal length of the camera, and B indicates the height difference between the first height position and the second height position, specifically:
for example, assume that the camera views the same pixel point P (x) of the spatial object at the first elevation position and the second elevation positionc,yc,zc),zcGenerally, the depth of the pixel point can be regarded as the depth of the pixel point, and is used for representing the distance between the pixel point and a plane where the first height position and the second height position are located, and the camera acquires images (namely a first image and a second image) of the pixel point P at the first height position and the second height position respectively, wherein the projection points of the pixel point P on the first image and the second image are P1(X1,Y1) And P2(X2,Y2) Because the horizontal position of the camera does not change in the process of acquiring the first image and the second image, the Y coordinate of the pixel point P and the image coordinate P1And P2Has the same Y coordinate and the parallax value of the pixel point P is X1-X2
As can be seen from fig. 2 and 3, the parallax value and the depth of the pixel point are in an inverse relationship, and therefore, the depth information between the first image and the second image can be determined by acquiring the parallax information between the first image and the second image according to the embodiment of the present invention.
It should be noted that, because the camera in the present application captures images by adjusting the shooting height of the camera to simulate human eyes, the horizontal position of the camera in the present application changes, that is, the horizontal positions of the images captured by the camera at different height positions are the same, and are on the same vertical line and have a certain distance, so the parallax mentioned in the present application mainly refers to vertical parallax.
Optionally, in an embodiment of the present invention, the step 202 specifically includes the following steps:
step 202 a: and the terminal equipment performs stereo matching on the first image and the second image to obtain a disparity map between the first image and the second image.
The disparity information in step 202 is a disparity map.
Step 203: and the terminal equipment determines whether the target human face object is a living body according to the parallax information.
In the embodiment of the invention, after acquiring the parallax information between the images acquired by the camera at different height positions aiming at the target face object, the terminal equipment can acquire the depth information corresponding to the parallax information according to the corresponding relation between the parallax and the depth, and perform living body detection on the target face object according to the depth information, thereby accurately distinguishing whether the identified face object is a real person.
In addition, because the first image and the second image acquired by the embodiment of the invention are acquired by the same camera, double-camera calibration is not needed, and extra image effect adjustment is not needed.
In the embodiment of the invention, when the target face object is detected to be a living body object, the terminal device transmits the first image and/or the second image to a face recognition program in the terminal device, and performs face recognition on the first image and/or the second image, so as to recognize whether the target face object is the owner of the terminal device.
Optionally, in the embodiment of the present invention, when the disparity information is image information of a disparity map of a first image and a second image, the terminal device determines whether the target human face object is a living body according to the disparity map of the first image and the second image.
Optionally, in an embodiment of the present invention, the step 203 specifically includes the following steps:
step 203 a: and the terminal equipment acquires the depth information corresponding to the parallax information.
For example, the disparity information may be a disparity map between the first image and the second image, the corresponding depth information is a depth map corresponding to the disparity map, or may be a disparity value of each pixel in the first image and the second image, and the corresponding depth information is a depth value of each pixel.
Step 203b 1: and under the condition that the depth information is matched with the depth information of the preset human face living body, the terminal equipment determines that the target human face object is the living body.
Step 203b 2: and under the condition that the depth information is not matched with the depth information of the preset human face living body, the terminal equipment determines that the target human face object is a non-living body.
In an embodiment of the present invention, the depth information of the preset human face living body is one of the depth information of at least one preset human face living body stored in the depth information base. Further, the depth information of the preset human face living body may be depth information of a human face of an owner of the terminal device, and therefore, in a case that the depth information matches the depth information of the preset human face living body and a human face pattern in the first image or the second image matches the preset human face pattern, the human face unlocking may be directly performed.
Optionally, in an embodiment of the present invention, based on the step 202a, the step 203 specifically includes the following steps:
step 203c 1: the terminal equipment acquires a depth map of an image corresponding to a face area in a disparity map between the first image and the second image.
Step 203c 2: and the terminal equipment determines whether the target face object is a living body according to the depth map.
For example, after acquiring a disparity map between a first image and a second image, a terminal device may perform contour detection on the disparity map to determine a region where a target face is located in the disparity map, and then acquire a depth map of an image corresponding to the region where the target face is located according to a corresponding relationship between disparity and depth, so as to determine whether depth differences exist in five sense organs of the corresponding target face according to the depth map, that is, determine whether the corresponding target face is stereoscopic according to the depth map, and determine whether the target face object is a living object.
In addition, it should be noted that, when the terminal device performs the face living body detection, a camera in the terminal device may continuously perform height adjustment, so as to continuously acquire parallax information, thereby achieving the purpose of continuously performing the face living body detection. I.e. the process of step 201 to step 203 described above is repeated.
According to the method for detecting the living human face, which is provided by the embodiment of the invention, the living human face object corresponding to the human face image in the image is detected by means of the parallax between the images acquired by the camera with the adjustable height at different height positions and the parallax information between the images acquired by the camera at different height positions, so that whether the identified human face object is a real person or not is accurately distinguished, the accuracy of human face identification is improved, and the reliability and the safety of human face unlocking are further improved.
Fig. 5 is a schematic diagram of a possible structure of a terminal device according to an embodiment of the present invention, as shown in fig. 5, a terminal device 300 includes an obtaining module 301 and a determining module 302, where:
an obtaining module 301, configured to obtain a first image collected by a camera at a first height position and a second image collected by the camera at a second height position; the first image and the second image both comprise a face image of the target face object.
The obtaining module 301 is further configured to obtain disparity information between the first image and the second image.
A determining module 302, configured to determine whether the target face object is a living body according to the parallax information obtained by the obtaining module 301.
Optionally, the obtaining module 301 is specifically configured to: performing stereo matching on the first image and the second image to obtain a disparity map between the first image and the second image; the disparity information is the disparity map.
Optionally, the obtaining module 301 is specifically configured to: acquiring a depth map of an image corresponding to a face region in the disparity map; and determining whether the target face object is a living body according to the depth map.
Optionally, the determining module 302 is specifically configured to: acquiring depth information corresponding to the parallax information; under the condition that the depth information is matched with the depth information of a preset human face living body, determining that the target human face object is the living body; and under the condition that the depth information is not matched with the depth information of the preset human face living body, determining that the target human face object is a non-living body.
Optionally, a height difference between the first height position and the second height position is greater than or equal to the target height.
According to the terminal equipment provided by the embodiment of the invention, the parallax existing between the images acquired by the camera with adjustable height at different height positions in the terminal equipment is utilized, and the parallax information between the images acquired by the camera at different height positions is utilized to carry out living body detection on the target human face object corresponding to the human face image in the image, so that whether the identified human face object is a real person or not is accurately distinguished, the accuracy of human face identification is improved, and the reliability and the safety of human face unlocking are further improved.
The terminal device provided by the embodiment of the present invention can implement each process implemented by the terminal device in the above method embodiments, and is not described here again to avoid repetition.
Fig. 6 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where the terminal device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the configuration of the terminal device 100 shown in fig. 6 does not constitute a limitation of the terminal device, and that the terminal device 100 may include more or less components than those shown, or combine some components, or arrange different components. In the embodiment of the present invention, the terminal device 100 includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 110 is configured to acquire a first image acquired by the camera at a first height position and a second image acquired at a second height position; the first image and the second image both comprise a face image of the target face object, and are used for acquiring parallax information between the first image and the second image and determining whether the target face object is a living body according to the parallax information.
According to the terminal equipment provided by the embodiment of the invention, the parallax existing between the images acquired by the camera with adjustable height at different height positions in the terminal equipment is utilized, and the parallax information between the images acquired by the camera at different height positions is utilized to carry out living body detection on the target human face object corresponding to the human face image in the image, so that whether the identified human face object is a real person or not is accurately distinguished, the accuracy of human face identification is improved, and the reliability and the safety of human face unlocking are further improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The terminal device 100 provides the user with wireless broadband internet access via the network module 102, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the terminal device 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device 100. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 6, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the terminal device 100, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the terminal device 100, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the terminal apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 100 or may be used to transmit data between the terminal apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the terminal device 100, connects various parts of the entire terminal device 100 by various interfaces and lines, and performs various functions of the terminal device 100 and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal device 100. Processor 110 may include one or more processing units; alternatively, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal device 100 may further include a power supply 111 (such as a battery) for supplying power to each component, and optionally, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 100 includes some functional modules that are not shown, and are not described in detail here.
Optionally, an embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor 110, where the computer program, when executed by the processor, implements each process of the above method for detecting a living human face, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for detecting a living human face, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A method for detecting a living human face is applied to a terminal device, the terminal device comprises a camera with adjustable height, and the method comprises the following steps:
acquiring a first image acquired by the camera at a first height position and a second image acquired by the camera at a second height position; wherein the first image and the second image both comprise a face image of a target face object;
acquiring parallax information between the first image and the second image;
determining whether the target face object is a living body according to the parallax information;
wherein the determining whether the target face object is a living body according to the parallax information includes:
acquiring depth information corresponding to the parallax information;
determining the target face object as a living body under the condition that the depth information is matched with the depth information of a preset face living body;
determining the target face object as a non-living body under the condition that the depth information is not matched with the depth information of a preset face living body;
the acquiring parallax information between the first image and the second image includes:
reducing the sizes of the first image and the second image, and performing stereo matching to obtain a disparity map between the first image and the second image;
wherein the disparity information is the disparity map; the height difference between the first height position and the second height position is greater than or equal to a target height.
2. The method according to claim 1, wherein the determining whether the target human face object is a living body according to the parallax information comprises:
acquiring a depth map of an image corresponding to a face region in the disparity map;
and determining whether the target face object is a living body according to the depth map.
3. The terminal equipment is characterized by comprising a camera with adjustable height and further comprising:
the acquisition module is used for acquiring a first image acquired by the camera at a first height position and a second image acquired at a second height position; wherein the first image and the second image both comprise a face image of a target face object;
the acquisition module is further configured to acquire parallax information between the first image and the second image;
the determining module is used for determining whether the target face object is a living body according to the parallax information obtained by the obtaining module;
wherein the determining module is specifically configured to:
acquiring depth information corresponding to the parallax information;
determining the target face object as a living body under the condition that the depth information is matched with the depth information of a preset face living body;
determining the target face object as a non-living body under the condition that the depth information is not matched with the depth information of a preset face living body;
the acquisition module is specifically configured to: reducing the sizes of the first image and the second image, and performing stereo matching to obtain a disparity map between the first image and the second image;
wherein the disparity information is the disparity map; the height difference between the first height position and the second height position is greater than or equal to a target height.
4. The terminal device of claim 3, wherein the obtaining module is specifically configured to:
acquiring a depth map of an image corresponding to a face region in the disparity map;
and determining whether the target face object is a living body according to the depth map.
5. A terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of living human face detection according to any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the steps of the method of living human face detection according to any one of claims 1 to 2.
CN201810835236.5A 2018-07-26 2018-07-26 Face living body detection method and terminal equipment Active CN109241832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810835236.5A CN109241832B (en) 2018-07-26 2018-07-26 Face living body detection method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810835236.5A CN109241832B (en) 2018-07-26 2018-07-26 Face living body detection method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109241832A CN109241832A (en) 2019-01-18
CN109241832B true CN109241832B (en) 2021-03-30

Family

ID=65072534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810835236.5A Active CN109241832B (en) 2018-07-26 2018-07-26 Face living body detection method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109241832B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723626B (en) * 2019-03-22 2024-05-07 北京地平线机器人技术研发有限公司 Method, device and electronic equipment for living body detection
CN110175522A (en) * 2019-04-24 2019-08-27 深圳智慧林网络科技有限公司 Work attendance method, system and Related product
CN110728204B (en) * 2019-09-23 2024-01-02 维沃移动通信(杭州)有限公司 Face recognition method and terminal equipment
CN113128258B (en) * 2019-12-30 2022-10-04 杭州海康威视数字技术股份有限公司 Living body detection method, living body detection device, electronic apparatus, and storage medium
CN112926464B (en) * 2021-03-01 2023-08-29 创新奇智(重庆)科技有限公司 Face living body detection method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512637A (en) * 2015-12-22 2016-04-20 联想(北京)有限公司 Image processing method and electric device
CN106599826A (en) * 2016-12-09 2017-04-26 杭州宇泛智能科技有限公司 Face 3D reconstruction method based on near-infrared light
CN107590430A (en) * 2017-07-26 2018-01-16 百度在线网络技术(北京)有限公司 Biopsy method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6344638B2 (en) * 2013-03-06 2018-06-20 株式会社リコー Object detection apparatus, mobile device control system, and object detection program
JP5959073B2 (en) * 2014-09-30 2016-08-02 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Detection device, detection method, and program
CN105023010B (en) * 2015-08-17 2018-11-06 中国科学院半导体研究所 A kind of human face in-vivo detection method and system
CN105205458A (en) * 2015-09-16 2015-12-30 北京邮电大学 Human face living detection method, device and system
CN107480500B (en) * 2017-08-11 2021-04-27 维沃移动通信有限公司 Face verification method and mobile terminal
CN108259727A (en) * 2018-03-21 2018-07-06 维沃移动通信有限公司 A kind of depth image generation method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512637A (en) * 2015-12-22 2016-04-20 联想(北京)有限公司 Image processing method and electric device
CN106599826A (en) * 2016-12-09 2017-04-26 杭州宇泛智能科技有限公司 Face 3D reconstruction method based on near-infrared light
CN107590430A (en) * 2017-07-26 2018-01-16 百度在线网络技术(北京)有限公司 Biopsy method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于双目视觉的AGV障碍物检测与避障;王铮等;《计算机集成制造系统》;20180228;第24卷(第2期);400-409页 *

Also Published As

Publication number Publication date
CN109241832A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109241832B (en) Face living body detection method and terminal equipment
CN110913132B (en) Object tracking method and electronic equipment
CN109743498B (en) Shooting parameter adjusting method and terminal equipment
CN109348020B (en) Photographing method and mobile terminal
CN110505400B (en) Preview image display adjustment method and terminal
CN107730460B (en) Image processing method and mobile terminal
CN111031234B (en) Image processing method and electronic equipment
CN109246351B (en) Composition method and terminal equipment
CN109544445B (en) Image processing method and device and mobile terminal
CN108174110B (en) Photographing method and flexible screen terminal
CN108881721B (en) Display method and terminal
WO2019137535A1 (en) Object distance measurement method and terminal device
CN111401463A (en) Method for outputting detection result, electronic device, and medium
CN110602390B (en) Image processing method and electronic equipment
CN110555815B (en) Image processing method and electronic equipment
CN109104573B (en) Method for determining focusing point and terminal equipment
CN109859718B (en) Screen brightness adjusting method and terminal equipment
CN108833791B (en) Shooting method and device
CN110933307A (en) Electronic equipment and image processing method
CN110944112A (en) Image processing method and electronic equipment
WO2021136181A1 (en) Image processing method and electronic device
CN111432122B (en) Image processing method and electronic equipment
CN110913133B (en) Shooting method and electronic equipment
CN110769162B (en) Electronic equipment and focusing method
CN109359460B (en) Face recognition method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant