WO2019148968A1 - 移动终端、人脸解锁方法及相关产品 - Google Patents

移动终端、人脸解锁方法及相关产品 Download PDF

Info

Publication number
WO2019148968A1
WO2019148968A1 PCT/CN2018/120092 CN2018120092W WO2019148968A1 WO 2019148968 A1 WO2019148968 A1 WO 2019148968A1 CN 2018120092 W CN2018120092 W CN 2018120092W WO 2019148968 A1 WO2019148968 A1 WO 2019148968A1
Authority
WO
WIPO (PCT)
Prior art keywords
face image
image
focal length
face
front camera
Prior art date
Application number
PCT/CN2018/120092
Other languages
English (en)
French (fr)
Inventor
王健
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019148968A1 publication Critical patent/WO2019148968A1/zh

Links

Images

Classifications

    • 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
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/17Image acquisition using hand-held instruments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • 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/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • 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

Definitions

  • the present invention relates to the field of mobile terminal technologies, and in particular, to a mobile terminal, a method for unlocking a face, and related products.
  • mobile terminals such as smart phones
  • mobile terminals can support more and more applications, and their functions are becoming more and more powerful.
  • Smartphones are becoming more and more indispensable in the life of users. electronics.
  • mobile terminals mostly adopt a biological information unlocking scheme.
  • face recognition there are cases where face recognition and stealing of important information are performed by using illegal means such as photos and videos, and how to identify other people whose face images are real users. Face images are still false face images such as photos, which is an urgent problem to be solved in face recognition.
  • the embodiments of the present invention provide a mobile terminal, a method for unlocking a face, and related products, so as to improve the intelligence, security, and unlocking success rate of the mobile terminal, and improve the convenience and effectiveness of real face image detection.
  • an embodiment of the present invention provides a mobile terminal, including a processor, a front camera and a memory connected to the processor, where:
  • the front camera is configured to adjust a focal length to obtain a first face image
  • the memory is configured to store a preset face image template
  • the processor configured to acquire at least one second face image according to the first face image; and configured to detect, when the at least one second face image is the face image, a real person In the face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed.
  • an embodiment of the present invention provides a method for unlocking a face, including:
  • the face image is detected as a real face image by the at least one second face image
  • the first face image and the preset face image template are successfully matched, and an unlocking operation is performed.
  • an embodiment of the present invention provides a face unlocking device, including an acquiring unit and an unlocking unit, where:
  • the acquiring unit is configured to adjust a focal length of the front camera to acquire a first face image, and to acquire at least one second face image according to the first face image;
  • the unlocking unit is configured to: when the at least one second face image acquired by the acquiring unit detects that the face image is a real face image, the first acquired by the acquiring unit The face image is successfully matched with the preset face image template, and the unlocking operation is performed.
  • an embodiment of the present invention provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured by the foregoing processing. Executed, the above program includes instructions for performing the steps in any of the methods of the second aspect of the embodiments of the present invention.
  • an embodiment of the present invention provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the embodiment of the present invention.
  • the computer comprises a mobile terminal.
  • an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to perform the implementation of the present invention Some or all of the steps described in any of the methods of the second aspect.
  • the computer program product can be a software installation package, and the computer includes a mobile terminal.
  • FIG. 1 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
  • FIG. 2A is a schematic flowchart of a method for unlocking a face according to an embodiment of the present invention
  • 2B is a schematic diagram showing texture characteristics of a partial image of a face according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of another method for unlocking a face according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart diagram of another method for unlocking a face according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 6 is a block diagram showing the functional units of a face unlocking device according to an embodiment of the present invention.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the mobile terminal involved in the embodiments of the present invention may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user equipment (User Equipment, UE), mobile station (MS), terminal device, and the like.
  • UE User Equipment
  • MS mobile station
  • terminal device and the like.
  • the devices mentioned above are collectively referred to as mobile terminals.
  • FIG. 1 is a schematic structural diagram of a mobile terminal 100.
  • the mobile terminal 100 includes a housing 110 , a touch display screen 120 , and a motherboard 130 .
  • the motherboard 140 is provided with a processor 140 . , the memory 150 and the front camera 160, etc., wherein
  • the front camera 160 is configured to adjust a focal length to obtain a first face image
  • the memory 150 is configured to store a preset face image template
  • the processor 140 is configured to acquire at least one second face image according to the first face image, and to detect that the face image is true by using the at least one second face image In the face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed.
  • the touch display screen 120 includes a display driving circuit, a display screen and a touch screen, and the display driving circuit is configured to control the display screen according to display data and display parameters of the screen (eg, brightness, color, saturation) And displaying the content, the touch screen is used for detecting a touch operation, and the display screen is an organic light emitting diode display OLED.
  • the display driving circuit is configured to control the display screen according to display data and display parameters of the screen (eg, brightness, color, saturation) And displaying the content, the touch screen is used for detecting a touch operation, and the display screen is an organic light emitting diode display OLED.
  • the shape and size of the main board 130 may be any size and shape that the mobile terminal can accommodate, and is not limited herein.
  • the processor 140 is a control center of the mobile terminal, and connects various parts of the entire mobile terminal by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 150, and calling and storing in the memory 150.
  • the data performing various functions of the mobile terminal and processing data, thereby performing overall monitoring of the mobile terminal.
  • the processor 140 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes the wireless communication. It can be understood that the above modem processor may not be integrated into the processor 140.
  • the memory 150 can be used to store software programs and modules, and the processor 140 executes various functional applications and data processing of the mobile terminal by running software programs and modules stored in the memory 150.
  • the memory 150 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the mobile terminal, and the like.
  • memory 150 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the processor in the obtaining the at least one second face image according to the first facial image, is specifically configured to: when the number of pixels in the first facial image is When less than the preset threshold, increasing the focal length of the front camera as the target focal length; and acquiring the at least one second face image by using the target focal length by the front camera.
  • the processor 140 is specifically configured to: enlarge the preview image by using at least one pixel point in the preview image as a center point a face image in which the area of the face image in the preview image is the same as the target area, the target area being the focus of at least one pixel point in the preview image, and the focal length is the target focal length Preview the area of the face image in the image.
  • the processor 140 is specifically configured to: when the at least one second facial image is acquired according to the first facial image, when the pixel is in the first facial image When the number is greater than or equal to the preset threshold, the first face image is enlarged with the at least one pixel in the first face image as a center point; and is used on the enlarged first face image Obtaining the at least one second face image.
  • the front camera 160 is specifically configured to: adjust a focal length of the front camera by simulating a zoom operation of the image by the user's hands to determine the focal length of the first face image. a plurality of reference focal lengths when the face image is located in a central area of the preview interface in the preview image; and a maximum face image in the face image corresponding to the plurality of reference focal lengths is the first face image.
  • the processor 140 is specifically configured to: acquire the at least one piece, in the detecting, by the at least one second face image, that the face image is a real face image.
  • the texture feature information of the second face image and for determining that the face image is a real face image when the texture feature information is detected to match the texture feature information preset in the memory 150.
  • FIG. 2A is a schematic flowchart of a method for unlocking a face, which is applied to a mobile terminal. As shown in the figure, the method for unlocking a face includes:
  • the mobile terminal adjusts a focal length of the front camera to obtain a first face image
  • the first facial image is a complete facial image, that is, an image including all parts of the human face.
  • the manner in which the mobile terminal adjusts the front camera may be various, for example, may be adjusted by a software program setting adjustment method, or may be added to a front camera to add hardware (for example, a stepping motor, etc.).
  • the focal length is adjusted and is not limited here.
  • the mobile terminal detects an event to be unlocked before the mobile terminal adjusts a focal length of the front camera to obtain a first face image.
  • the method for unlocking a face may be used for detecting, before the mobile terminal detects the event to be unlocked, the face image is first detected to determine whether the face image is a real face image, and whether the preset face is
  • the face image template matching can also be used for the mobile terminal user to perform the face recognition punching and signing by the mobile terminal, and the face image is detected before the face recognition, etc., and is not limited herein.
  • the event to be unlocked may be, for example, a mobile terminal desktop to be unlocked event, an application to be unlocked event, a file to be unlocked event, a payment to be unlocked event, and the like, which are not limited herein.
  • the event to be unlocked by the desktop is an event to be unlocked by the pointer to the lock screen desktop, and the event to be unlocked is a pending event of a specific operation of the application, such as application startup, application deletion, etc.
  • the file to be unlocked event is a pointer to the file.
  • the event to be unlocked, such as the event to be unlocked for the target file is an event to be unlocked, such as an event to be unlocked for the payment scenario of the application, such as Alipay, WeChat, and the like.
  • the event that the mobile terminal detects the to-be-locked event may be that the event to be unlocked is detected in the state of being in the off-screen state, or the event to be unlocked is detected in the state of the bright-screen state, and the triggering condition for detecting the event to be unlocked may be touched by the user.
  • the control operation, the pressing operation, the voice operation and the like triggering, for example, the mobile terminal for the off-screen standby state, the long-pressing touch display can trigger the event to be unlocked, where the trigger condition is not limited.
  • the mobile terminal acquires at least one second facial image according to the first facial image.
  • the at least one second face image may be one, or multiple, and when the face image is multiple, it may be multiple second face images of the same face region, or A plurality of second face images for different face regions are not limited herein.
  • the second face image is a partial face image of the user, for example, a face image of a cheek region on the right side of the face, or may be a face image of a face nose region, or may include a user face.
  • the face image and the like of the feature information area unique to the part are not limited herein.
  • the unique feature information may be characteristic information such as scars and red dragonflies.
  • the manner in which the mobile terminal acquires at least one second facial image according to the first facial image may be various, for example, when the first facial image has higher definition than the pre-preparation
  • the second face image can be obtained directly on the basis of the first face image by enlarging the first face image, or when the clarity of the first face image is lower than the preset definition
  • At least one second face image in the preview image may be acquired by adjusting the focal length by the camera application.
  • the manner in which the mobile terminal detects that the face image is a real face image by using the at least one second face image may be multiple, for example, may be determined by texture detection of a face.
  • the face image is a real face image, or when the face includes feature information unique to the user, such as a red dragonfly on the nose, whether the face image is determined by the second face image including the nose region.
  • the method for matching the first face image with the preset face image template is successful, and the specific implementation manner of performing the unlocking operation is to match the first face image with the preset face image template.
  • the unlocking operation is performed.
  • the success rate of the matching of the first face image and the preset face image template is that the success rate of the first face image and the preset face image template is greater than a preset success rate, and the preset success rate may be according to the Setting the sharpness of the first face image, for example, when the resolution of the first face image is high, the preset success rate is a first preset success rate, when the first face image When the resolution is low, the preset success rate is a second preset success rate, and the second preset success rate is greater than the first preset success rate.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the acquiring the at least one second facial image according to the first facial image includes:
  • the at least one second face image is acquired by the front camera using the target focal length.
  • the number of the pixels in the first face image is smaller than a preset threshold, that is, the size of the first face image is smaller than a preset size. For example, when the size of the first face image is 640*480p, If the second face image is directly acquired on the basis of the first face image by enlarging the first face image, the second face image may have fewer pixels, the face details may be lost, and the second person cannot be used.
  • the face image accurately determines whether the face image is a real face image, so the mobile terminal reacquires a local area of the face by adjusting the focal length of the camera, so that a second face image with more pixels is obtained, and more people are retained. Face detail.
  • the target focal length may be an arbitrary focal length after the face image is enlarged.
  • the target focal length may also be that after the face image is enlarged, the pixel area of the face partial area is more than the focal length of the preset pixel point.
  • the mobile terminal determines that the number of pixels in the first face image is less than a preset threshold
  • acquiring the second face image by actively increasing the focal length of the front camera is beneficial to the second face. More local details are preserved on the image, which further improves the accuracy of the subsequent operation of judging the real face, and is beneficial to improving the intelligence of the mobile terminal.
  • increasing the focal length of the front camera to a target focal length includes:
  • the preview image is a preview image of the front camera, and the specific implementation manner of increasing the focal length of the front camera as the target focal length is to increase the focal length by enlarging the face image in the preview image.
  • the center point is the center point of the local area of the face that needs to be acquired.
  • the mobile terminal realizes the increase of the focal length by enlarging the face image in the preview image, and the operation is simple, and the automatic enlargement of any designated area can be realized, thereby acquiring the image acquisition of the designated area, without requiring the user to manually
  • the operation is beneficial to improving the intelligence of the mobile terminal.
  • the acquiring the at least one second facial image according to the first facial image includes:
  • the first face image is enlarged with the at least one pixel in the first face image as a center point;
  • the number of the pixels in the first face image is greater than or equal to a preset threshold, that is, the size of the first face image is greater than a preset size, for example, the size of the first face image is 1920*1080p.
  • a preset threshold that is, the size of the first face image is greater than a preset size, for example, the size of the first face image is 1920*1080p.
  • the at least one pixel point is a center point, and the pixel point is also a center point of the second face image, which is a center point of the face area that the mobile terminal needs to acquire, for example, a face area that needs to be acquired is a nose Area, then the center point can be set to the pixel point where the tip of the nose is located.
  • the mobile terminal determines that the number of pixels in the first face image is greater than or equal to a preset threshold, the second face image having a sufficient number of pixels can be acquired by enlarging the first face image. It is beneficial to improve the convenience and speed of unlocking the face, and it is not necessary to start the camera device again, which is beneficial to reduce power consumption.
  • the adjusting the focal length of the front camera to obtain the first face image includes:
  • Adjusting a focal length of the front camera by simulating a zoom operation of the image by the user's hands, and determining a plurality of reference focal lengths when the face image in the preview image is located in a central area of the preview interface;
  • Obtaining a largest face image among the face images corresponding to the plurality of reference focal lengths is the first face image.
  • the process of gradually increasing the focal length can be realized, instead of directly converting from one focal length to another, which is advantageous for improving the accuracy of the focus adjustment.
  • the focal length is enlarged, so that the acquired face image is a complete face image, and the distance is When it is far away, the focal length is reduced, so that the acquired face image is the largest face image in the complete face image corresponding to multiple focal lengths.
  • the mobile terminal adjusts the focal length of the front camera by simulating the zoom operation of the image by the user's hands, and uses the software method instead of increasing the focus motor to achieve the focal length adjustment, which is beneficial to reducing hardware consumption and facilitating focus adjustment.
  • using the method to adjust the first face image acquired by the focal length improves the integrity and definition of the first face image, and is beneficial to enhancing the accuracy of face unlocking.
  • the detecting, by the at least one second face image, the face image is a real face image, including:
  • the face image is determined to be a real face image.
  • the texture feature is a visual feature that reflects the homogenous phenomenon in the image, and it embodies the surface structure organization property of the surface of the object having a slow change or a periodic change, as shown in FIG. 2B, because the second face image is a person The face is partially enlarged, so it is possible to determine whether the face is a real face based on the unique texture features that are difficult to imitate.
  • the texture feature information is matched with the preset texture feature information, and the texture feature information of all the second face images is matched with the preset texture feature information.
  • the mobile terminal analyzes the texture feature information of the second face image including the enlarged local face image by analyzing the texture feature unique to the face skin, and determines whether the face is a real face, which is beneficial to the mobile terminal. It improves the convenience of living body detection, and because the complexity and fineness of the texture features of the face are not easily copied, it is beneficial to improve the accuracy of the living body detection.
  • FIG. 3 is a schematic flowchart of a method for unlocking a face according to an embodiment of the present invention, which is applied to a mobile terminal. As shown in the figure, the method for unlocking the face includes:
  • the mobile terminal adjusts a focal length of the front camera to obtain a first face image.
  • the mobile terminal enlarges the face image in the preview image by using at least one pixel in the preview image as a center point.
  • the area of the face image in the preview image is the same as the target area, where the target area is the area of the face image in the preview image when the focal length is the target focal length .
  • the mobile terminal acquires at least one second facial image through the front camera.
  • the mobile terminal acquires texture feature information of the at least one second face image.
  • the mobile terminal determines that the face image is a real face image when detecting that the texture feature information matches the preset texture feature information.
  • the mobile terminal successfully matches the first face image and the preset face image template, and performs an unlocking operation.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the mobile terminal determines that the number of pixels in the first face image is less than a preset threshold
  • acquiring the second face image by actively increasing the focal length of the front camera is beneficial to retaining the second face image.
  • the local details are further improved for the subsequent operation of judging the real face, which is beneficial to improving the intelligence of the mobile terminal, and the focal length is enlarged by the method of enlarging the face image in the preview image, and the operation is simple.
  • the automatic enlargement of any designated area can be realized, and the image acquisition of the designated area can be obtained, and the manual operation of the user is not required, which is beneficial to improving the intelligence of the mobile terminal.
  • the mobile terminal analyzes the texture feature information of the second face image including the enlarged local face image by analyzing the texture feature unique to the face skin to determine whether the face is a real face, which is beneficial to improving the living body detection.
  • FIG. 4 is a schematic flowchart of a method for unlocking a face according to an embodiment of the present invention, which is applied to a mobile terminal. As shown in the figure, the method for unlocking the face includes:
  • the mobile terminal adjusts a focal length of the front camera by simulating a zoom operation of the image by the user, and determines a plurality of reference focal lengths when the face image in the preview image is located in a central area of the preview interface.
  • the mobile terminal acquires a largest facial image in the facial image corresponding to the plurality of reference focal lengths as a first facial image.
  • the mobile terminal When the number of the pixels in the first face image is greater than or equal to a preset threshold, the mobile terminal enlarges the first person by using at least one pixel in the first face image as a center point. Face image.
  • the mobile terminal acquires at least one second facial image on the enlarged first facial image.
  • the mobile terminal acquires texture feature information of the at least one second face image.
  • the mobile terminal determines that the face image is a real face image when detecting that the texture feature information matches the preset texture feature information.
  • the mobile terminal successfully matches the first face image and the preset face image template, and performs an unlocking operation.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the mobile terminal adjusts the focal length of the front camera by simulating the zoom operation of the image by the user's hands, and uses the software method instead of increasing the focus motor to realize the adjustment of the focal length, which is beneficial to reducing hardware consumption and facilitating focus adjustment, and further, using The method adjusts the first face image acquired by the focal length, improves the integrity and definition of the first face image, and is beneficial to enhancing the accuracy of the face detection.
  • the mobile terminal determines that the number of pixels in the first face image is greater than or equal to a preset threshold
  • the second face image having a sufficient number of pixels can be obtained by enlarging the first face image, which is beneficial to improving
  • the convenience and speed of unlocking the face eliminates the need to activate the camera device again, which helps to reduce power consumption.
  • FIG. 5 is a schematic structural diagram of a mobile terminal 500 according to an embodiment of the present invention. As shown in the figure, the mobile terminal 500 is shown in the figure.
  • the face image is detected as a real face image by the at least one second face image
  • the first face image and the preset face image template are successfully matched, and an unlocking operation is performed.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the instruction in the above program 540 is specifically configured to perform the following steps: when the first facial image Increasing a focal length of the front camera to a target focal length when the number of the pixels is less than a preset threshold; and acquiring the at least one second face image by using the target focal length by the front camera.
  • the instruction in the above procedure 540 is specifically for performing the following steps: zooming in on at least one pixel point in the preview image as a center point
  • the face image in the preview image is such that the area of the face image in the preview image is the same as the target area, wherein the target area is focused on at least one pixel in the preview image, and the focal length is the target The area of the face image in the preview image at the focal length.
  • the instruction in the above program 540 is specifically configured to perform the following steps: when the first facial image When the number of the pixel points is greater than or equal to the preset threshold, the first face image is enlarged with the at least one pixel point in the first face image as a center point; and the first image after being enlarged The at least one second face image is acquired on the face image.
  • the instructions in the above program 540 are specifically configured to perform the following steps: adjusting the front by simulating a zoom operation of the image by the user's hands. Setting a focal length of the camera, determining a plurality of reference focal lengths when the face image in the preview image is located in a central area of the preview interface; and acquiring a largest face image in the face image corresponding to the plurality of reference focal lengths Is the first face image.
  • the instruction in the foregoing program 540 is specifically configured to perform the following steps: Determining texture feature information of the at least one second face image; and determining that the face image is a real face image when the texture feature information is detected to match the preset texture feature information.
  • the mobile terminal includes corresponding hardware structures and/or software modules for performing various functions.
  • the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiment of the present invention may divide the functional unit into the mobile terminal according to the foregoing method example.
  • each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 6 is a block diagram showing the functional units of the face unlocking device 600 involved in the embodiment of the present application.
  • the face unlocking device 600 is applied to the mobile terminal, and the face unlocking device 600 includes: an acquiring unit 601 and an unlocking unit 602, where
  • the acquiring unit 601 is configured to adjust a focal length of the front camera to acquire a first face image, and to acquire at least one second face image according to the first face image;
  • the unlocking unit 602 is configured to: when the at least one second face image acquired by the acquiring unit 601 detects that the face image is a real face image, the acquiring unit 601 acquires The first face image is successfully matched with the preset face image template, and the unlocking operation is performed.
  • the mobile terminal first acquires the focal length of the front camera to obtain the first face image; secondly, obtains at least one second face image according to the first face image; When the face image is detected as a real face image by using the at least one second face image, the first face image and the preset face image template are successfully matched, and an unlocking operation is performed. It can be seen that the mobile terminal obtains a complete first face image by automatically adjusting the focal length of the front camera, which is beneficial to improving the intelligence of the mobile terminal and the sharpness of the first face image, and using the first face image for the face image.
  • Matching operation unlocking after successful matching, is beneficial to improving the security of the mobile terminal and the success rate of unlocking, and further acquiring at least one second face image including the partial area of the face on the basis of the first face image, so that Magnifying the local area of the face image, highlighting the local details of the face image, and detecting the face image as a real face image through local details, is conducive to improving the convenience and effectiveness of real face detection.
  • the acquiring unit 601 is specifically configured to: when the at least one second facial image is acquired according to the first facial image, when the pixel is in the first facial image When the number is less than a preset threshold, increasing a focal length of the front camera as a target focal length; and acquiring the at least one second face image by using the target focal length by the front camera.
  • the acquiring unit 601 is specifically configured to: enlarge the preview image by using at least one pixel point in the preview image as a center point a face image in which the area of the face image in the preview image is the same as the target area, the target area being the focus of at least one pixel point in the preview image, and the focal length is the target focal length Preview the area of the face image in the image.
  • the acquiring unit 601 is specifically configured to: when the at least one second facial image is acquired according to the first facial image, when the pixel is in the first facial image When the number is greater than or equal to the preset threshold, the first face image is enlarged with the at least one pixel in the first face image as a center point; and is used on the enlarged first face image Obtaining the at least one second face image.
  • the obtaining unit 601 is specifically configured to: adjust the focal length of the front camera by simulating a zoom operation of the image by the user's two hands. Determining, in the preview image, a plurality of reference focal lengths when the face image is located in a central area of the preview interface; and obtaining a face image that is the largest in the face image corresponding to the plurality of reference focal lengths A face image.
  • the unlocking unit 602 is specifically configured to: acquire the at least one piece, in the detecting, by the at least one second face image, that the face image is a real face image.
  • the texture feature information of the second face image and for determining that the face image is a real face image when the texture feature information is detected to match the preset texture feature information.
  • the obtaining unit 601 may be a front camera or may be a processor, and the unlocking unit 602 may be a processor.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to perform some or all of the steps of any of the methods described in the foregoing method embodiments.
  • the above computer includes a mobile terminal.
  • the embodiment of the present invention further provides a computer program product, the computer program product comprising a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause the computer to execute any one of the methods described in the foregoing method embodiments Part or all of the steps of the method.
  • the computer program product can be a software installation package, and the computer includes a mobile terminal.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described above as separate components may or may not be physically separated.
  • the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above-described integrated unit can be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present invention.
  • the foregoing memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk, and the like, which can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

一种移动终端、人脸解锁方法及相关产品,包括:调节前置摄像头的焦距获取第一人脸图像(S201);根据所述第一人脸图像获取至少一张第二人脸图像(S202);当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像匹配成功,执行解锁操作(S203)。所述方法有利于提升移动终端的智能性、安全性和解锁成功率,以及提升真实人脸图像检测的便捷性和有效性。

Description

移动终端、人脸解锁方法及相关产品 技术领域
本发明涉及移动终端技术领域,具体涉及一种移动终端、人脸解锁方法及相关产品。
背景技术
随着移动终端(例如智能手机)的大量普及应用,移动终端能够支持的应用越来越多,功能越来越强大,智能手机向着多样化、个性化的方向发展,成为用户生活中不可缺少的电子用品。
目前,移动终端多采用生物信息解锁方案,其中,在人脸识别中,会存在使用照片,视频等非法手段进行人脸识别并盗取重要信息的情况,如何辨别人脸图像是真实用户的人脸图像还是照片等虚假人脸图像,这成为人脸识别中急需解决的问题。
发明内容
本发明实施例提供了一种移动终端、人脸解锁方法及相关产品,以期提升移动终端的智能性、安全性和解锁成功率,以及提升真实人脸图像检测的便捷性和有效性。
第一方面,本发明实施例提供一种移动终端,包括处理器,连接所述处理器的前置摄像头和存储器,其中:
所述前置摄像头,用于调节焦距获取第一人脸图像;
所述存储器,用于存储预设人脸图像模板;
所述处理器,用于根据所述第一人脸图像获取至少一张第二人脸图像;以及用于当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
第二方面,本发明实施例提供一种人脸解锁方法,包括:
调节前置摄像头的焦距获取第一人脸图像;
根据所述第一人脸图像获取至少一张第二人脸图像;
当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
第三方面,本发明实施例提供一种人脸解锁装置,包括获取单元和解锁单元,其中:
所述获取单元,用于调节前置摄像头的焦距获取第一人脸图像;以及用于根据所述第一人脸图像获取至少一张第二人脸图像;
所述解锁单元,用于当通过所述获取单元获取的所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述获取单元获取的所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
第四方面,本发明实施例提供一种移动终端,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本发明实施例第二方面任一方法中的步骤的指令。
第五方面,本发明实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本发明实施例第二方面任一方法中所描述的部分或全部步骤,上述计算机包括移动终端。
第六方面,本发明实施例提供了一种计算机程序产品,其中,上述计算机程序产品包 括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本发明实施例第二方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种移动终端的结构示意图;
图2A是本发明实施例公开的一种人脸解锁方法的流程示意图;
图2B是本发明实施例公开的一种人脸局部图像的纹理特性示意图;
图3是本发明实施例公开的另一种人脸解锁方法的流程示意图;
图4是本发明实施例公开的另一种人脸解锁方法的流程示意图;
图5是本发明实施例公开的一种移动终端的结构示意图;
图6是本发明实施例公开的一种人脸解锁装置的功能单元组成框图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本发明实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为移动终端。
下面对本发明实施例进行详细介绍。
请参阅图1,图1是本发明实施例提供了一种移动终端100的结构示意图,该移动终端100包括:壳体110、触控显示屏120、主板130,主板130上设置有处理器140、存储器150和前置摄像头160等,其中,
所述前置摄像头160,用于调节焦距获取第一人脸图像;
所述存储器150,用于存储预设人脸图像模板;
所述处理器140,用于根据所述第一人脸图像获取至少一张第二人脸图像;以及用于当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人 脸图像与预设人脸图像模板匹配成功,执行解锁操作。
其中,所述触控显示屏120包括显示器驱动电路、显示屏和触控屏,所述显示器驱动电路用于控制所述显示屏根据画面的显示数据和显示参数(例如,亮度,颜色,饱和度等)进行内容显示,所述触控屏用于检测触控操作,所述显示屏为有机发光二极管显示屏OLED。
其中,所述主板130的形状大小可以为所述移动终端能够容纳的任意大小和形状,在此不做唯一限定。
其中,处理器140是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器150内的软件程序和/或模块,以及调用存储在存储器150内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器140可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器140中。
其中,存储器150可用于存储软件程序以及模块,处理器140通过运行存储在存储器150的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。存储器150可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据移动终端的使用所创建的数据等。此外,存储器150可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
可以看出,本发明实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述处理器具体用于:当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;以及用于通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
在这个可能的示例中,在所述增大所述前置摄像头的焦距为目标焦距方面,所述处理器140具体用于:以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述处理器140具体用于:当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;以及用于在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
在一个可能的示例中,在所述调节焦距获取第一人脸图像方面,所述前置摄像头160具体用于:通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;以及用于获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
在一个可能的示例中,在所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像方面,所述处理器140具体用于:获取所述至少一张第二人脸图像的纹理特征信息;以及用于当检测出所述纹理特征信息与所述存储器150中预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
请参阅图2A,图2A是本发明实施例提供了一种人脸解锁方法的流程示意图,应用于移动终端,如图所示,本人脸解锁方法包括:
S201,移动终端调节前置摄像头的焦距获取第一人脸图像;
其中,所述第一人脸图像为完整人脸图像,即为包括人脸所有部位的图像。
其中,所述移动终端调节前置摄像头的方式可以是多种多样的,例如可以是通过软件程序设置调节方法对焦距进行调节,或者可以是在前置摄像头添加硬件(例如步进马达等)对焦距进行调节,在此不做唯一限定。
其中,所述移动终端调节前置摄像头的焦距获取第一人脸图像之前,所述述移动终端检测到待解锁事件。
其中,该人脸解锁方法可以用于移动终端检测到待解锁事件进行人脸识别之前,首先对人脸图像进行检测,以确定上述人脸图像是否为真实人脸图像,而且是否与预设人脸图像模板匹配,也可以用于移动终端用户通过移动终端进行人脸识别打卡签到时,在人脸识别之前对人脸图像进行检测等,在此不做唯一限定。
其中,待解锁事件例如可以是移动终端桌面待解锁事件、应用待解锁事件、文件待解锁事件、支付待解锁事件等,此处不做限定。其中,桌面待解锁事件是指针对锁屏桌面的待解锁事件、应用待解锁事件是指针对应用的特定操作的待解锁事件,如应用启动、应用删除等,文件待解锁事件是指针对文件的待解锁事件,如针对目标文件的待解锁事件,支付待解锁事件是指针对支付场景的待解锁事件,如针对支付宝,微信等应用的支付场景的待解锁事件。
其中,移动终端检测到待解锁事件可以是在熄屏状态下检测到待解锁事件,也可以是在亮屏状态下检测到待解锁事件,上述检测到待解锁事件的触发条件可以由用户的触控操作、按压操作、语音操作等触发,如针对熄屏待机状态的移动终端,可以由长按触控显示屏触发待解锁事件,此处对触发条件不做限定。
S202,所述移动终端根据所述第一人脸图像获取至少一张第二人脸图像;
其中,所述至少一张第二人脸图像可以为一张,或者为多张,当所述人脸图像为多张时,可以为同一人脸区域的多张第二人脸图像,也可以为不同人脸区域的多张第二人脸图像,在此不做限定。
其中,所述第二人脸图像为用户的部分人脸图像,例如可以是人脸右侧脸颊区域的人脸图像,或者可以是人脸鼻子区域的人脸图像,或者可以是包括用户人脸部位独有的特征信息区域的人脸图像等,在此不做唯一限定。
其中,独有的特征信息可以是疤痕,红痣等特征信息。
其中,所述移动终端根据所述第一人脸图像获取至少一张第二人脸图像的方式可以是多种多样的,举例而言,当所述第一人脸图像的清晰度高于预设清晰度时,可以通过放大第一人脸图像直接在第一人脸图像的基础上获取第二人脸图像,或者当所述第一人脸图像的清晰度低于预设清晰度时,可以通过相机应用重新通过调节焦距获取预览图像中的至少一张第二人脸图像。
S203,所述移动终端当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
其中,所述移动终端通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像的方式可以是多张多样的,举例而言,可以通过人脸的纹理检测确定人脸图像为真实人脸图像,或者当人脸包括用户独有的特征信息时,例如鼻子上的红痣,那么通过包括鼻子区域的所述第二人脸图像确定所述人脸图像是否为真实人脸图像,或者通过多张相同区域的第二人脸图像确定每张第二人脸图像是否有细微的生理变化来确定所述人脸图像是否为真实的人脸图像。
其中,所述将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作的具体实现方式是将所述第一人脸图像与预设人脸图像模板进行匹配,当所述第一人脸图像与预设人脸图像模板匹配成功时,执行解锁操作。
其中,所述第一人脸图像与预设人脸图像模板匹配成功为第一人脸图像与预设人脸图像模板匹配的成功率大于预设成功率,该预设成功率可以根据所述第一人脸图像的清晰度进行设定,例如,当所述第一人脸图像的清晰度高时,所述预设成功率为第一预设成功率,当所述第一人脸图像的清晰度低时,所述预设成功率为第二预设成功率,所述第二预设成功率大于所述第一预设成功率。
可以看出,本发明实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
在一个可能的示例中,所述根据所述第一人脸图像获取至少一张第二人脸图像,包括:
当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;
通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
其中,所述第一人脸图像中像素点的数量小于预设阈值,即所述第一人脸图像的大小小于预设大小,例如所述第一人脸图像的大小为640*480p时,若通过放大第一人脸图像直接在第一人脸图像的基础上获取所述第二人脸图像,会导致第二人脸图像的像素点较少,丢失人脸细节,无法使用第二人脸图像准确判断所述人脸图像是否为真实人脸图像,因此移动终端通过调节摄像头的焦距重新获取人脸的局部区域,使获取像素点较多的第二人脸图像,保留较多的人脸细节。
其中,所述目标焦距可以为放大人脸图像后的任意焦距,所述目标焦距也可以为放大人脸图像后,使人脸局部区域的像素点多于预设像素点的焦距。
可见,本示例中,移动终端在判断出第一人脸图像中像素点的数量小于预设阈值时,通过主动增大前置摄像头的焦距获取第二人脸图像,有利于在第二人脸图像上保留更多的局部细节,进一步为后续判断真实人脸的操作提升了准确性,有利于提升移动终端的智能性。
在这个可能的示例中,所述增大所述前置摄像头的焦距为目标焦距,包括:
以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
其中,所述预览图像为所述前置摄像头的预览图像,该增大前置摄像头焦距为目标焦距的具体实现方式为通过放大预览图像中的人脸图像实现焦距的增大。
其中,中心点为需要获取的人脸局部区域的中心点。
可见,本示例中,移动终端通过放大预览图像中的人脸图像的方法实现焦距的增大,操作简单,而且可以实现任意指定区域的自动放大,进而获取指定区域的图像获取,不需要用户手动操作,有利于提升移动终端的智能性。
在一个可能的示例中,所述根据所述第一人脸图像获取至少一张第二人脸图像,包括:
当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;
在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
其中,所述第一人脸图像中像素点的数量大于或者等于预设阈值,即所述第一人脸图像的大小大于预设大小,例如所述第一人脸图像的大小为1920*1080p时,直接通过放大第一人脸图像来获取第二人脸图像便可以获取足够的人脸图像像素点。
其中,所述至少一个像素点为中心点,该像素点同样为第二人脸图像的中心点,为所述移动终端需要获取的人脸区域的中心点,例如需要获取的人脸区域为鼻子区域,那么所述中心点可以设置为鼻尖所在的像素点。
可见,本示例中,移动终端在判断出第一人脸图像中像素点的数量大于或者等于预设阈值时,通过放大第一人脸图像便可以获取具有足够像素点数量的第二人脸图像,有利于提升人脸解锁的便捷性和速度,无需再次启动摄像头装置,有利于减少电量消耗。
在一个可能的示例中,所述调节前置摄像头的焦距获取第一人脸图像,包括:
通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;
获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
其中,通过模拟用户双手对图像的缩放操作调节前置摄像头的焦距,可以实现焦距的逐渐增大的过程,而不是从一个焦距直接转换为另一个焦距,有利于提升焦距调节的精确性。
其中,当所述人脸图像位于预览界面的中心区域时能够保证获取完整的人脸图像,当人距离较近时,放大焦距,使获取的人脸图像为完整的人脸图像,当人距离较远时,减小焦距,使获取的人脸图像为多个焦距对应的完整的人脸图像中的最大的人脸图像。
可见,本示例中,移动终端通过模拟用户双手对图像的缩放操作调节前置摄像头的焦距,利用软体的方法而不是增加对焦马达等硬件实现焦距的调节,有利于降低硬件消耗,便捷实现焦距调节,此外,使用该方法调节焦距获取的第一人脸图像,提升了第一人脸图像的完整性和清晰度,有利于增强人脸解锁的准确性。
在一个可能的示例中,所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像,包括:
获取所述至少一张第二人脸图像的纹理特征信息;
当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
其中,纹理特征是一种反映图像中同质现象的视觉特征,它体现了物体表面的具有缓慢变化或者周期性变化的表面结构组织排列属性,如图2B所示,由于第二人脸图像为人脸局部放大的图像,因此根据皮肤难以仿制的特有的纹理特征,可以判断出人脸是否为真实人脸。
其中,检测出所述纹理特征信息与预设的纹理特征信息匹配为所有第二人脸图像的纹 理特征信息均与所述预设的纹理特征信息匹配。
可见,本示例中,移动终端通过分析人脸皮肤特有的纹理特征,分析包括放大的局部人脸图像的第二人脸图像的纹理特征信息,来判断该人脸是否为真实人脸,有利于提升活体检测的便捷性,而且,由于人脸的纹理特征的复杂性和细小性不容易被仿制,有利于提升活体检测的准确性。
与上述图2A所示的实施例一致的,请参阅图3,图3是本发明实施例提供的一种人脸解锁方法的流程示意图,应用于移动终端。如图所示,本人脸解锁方法包括:
S301,移动终端调节前置摄像头的焦距获取第一人脸图像。
S302,当所述第一人脸图像中像素点的数量小于预设阈值时,所述移动终端以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为目标焦距时所述预览图像中所述人脸图像的区域。
S303,所述移动终端通过所述前置摄像头获取至少一张第二人脸图像。
S304,所述移动终端获取所述至少一张第二人脸图像的纹理特征信息。
S305,所述移动终端当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
S306,所述移动终端将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
可以看出,本发明实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
此外,移动终端在判断出第一人脸图像中像素点的数量小于预设阈值时,通过主动增大前置摄像头的焦距获取第二人脸图像,有利于在第二人脸图像上保留更多的局部细节,进一步为后续判断真实人脸的操作提升了准确性,有利于提升移动终端的智能性,而且,通过放大预览图像中的人脸图像的方法实现焦距的增大,操作简单,而且可以实现任意指定区域的自动放大,进而获取指定区域的图像获取,不需要用户手动操作,有利于提升移动终端的智能性。
此外,移动终端通过分析人脸皮肤特有的纹理特征,分析包括放大的局部人脸图像的第二人脸图像的纹理特征信息,来判断该人脸是否为真实人脸,有利于提升活体检测的便捷性,而且,由于人脸的纹理特征的复杂性和细小性不容易被仿制,有利于提升活体检测的准确性。
与上述图2A所示的实施例一致的,请参阅图4,图4是本发明实施例提供的一种人脸解锁方法的流程示意图,应用于移动终端。如图所示,本人脸解锁方法包括:
S401,移动终端通过模拟用户双手对图像的缩放操作调节前置摄像头的焦距,确定预览图像中人脸图像位于预览界面的中心区域时的多个参考焦距。
S402,所述移动终端获取所述多个参考焦距对应的人脸图像中最大的人脸图像为第一人脸图像。
S403,当所述第一人脸图像中像素点的数量大于或等于预设阈值时,所述移动终端以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像。
S404,所述移动终端在放大后的所述第一人脸图像上获取至少一张第二人脸图像。
S405,所述移动终端获取所述至少一张第二人脸图像的纹理特征信息。
S406,所述移动终端当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
S407,所述移动终端将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
可以看出,本发明实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
此外,移动终端通过模拟用户双手对图像的缩放操作调节前置摄像头的焦距,利用软体的方法而不是增加对焦马达等硬件实现焦距的调节,有利于降低硬件消耗,便捷实现焦距调节,此外,使用该方法调节焦距获取的第一人脸图像,提升了第一人脸图像的完整性和清晰度,有利于增强人脸检测的准确性。
此外,移动终端在判断出第一人脸图像中像素点的数量大于或者等于预设阈值时,通过放大第一人脸图像便可以获取具有足够像素点数量的第二人脸图像,有利于提升人脸解锁的便捷性和速度,无需再次启动摄像头装置,有利于减少电量消耗。
与上述图2A、图3、图4所示的实施例一致的,请参阅图5,图5是本发明实施例提供的一种移动终端500的结构示意图,如图所示,该移动终端500包括处理器510、存储器520、通信接口530以及一个或多个程序540,其中,上述一个或多个程序540被存储在上述存储器520中,并且被配置由上述处理器510执行,上述程序540包括用于执行以下步骤的指令;
调节前置摄像头的焦距获取第一人脸图像;
根据所述第一人脸图像获取至少一张第二人脸图像;
当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
可以看出,本发明实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸 图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,上述程序540中的指令具体用于执行以下步骤:当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;以及用于通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
在这个可能的示例中,在所述增大所述前置摄像头的焦距为目标焦距方面,上述程序540中的指令具体用于执行以下步骤:以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,所述焦距为目标焦距时所述预览图像中所述人脸图像的区域。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,上述程序540中的指令具体用于执行以下步骤:当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;以及用于在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
在一个可能的示例中,在所述调节前置摄像头的焦距获取第一人脸图像方面,上述程序540中的指令具体用于执行以下步骤:通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;以及用于获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
在一个可能的示例中,在所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像方面,上述程序540中的指令具体用于执行以下步骤:获取所述至少一张第二人脸图像的纹理特征信息;以及用于当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
上述主要从方法侧执行过程的角度对本发明实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本发明实施例可以根据上述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本发明实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图6是本申请实施例中所涉及的人脸解锁装置600的功能单元组成框图。该人脸解锁装置600应用于移动终端,人脸解锁装置600包括:获取单元601、解锁单元602,其中,
所述获取单元601,用于调节前置摄像头的焦距获取第一人脸图像;以及用于根据所述第一人脸图像获取至少一张第二人脸图像;
所述解锁单元602,用于当通过所述获取单元601获取的所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述获取单元601获取的所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
可以看出,本申请实施例中,移动终端首先获取调节前置摄像头的焦距获取第一人脸图像;其次,根据所述第一人脸图像获取至少一张第二人脸图像;最后,当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。可见,移动终端通过自动调节前置摄像头的焦距获取完整的第一人脸图像,有利于提升移动终端的智能性和第一人脸图像的清晰度,且使用第一人脸图像进行人脸图像的匹配操作,匹配成功后解锁,有利于提升移动终端的安全性和解锁成功率,此外,在第一人脸图像的基础上获取包括人脸部分区域的至少一张第二人脸图像,使放大人脸图像的局部区域,突出人脸图像的局部细节,通过局部细节检测人脸图像为真实人脸图像,有利于提升真实人脸检测的便捷性和有效性。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述获取单元601具体用于:当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;以及用于通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
在这个可能的示例中,在所述增大所述前置摄像头的焦距为目标焦距方面,所述获取单元601具体用于:以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
在一个可能的示例中,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述获取单元601具体用于:当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;以及用于在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
在一个可能的示例中,在所述调节前置摄像头的焦距获取第一人脸图像方面,所述获取单元601具体用于:通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;以及用于获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
在一个可能的示例中,在所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像方面,所述解锁单元602具体用于:获取所述至少一张第二人脸图像的纹理特征信息;以及用于当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
其中,获取单元601可以是前置摄像头或者可以是处理器,解锁单元602可以是处理器。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。
本发明实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(Read-Only Memory,ROM,)、随机存取存储器(Random Access Memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (20)

  1. 一种移动终端,其特征在于,包括处理器,连接所述处理器的前置摄像头和存储器,其中:
    所述前置摄像头,用于调节焦距获取第一人脸图像;
    所述存储器,用于存储预设人脸图像模板;
    所述处理器,用于根据所述第一人脸图像获取至少一张第二人脸图像;以及用于当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
  2. 根据权利要求1所述的移动终端,其特征在于,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述处理器具体用于:当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;以及用于通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
  3. 根据权利要求2所述的移动终端,其特征在于,在所述增大所述前置摄像头的焦距为目标焦距方面,所述处理器具体用于:以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
  4. 根据权利要求1所述的移动终端,其特征在于,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述处理器具体用于:当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;以及用于在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
  5. 根据权利要求1-4任一项所述的移动终端,其特征在于,在所述调节焦距获取第一人脸图像方面,所述前置摄像头具体用于:通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;以及用于获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
  6. 根据权利要求1-5任一项所述的移动终端,其特征在于,在所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像方面,所述处理器具体用于:获取所述至少一张第二人脸图像的纹理特征信息;以及用于当检测出所述纹理特征信息与所述存储器中预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
  7. 一种人脸解锁方法,其特征在于,包括:
    调节前置摄像头的焦距获取第一人脸图像;
    根据所述第一人脸图像获取至少一张第二人脸图像;
    当通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述第一人脸图像获取至少一张第二人脸图像,包括:
    当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;
    通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
  9. 根据权利要求8所述的方法,其特征在于,所述增大所述前置摄像头的焦距为目标焦距,包括:
    以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
  10. 根据权利要求7所述的方法,其特征在于,所述根据所述第一人脸图像获取至少一张第二人脸图像,包括:
    当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;
    在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
  11. 根据权利要求7-10任一项所述的方法,其特征在于,所述调节前置摄像头的焦距获取第一人脸图像,包括:
    通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;
    获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
  12. 根据权利要求7-11任一项所述的方法,其特征在于,所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像,包括:
    获取所述至少一张第二人脸图像的纹理特征信息;
    当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
  13. 一种人脸解锁装置,其特征在于,包括获取单元和解锁单元,其中:
    所述获取单元,用于调节前置摄像头的焦距获取第一人脸图像;以及用于根据所述第一人脸图像获取至少一张第二人脸图像;
    所述解锁单元,用于当通过所述获取单元获取的所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像时,将所述获取单元获取的所述第一人脸图像与预设人脸图像模板匹配成功,执行解锁操作。
  14. 根据权利要求13所述的装置,其特征在于,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述获取单元具体用于:当所述第一人脸图像中像素点的数量小于预设阈值时,增大所述前置摄像头的焦距为目标焦距;以及用于通过所述前置摄像头使用所述目标焦距获取所述至少一张第二人脸图像。
  15. 根据权利要求14所述的装置,其特征在于,在所述增大所述前置摄像头的焦距为目标焦距方面,所述获取单元具体用于:以预览图像中的至少一个像素点为中心点放大所述预览图像中的人脸图像,使所述预览图像中人脸图像的区域与目标区域相同,所述目标区域为以所述预览图像中的至少一个像素点为焦点,焦距为所述目标焦距时所述预览图像中所述人脸图像的区域。
  16. 根据权利要求13所述的装置,其特征在于,在所述根据所述第一人脸图像获取至少一张第二人脸图像方面,所述获取单元具体用于:当所述第一人脸图像中像素点的数量大于或等于预设阈值时,以所述第一人脸图像中的至少一个像素点为中心点放大所述第一人脸图像;以及用于在放大后的所述第一人脸图像上获取所述至少一张第二人脸图像。
  17. 根据权利要求13-16任一项所述的装置,其特征在于,在所述调节前置摄像头的焦距获取第一人脸图像方面,所述获取单元具体用于:通过模拟用户双手对图像的缩放操作调节所述前置摄像头的焦距,确定所述预览图像中所述人脸图像位于预览界面的中心区域时的多个参考焦距;以及用于获取所述多个参考焦距对应的人脸图像中最大的人脸图像为所述第一人脸图像。
  18. 根据权利要求13-17任一项所述的装置,其特征在于,在所述通过所述至少一张第二人脸图像检测出所述人脸图像为真实人脸图像方面,所述解锁单元具体用于:获取所述至少一张第二人脸图像的纹理特征信息;以及用于当检测出所述纹理特征信息与预设的纹理特征信息匹配时,确定所述人脸图像为真实人脸图像。
  19. 一种移动终端,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求7-12任一项所述的方法中的步骤的指令。
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求7-12任一项所述的方法,所述计算机包括移动终端。
PCT/CN2018/120092 2018-01-31 2018-12-10 移动终端、人脸解锁方法及相关产品 WO2019148968A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810096504.6A CN108304708A (zh) 2018-01-31 2018-01-31 移动终端、人脸解锁方法及相关产品
CN201810096504.6 2018-01-31

Publications (1)

Publication Number Publication Date
WO2019148968A1 true WO2019148968A1 (zh) 2019-08-08

Family

ID=62850834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/120092 WO2019148968A1 (zh) 2018-01-31 2018-12-10 移动终端、人脸解锁方法及相关产品

Country Status (2)

Country Link
CN (1) CN108304708A (zh)
WO (1) WO2019148968A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460982A (zh) * 2020-03-30 2020-07-28 维沃移动通信有限公司 人脸识别方法和电子设备

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304708A (zh) * 2018-01-31 2018-07-20 广东欧珀移动通信有限公司 移动终端、人脸解锁方法及相关产品
CN109381165B (zh) * 2018-09-12 2022-05-03 维沃移动通信有限公司 一种皮肤检测方法及移动终端
CN109348046A (zh) * 2018-09-25 2019-02-15 罗源县凤山镇企业服务中心 一种手机解锁方法及终端
EP3674973A1 (en) * 2018-12-28 2020-07-01 Samsung Electronics Co., Ltd. Method and apparatus with liveness detection and object recognition
CN112052706B (zh) * 2019-06-06 2022-07-29 鸿富锦精密工业(武汉)有限公司 电子装置及人脸识别方法
CN110532957B (zh) * 2019-08-30 2021-05-07 北京市商汤科技开发有限公司 人脸识别方法及装置、电子设备和存储介质
US11348375B2 (en) * 2019-10-15 2022-05-31 Assa Abloy Ab Systems and methods for using focal stacks for image-based spoof detection
CN111339972A (zh) * 2020-03-02 2020-06-26 五八有限公司 一种人脸图像检测方法、装置、电子设备及存储介质
CN111427789B (zh) * 2020-03-26 2022-08-16 平安医疗健康管理股份有限公司 自动验证规则的方法、装置、计算机设备和存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010225118A (ja) * 2009-03-25 2010-10-07 Toshiba Corp 画像処理装置、方法及びプログラム
KR20110102073A (ko) * 2010-03-10 2011-09-16 홍익대학교 산학협력단 얼굴 인식 시스템에서의 위조 검출 방법
US20170345146A1 (en) * 2016-05-30 2017-11-30 Beijing Kuangshi Technology Co., Ltd. Liveness detection method and liveness detection system
CN107480601A (zh) * 2017-07-20 2017-12-15 广东欧珀移动通信有限公司 检测方法及相关产品
CN107491775A (zh) * 2017-10-13 2017-12-19 理光图像技术(上海)有限公司 人脸活体检测方法、装置、存储介质及设备
CN107491672A (zh) * 2017-07-18 2017-12-19 广东欧珀移动通信有限公司 解锁处理方法及相关产品
CN107527019A (zh) * 2017-07-28 2017-12-29 广东欧珀移动通信有限公司 解锁控制方法及相关产品
CN108304708A (zh) * 2018-01-31 2018-07-20 广东欧珀移动通信有限公司 移动终端、人脸解锁方法及相关产品

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626458A (zh) * 2008-07-08 2010-01-13 鸿富锦精密工业(深圳)有限公司 摄影装置及其摄影方法
KR20100073191A (ko) * 2008-12-22 2010-07-01 한국전자통신연구원 거리 정보를 이용한 위조 얼굴 검출 방법 및 장치
KR101884337B1 (ko) * 2012-04-26 2018-08-01 삼성전자주식회사 영상 인식 방법 및 장치
CN106951869B (zh) * 2017-03-22 2019-03-15 腾讯科技(深圳)有限公司 一种活体验证方法及设备
CN107316029B (zh) * 2017-07-03 2018-11-23 腾讯科技(深圳)有限公司 一种活体验证方法及设备
CN107392142B (zh) * 2017-07-19 2020-11-13 广东工业大学 一种真伪人脸识别方法及其装置
CN107563289A (zh) * 2017-07-31 2018-01-09 百度在线网络技术(北京)有限公司 一种活体检测的方法、装置、设备和计算机存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010225118A (ja) * 2009-03-25 2010-10-07 Toshiba Corp 画像処理装置、方法及びプログラム
KR20110102073A (ko) * 2010-03-10 2011-09-16 홍익대학교 산학협력단 얼굴 인식 시스템에서의 위조 검출 방법
US20170345146A1 (en) * 2016-05-30 2017-11-30 Beijing Kuangshi Technology Co., Ltd. Liveness detection method and liveness detection system
CN107491672A (zh) * 2017-07-18 2017-12-19 广东欧珀移动通信有限公司 解锁处理方法及相关产品
CN107480601A (zh) * 2017-07-20 2017-12-15 广东欧珀移动通信有限公司 检测方法及相关产品
CN107527019A (zh) * 2017-07-28 2017-12-29 广东欧珀移动通信有限公司 解锁控制方法及相关产品
CN107491775A (zh) * 2017-10-13 2017-12-19 理光图像技术(上海)有限公司 人脸活体检测方法、装置、存储介质及设备
CN108304708A (zh) * 2018-01-31 2018-07-20 广东欧珀移动通信有限公司 移动终端、人脸解锁方法及相关产品

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460982A (zh) * 2020-03-30 2020-07-28 维沃移动通信有限公司 人脸识别方法和电子设备
CN111460982B (zh) * 2020-03-30 2024-04-19 维沃移动通信有限公司 人脸识别方法和电子设备

Also Published As

Publication number Publication date
CN108304708A (zh) 2018-07-20

Similar Documents

Publication Publication Date Title
WO2019148968A1 (zh) 移动终端、人脸解锁方法及相关产品
US11113523B2 (en) Method for recognizing a specific object inside an image and electronic device thereof
CN109407936B (zh) 截图方法及相关装置
CN110100251B (zh) 用于处理文档的设备、方法和计算机可读存储介质
KR102327779B1 (ko) 이미지 처리 방법 및 장치
US11030733B2 (en) Method, electronic device and storage medium for processing image
WO2019011098A1 (zh) 解锁控制方法及相关产品
EP4033458A2 (en) Method and apparatus of face anti-spoofing, device, storage medium, and computer program product
CN107220614B (zh) 图像识别方法、装置及计算机可读存储介质
CN113038165B (zh) 确定编码参数组的方法、设备及存储介质
CN112422817B (zh) 图像处理方法及装置
CN108665510B (zh) 连拍图像的渲染方法、装置、存储介质及终端
US20220270352A1 (en) Methods, apparatuses, devices, storage media and program products for determining performance parameters
CN109559288A (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
CN114040048A (zh) 一种隐私保护方法及电子设备
KR20200127928A (ko) 전자장치에서 이미지 내의 특정 객체를 인식하기 위한 방법 및 장치
CN111784604A (zh) 图像处理方法、装置、设备及计算机可读存储介质
CN116320721A (zh) 一种拍摄方法、装置、终端及存储介质
CN114245017A (zh) 一种拍摄方法、装置及电子设备
CN112015319A (zh) 截图处理方法、装置及存储介质
CN108540726B (zh) 连拍图像的处理方法、装置、存储介质及终端
JP6826281B2 (ja) 情報処理装置、情報処理方法、プログラム
CN111079662A (zh) 一种人物识别方法、装置、机器可读介质及设备
CN115580690B (zh) 图像处理的方法和电子设备
CN113749614B (zh) 皮肤检测方法和设备

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

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

Country of ref document: EP

Kind code of ref document: A1