CN107566654B - Unlocking control method and related product - Google Patents

Unlocking control method and related product Download PDF

Info

Publication number
CN107566654B
CN107566654B CN201710892407.3A CN201710892407A CN107566654B CN 107566654 B CN107566654 B CN 107566654B CN 201710892407 A CN201710892407 A CN 201710892407A CN 107566654 B CN107566654 B CN 107566654B
Authority
CN
China
Prior art keywords
image
face
target
specified focal
template
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
CN201710892407.3A
Other languages
Chinese (zh)
Other versions
CN107566654A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710892407.3A priority Critical patent/CN107566654B/en
Publication of CN107566654A publication Critical patent/CN107566654A/en
Application granted granted Critical
Publication of CN107566654B publication Critical patent/CN107566654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses an unlocking control method and a related product, wherein the method comprises the following steps: acquiring a first face image based on the first specified focal distance, and acquiring a second face image based on the second specified focal distance; adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation. The embodiment of the invention can obtain two face images based on different focal lengths and determine the difference image between the two face images, on one hand, the difference image comprises stability characteristics of a plurality of faces, on the other hand, the dimension of the image is reduced, and the face recognition efficiency can be improved.

Description

Unlocking control method and related product
Technical Field
The invention relates to the technical field of mobile terminals, in particular to an unlocking control method and a related product.
Background
With the widespread application of mobile terminals (mobile phones, tablet computers, etc.), the applications that the mobile terminals can support are increasing, the functions are increasing, and the mobile terminals are developing towards diversification and individuation, and become indispensable electronic products in the life of users.
At present, face recognition is more and more favored by mobile terminal manufacturers, and because environmental factors can change greatly, face recognition's success rate is difficult to obtain the assurance, and the problem of how to promote face recognition efficiency is urgently needed to be solved.
Disclosure of Invention
The embodiment of the invention provides an unlocking control method and a related product, which can improve the face recognition efficiency.
In a first aspect, an embodiment of the present invention provides a mobile terminal, including an Application Processor (AP), and a face recognition device connected to the AP, where,
the face recognition device is used for acquiring a first face image based on a first specified focal distance and acquiring a second face image based on a second specified focal distance;
the AP is used for adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the adjusted second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
In a second aspect, an embodiment of the present invention provides an unlocking control method, which is applied to a mobile terminal including an application processor AP and a face recognition device connected to the AP, and the method includes:
the face recognition device acquires a first face image based on a first specified focal distance and acquires a second face image based on a second specified focal distance;
the AP adjusts the sizes of the first face image and the second face image to be consistent, and determines a first difference image between the adjusted first face image and the second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
In a third aspect, an embodiment of the present invention provides an unlocking control method, including:
acquiring a first face image based on the first specified focal distance, and acquiring a second face image based on the second specified focal distance;
adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image;
matching the first difference image with a target preset face template;
and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
In a fourth aspect, an embodiment of the present invention provides an unlocking control apparatus, including:
the shooting unit is used for acquiring a first face image based on the first specified focal distance and acquiring a second face image based on the second specified focal distance;
a first determining unit, configured to adjust sizes of the first face image and the second face image to be consistent, and determine a first difference image between the adjusted first face image and the adjusted second face image;
the matching unit is used for matching the first difference image with a target preset face template;
and the unlocking unit is used for carrying out unlocking operation when the first difference image is successfully matched with the target preset face template.
In a fifth aspect, an embodiment of the present invention provides a mobile terminal, including: an application processor AP and a memory; and one or more programs stored in the memory and configured to be executed by the AP, the programs including instructions for some or all of the steps as described in the third aspect.
In a sixth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium is used for storing a computer program, where the computer program is used to make a computer execute some or all of the steps described in the third aspect of the present invention.
In a seventh aspect, embodiments of the present invention provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the third aspect of embodiments of the present invention. The computer program product may be a software installation package.
The embodiment of the invention has the following beneficial effects:
it can be seen that, according to the unlocking control method and the related product described in the embodiments of the present invention, a first face image may be obtained based on a first specified focal length, a second face image may be obtained based on a second specified focal length, sizes of the first face image and the second face image are adjusted to be consistent, a first difference image between the adjusted first face image and the adjusted second face image is determined, the first difference image is matched with a target preset face template, and when the first difference image is successfully matched with the target preset face template, an unlocking operation is performed, so that two face images may be obtained based on different focal lengths, and a difference image between the two face images is determined.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic diagram of an architecture of an exemplary mobile terminal according to an embodiment of the present invention;
fig. 1B is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 1C is a schematic flowchart of an unlocking control method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another unlocking control method disclosed in the embodiment of the present invention;
fig. 3 is another schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 4A is a schematic structural diagram of an unlocking control device according to an embodiment of the present invention;
fig. 4B is a schematic structural diagram of a shooting unit of the unlocking control device depicted in fig. 4A according to an embodiment of the present invention;
fig. 4C is another schematic structural diagram of an unlocking control device according to an embodiment of the present invention;
fig. 4D is another schematic structural diagram of an unlocking control device according to an embodiment of the present invention;
fig. 4E is another schematic structural diagram of an unlocking control device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another mobile terminal disclosed in the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The Mobile terminal according to the embodiment of the present invention may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like, which have wireless communication functions. For convenience of description, the above-mentioned devices are collectively referred to as a mobile terminal.
The following describes embodiments of the present invention in detail. As an example mobile terminal 1000 shown in fig. 1A, the face recognition device of the mobile terminal 1000 may be a camera module 21, the camera module may be two cameras, one of which may be a visible camera, one of which may be an infrared camera, or both of which may be visible cameras, for example, one of which may be a visible camera and the other of which may be an infrared camera, for example, one of which may be a visible camera and the other of which may also be a visible camera, or the camera module may be a single camera, for example, a visible camera, or an infrared camera. The camera module 21 may be a front camera or a rear camera.
Referring to fig. 1B, fig. 1B is a schematic structural diagram of a mobile terminal 100, where the mobile terminal 100 includes: an application processor AP110, a face recognition device 120 and an environment sensor 160, wherein the AP110 is connected to the face recognition device 120 and the environment sensor 160 via a bus 150. The environmental sensor 160 may be configured to detect an environmental parameter, and the environmental sensor 160 may be at least one of: ambient light sensor, electromagnetic detection sensor, ambient color temperature detection sensor, positioning sensor, temperature sensor, humidity sensor, etc., and the ambient parameter may be at least one of: ambient brightness, ambient color temperature, ambient magnetic field interference coefficient, weather conditions, number of ambient light sources, geographic location, and the like.
The mobile terminal described based on fig. 1A-1B can be used to implement the following functions:
the face recognition device 120 is configured to obtain a first face image based on a first specified focal distance, and obtain a second face image based on a second specified focal distance;
the AP110 is configured to adjust sizes of the first face image and the second face image to be consistent, and determine a first difference image between the adjusted first face image and the adjusted second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
In one possible example, in the aspect of acquiring the first face image based on the first specified focal distance, the face recognition device 120 is specifically configured to:
shooting a human face based on the first specified focal length to obtain a first image;
and carrying out image segmentation on the first image to obtain the first face image.
In one possible example, the environmental sensor 160 is specifically configured to:
acquiring target environment parameters;
determining a shooting parameter set corresponding to the target environment parameter according to a mapping relation between preset environment parameters and shooting parameters, wherein the shooting parameter set comprises a plurality of groups of shooting parameters, and each group of shooting parameters corresponds to a focal length;
selecting a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance from the shooting parameter set;
in terms of the acquiring a first face image based on the first specified focal distance and acquiring a second face image based on the second specified focal distance, the face recognition device 120 is specifically configured to:
and acquiring the first face image based on the first specified focal distance and the first target shooting parameter, and acquiring the second face image based on the second specified focal distance and the second target shooting parameter.
In one possible example, the AP110 is further specifically configured to:
determining a proportional relationship between the first specified focal length and the second specified focal length;
zooming the preset face template according to the proportional relation to obtain a first image;
and adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
In one possible example, the AP110 is further specifically configured to:
acquiring a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance from a preset face template library;
adjusting the size of the first preset face template and the second preset face template to be consistent, determining a third difference image between the first preset face template and the second preset face template after adjustment, taking the third difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
The mobile terminal described with reference to fig. 1A-1B may be configured to execute an unlocking control method described as follows:
the face recognition device 120 obtains a first face image based on the first specified focal distance and a second face image based on the second specified focal distance;
the AP110 adjusts the sizes of the first face image and the second face image to be consistent, and determines a first difference image between the adjusted first face image and the second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
It can be seen that, in the unlocking control method described in the embodiment of the present invention, a first face image may be obtained based on a first specified focal length, a second face image may be obtained based on a second specified focal length, sizes of the first face image and the second face image are adjusted to be consistent, a first difference image between the adjusted first face image and the adjusted second face image is determined, the first difference image is matched with a target preset face template, and when the first difference image is successfully matched with the target preset face template, an unlocking operation is performed, so that two face images may be obtained based on different focal lengths, and a difference image between the two face images is determined.
Referring to fig. 1C, a schematic flowchart of an embodiment of an unlocking control method according to an embodiment of the present invention is shown based on the mobile terminal described in fig. 1A to fig. 1B. The unlocking control method described in this embodiment may include the following steps:
101. a first face image is acquired based on the first specified focal distance, and a second face image is acquired based on the second specified focal distance.
The first designated focal length and the second designated focal length can be set by a user or defaulted by a system. The first specified focal length and the second specified focal length may be different focal lengths, and of course, the face size obtained by shooting may vary at different focal lengths, that is, the face occupation ratio (the area ratio between the face region and the whole image obtained by shooting) may be different. Therefore, the face can be shot based on the first specified focal distance to obtain a first face image, and the face can be shot based on the second specified focal distance to obtain a second face image.
Optionally, in the step 101, acquiring the first face image based on the first specified focal length may include the following steps:
11. shooting a human face based on the first specified focal length to obtain a first image;
12. and carrying out image segmentation on the first image to obtain the first face image.
The first image not only contains the face but also contains the background, so that the first image can be subjected to image segmentation to obtain the image of the area where the face is located, namely the first face image. Of course, the second face image can also be obtained in the same manner.
102. And adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image.
The sizes of the faces in the first face image and the second face image are different, so that the sizes of the first face image and the second face image can be adjusted to be consistent based on the area where the faces are located, in this way, the adjusted first face image and the adjusted second face image can be overlapped, namely, pixel points of each face part are aligned, then difference processing is performed (pixel values corresponding to the same position pixel point are subjected to difference processing, the same principle is described below), or difference processing is performed and then an absolute value is taken to obtain a first difference image, the first difference image at this time contains more detailed features of the faces, the features are more stable due to deep features, and the features in the first difference image are collectively called as stability features.
Optionally, feature extraction may be performed on the first difference image to obtain a stability feature therein, where the feature extraction may be implemented by using the following algorithm: harris corner detection algorithm, scale invariant feature transformation, SUSAN corner detection algorithm, etc., which are not described herein again.
103. And matching the first difference image with a target preset face template.
The target preset face template may be pre-stored in a memory of the mobile terminal, or obtained by further processing the pre-stored preset face template, which may specifically refer to the following description.
Optionally, between the step 101 and the step 103, the following steps may be further included:
a1, determining the proportional relation between the first designated focal length and the second designated focal length;
a2, carrying out zooming processing on a preset face template according to the proportional relation to obtain a first image;
a3, adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
Wherein, the proportional relation between the first designated focal length and the second designated focal length determines the size relation of the face to a certain extent, and further, the preset face template can be scaled according to the proportional relation between the first designated focal length and the second designated focal length, of course, the scaling-down processing or the enlarging processing is feasible, so as to obtain the first image, further, the size of the preset face template and the size of the first image can be adjusted to be consistent, the adjusted first image and the preset face template can be overlapped, namely, the pixel points of each face part are aligned, then the difference processing is carried out, or the difference processing is carried out and then the absolute value is taken, so as to obtain the second difference image, the second difference image is used as the target preset face template, and the second difference image is matched with the target preset face template, thus, the template corresponding to the first difference image in step 102 can be obtained by processing the preset face template, that is, the final purpose is realized to compare the detail characteristics of the face with the detail characteristics of the template, so that on one hand, the recognition efficiency is improved, and on the other hand, the recognition success rate is improved because the deep detail characteristics are more stable.
Optionally, between the step 101 and the step 103, the following steps may be further included:
b1, acquiring a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance from a preset face template library;
b2, adjusting the size of the first preset face template and the second preset face template to be consistent, determining a third difference image between the first preset face template and the second preset face template after adjustment, taking the third difference image as the target preset face template, and executing the step of matching the first difference image and the target preset face template.
Wherein, the memory of the mobile terminal can store a preset face template library, the preset face template library comprises a plurality of preset face templates, each preset face template corresponds to a focal length, further, a first preset face template corresponding to a first designated focal length and a second preset face template corresponding to a second designated focal length can be obtained from the preset face template library, the sizes of the first preset face template and the second preset face template are adjusted to be consistent, the adjusted first preset face template and the second preset face template can be overlapped, namely, pixel points of each face part are aligned, then difference processing is carried out, or difference processing is carried out and absolute values are obtained to obtain a third difference image, the third difference image is taken as a target preset face template, and the third difference image is matched with the target preset face template, therefore, the template corresponding to the first difference image in the step 102 can be obtained by processing the preset face template, namely the final purpose of comparing the detail characteristics of the face with the detail characteristics of the template is achieved, on one hand, the recognition efficiency is improved, and on the other hand, the recognition success rate is improved due to the fact that the deep detail characteristics are more stable.
104. And when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
And if the first difference image is unsuccessfully matched with the target preset face template, prompting the user to unlock the face again.
Optionally, the unlocking operation may be at least one of the following conditions: for example, when the mobile terminal is in a screen-off state, the unlocking operation may be to light up a screen and enter a main page of the mobile terminal, or to designate a page; when the mobile terminal is in a bright screen state, the unlocking operation can be entering a main page of the mobile terminal or an appointed page; for example, the mobile terminal may be on a payment page, and the unlocking operation may be to perform payment. The designated page may be at least one of: a page of an application, or a page specified by the user.
It can be seen that, in the unlocking control method described in the embodiment of the present invention, a first face image may be obtained based on a first specified focal length, a second face image may be obtained based on a second specified focal length, sizes of the first face image and the second face image are adjusted to be consistent, a first difference image between the adjusted first face image and the adjusted second face image is determined, the first difference image is matched with a target preset face template, and when the first difference image is successfully matched with the target preset face template, an unlocking operation is performed, so that two face images may be obtained based on different focal lengths, and a difference image between the two face images is determined.
In accordance with the above, please refer to fig. 2, which is a flowchart illustrating an embodiment of an unlocking control method according to an embodiment of the present invention. The unlocking control method described in this embodiment may include the following steps:
201. and acquiring target environment parameters.
Wherein, the target environment parameter may be at least one of the following: ambient brightness, ambient color temperature, ambient magnetic field interference coefficient, weather conditions, number of ambient light sources, geographic location, and the like. The target environmental parameter may be acquired by an environmental sensor.
202. And determining a shooting parameter set corresponding to the target environment parameter according to a mapping relation between preset environment parameters and shooting parameters, wherein the shooting parameter set comprises a plurality of groups of shooting parameters, and each group of shooting parameters corresponds to one focal length.
The shooting parameters may include, but are not limited to: exposure time, aperture size, photographing mode, sensitivity ISO, white balance parameters, and the like. The mapping relationship between the preset environmental parameters and the shooting parameters can be pre-stored in the memory, and then the shooting parameter set corresponding to the target environmental parameters can be determined according to the mapping relationship.
203. And selecting a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance from the shooting parameter set.
Wherein, a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance can be selected from the shooting parameter set. Of course, the first target shooting parameter may be the shooting parameter with the most appropriate first specified focal length, and the second target shooting parameter may be the shooting parameter with the most appropriate second specified focal length.
204. And acquiring a first face image based on the first specified focal distance and the first target shooting parameter, and acquiring a second face image based on the second specified focal distance and the second target shooting parameter.
The first face image is obtained based on the first specified focal length and the first target shooting parameter, the first face image which is suitable for the environment and has the best effect can be obtained, the second face image is obtained based on the second specified focal length and the second target shooting parameter, and the second face image which is suitable for the environment and has the best effect can be obtained.
205. And adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image.
206. And matching the first difference image with a target preset face template.
207. And when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
The detailed description of the steps 205 to 207 may refer to the corresponding steps of the unlocking control method described in fig. 1C, and will not be described herein again.
It can be seen that, in the unlocking control method described in the embodiment of the present invention, a target environment parameter is obtained, a shooting parameter set corresponding to the target environment parameter is determined according to a mapping relationship between preset environment parameters and shooting parameters, the shooting parameter set includes a plurality of groups of shooting parameters, each group of shooting parameters corresponds to one focal length, a first target shooting parameter corresponding to a first specified focal length and a second target shooting parameter corresponding to a second specified focal length are selected from the shooting parameter set, a first face image is obtained based on the first specified focal length and the first target shooting parameter, a second face image is obtained based on the second specified focal length and the second target shooting parameter, sizes of the first face image and the second face image are adjusted to be consistent, and a first difference image between the adjusted first face image and the adjusted second face image is determined, the first difference image is matched with the target preset face template, and when the first difference image is successfully matched with the target preset face template, unlocking operation is performed, so that two face images can be obtained based on different focal lengths, and the difference image between the two face images is determined.
Referring to fig. 3, fig. 3 is a mobile terminal according to an embodiment of the present invention, including: an application processor AP and a memory; and one or more programs stored in the memory and configured for execution by the AP, the programs including instructions for performing the steps of:
acquiring a first face image based on the first specified focal distance, and acquiring a second face image based on the second specified focal distance;
adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image;
matching the first difference image with a target preset face template;
and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
In one possible example, in the acquiring a first face image based on a first specified focal length, the program includes instructions for:
shooting a human face based on the first specified focal length to obtain a first image;
and carrying out image segmentation on the first image to obtain the first face image.
In one possible example, the program further comprises instructions for performing the steps of:
acquiring target environment parameters;
determining a shooting parameter set corresponding to the target environment parameter according to a mapping relation between preset environment parameters and shooting parameters, wherein the shooting parameter set comprises a plurality of groups of shooting parameters, and each group of shooting parameters corresponds to a focal length;
selecting a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance from the shooting parameter set;
in the acquiring a first face image based on a first specified focal distance and acquiring a second face image based on a second specified focal distance, the program includes instructions for:
and acquiring the first face image based on the first specified focal distance and the first target shooting parameter, and acquiring the second face image based on the second specified focal distance and the second target shooting parameter.
In one possible example, the program further comprises instructions for performing the steps of:
determining a proportional relationship between the first specified focal length and the second specified focal length;
zooming the preset face template according to the proportional relation to obtain a first image;
and adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
In one possible example, the program further comprises instructions for performing the steps of:
acquiring a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance from a preset face template library;
adjusting the size of the first preset face template and the second preset face template to be consistent, determining a third difference image between the first preset face template and the second preset face template after adjustment, taking the third difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
Referring to fig. 4A, fig. 4A is a schematic structural diagram of an unlocking control device according to the present embodiment. The unlock control means includes a photographing unit 401, a first determining unit 402, a matching unit 403, and an unlocking unit 404, wherein,
a shooting unit 401, configured to obtain a first face image based on a first specified focal distance and obtain a second face image based on a second specified focal distance;
a first determining unit 402, configured to adjust sizes of the first face image and the second face image to be consistent, and determine a first difference image between the adjusted first face image and the second face image;
a matching unit 403, configured to match the first difference image with a target preset face template;
an unlocking unit 404, configured to perform an unlocking operation when the first difference image is successfully matched with the target preset face template.
Alternatively, as shown in fig. 4B, fig. 4B is a detailed structure of the shooting unit 402 of the unlocking control device described in fig. 4A, and the shooting unit 401 may include: the shooting module 4011 and the segmentation module 4012 are specifically as follows:
the shooting module 4011 is configured to shoot a human face based on the first specified focal length to obtain a first image;
the segmentation module 4012 is configured to perform image segmentation on the first image to obtain the first face image.
Alternatively, as shown in fig. 4C, fig. 4C is a modified structure of the unlocking control device depicted in fig. 4A, which may further include, compared with fig. 4A: the first obtaining unit 405, the second determining unit 406, and the selecting unit 407 are specifically as follows:
a first obtaining unit 405, configured to obtain a target environment parameter;
a second determining unit 406, configured to determine, according to a mapping relationship between preset environment parameters and shooting parameters, a shooting parameter set corresponding to the target environment parameter, where the shooting parameter set includes multiple groups of shooting parameters, and each group of shooting parameters corresponds to one focal length;
a selecting unit 407, configured to select, from the shooting parameter set, a first target shooting parameter corresponding to the first specified focal length and a second target shooting parameter corresponding to the second specified focal length;
the shooting unit 401 is specifically configured to:
and acquiring the first face image based on the first specified focal distance and the first target shooting parameter, and acquiring the second face image based on the second specified focal distance and the second target shooting parameter.
Alternatively, as shown in fig. 4D, fig. 4D is a modified structure of the unlocking control device depicted in fig. 4A, which may further include, compared with fig. 4A: the third determining unit 408 and the scaling unit 409 are as follows:
a third determining unit 408, configured to determine a proportional relationship between the first specified focal length and the second specified focal length;
the zooming unit 409 is used for zooming the preset face template according to the proportional relation to obtain a first image;
the third determining unit 408 is further specifically configured to:
adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template by the matching unit 403.
Alternatively, as shown in fig. 4E, fig. 4E is a modified structure of the unlocking control device depicted in fig. 4A, which may further include, compared with fig. 4A: the second obtaining unit 410 and the fourth determining unit 411 are specifically as follows:
a second obtaining unit 410, configured to obtain, from preset face templates, a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance;
a fourth determining unit 411, configured to adjust the size of the first preset face template and the size of the second preset face template to be the same, determine a third difference image between the first preset face template and the second preset face template after adjustment, take the third difference image as the target preset face template, and execute the step of matching the first difference image with the target preset face template by the matching unit 403.
It can be understood that the functions of each program module of the unlocking control device in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
As shown in fig. 5, for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the specific technology are not disclosed, please refer to the method part in the embodiment of the present invention. The mobile terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the like, taking the mobile terminal as the mobile phone as an example:
fig. 5 is a block diagram illustrating a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present invention. Referring to fig. 5, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, sensor 950, audio circuit 960, Wireless Fidelity (WiFi) module 970, application processor AP980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 5:
the input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 930 may include a touch display 933, a face recognition device 931, and other input devices 932. The face recognition device 931 may refer to the above structure, and the specific structure may refer to the above description, which is not described herein in detail. The input unit 930 may also include other input devices 932. In particular, other input devices 932 may include, but are not limited to, one or more of physical keys, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Wherein, the AP980 is configured to perform the following steps:
acquiring a first face image based on the first specified focal distance, and acquiring a second face image based on the second specified focal distance;
adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image;
matching the first difference image with a target preset face template;
and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
The AP980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions and processes of the mobile phone by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. Optionally, the AP980 may include one or more processing units, which may be artificial intelligence chips, quantum chips; preferably, the AP980 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, 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 AP 980.
Further, the memory 920 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.
RF circuitry 910 may be used for the reception and transmission of information. In general, the RF circuit 910 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an environment sensor and a proximity sensor, wherein the environment sensor may adjust brightness of the touch display screen according to brightness of ambient light, and the proximity sensor may turn off the touch display screen and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 960, speaker 961, microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and the audio signal is converted by the speaker 961 to be played; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the electrical signal is received by the audio circuit 960 and converted into audio data, and the audio data is processed by the audio playing AP980, and then sent to another mobile phone via the RF circuit 910, or played to the memory 920 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 5 shows the WiFi module 970, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The handset also includes a power supply 990 (e.g., a battery) for supplying power to the various components, and preferably, the power supply may be logically connected to the AP980 via a power management system, so that functions such as managing charging, discharging, and power consumption may be performed via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the foregoing embodiment shown in fig. 1C or fig. 2, the method flow of each step may be implemented based on the structure of the mobile phone.
In the embodiments shown in fig. 3 and fig. 4A to fig. 4E, the functions of the units may be implemented based on the structure of the mobile phone.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the unlocking control methods described in the above method embodiments.
Embodiments of the present invention also provide a computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps of any one of the unlock control methods as recited in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above embodiments of the present invention are described in detail, and the principle and the implementation of the present invention are explained by applying specific embodiments, and the above description of the embodiments is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A mobile terminal comprising an application processor AP, and a face recognition device connected to said AP, wherein,
the face recognition device is used for acquiring a first face image based on a first specified focal distance and acquiring a second face image based on a second specified focal distance;
the AP is used for adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the adjusted second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
2. The mobile terminal according to claim 1, wherein in the aspect of acquiring the first face image based on the first specified focal length, the face recognition device is specifically configured to:
shooting a human face based on the first specified focal length to obtain a first image;
and carrying out image segmentation on the first image to obtain the first face image.
3. The mobile terminal of claim 1, wherein the mobile terminal further comprises:
the environment sensor is used for acquiring target environment parameters;
the AP is further specifically configured to:
determining a shooting parameter set corresponding to the target environment parameter according to a mapping relation between preset environment parameters and shooting parameters, wherein the shooting parameter set comprises a plurality of groups of shooting parameters, and each group of shooting parameters corresponds to a focal length;
selecting a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance from the shooting parameter set;
in the aspect of acquiring a first face image based on the first specified focal distance and acquiring a second face image based on the second specified focal distance, the face recognition apparatus is specifically configured to:
and acquiring the first face image based on the first specified focal distance and the first target shooting parameter, and acquiring the second face image based on the second specified focal distance and the second target shooting parameter.
4. The mobile terminal of any of claims 1 or 3, wherein the AP is further specifically configured to:
determining a proportional relationship between the first specified focal length and the second specified focal length;
zooming the preset face template according to the proportional relation to obtain a first image;
and adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
5. The mobile terminal according to any of claims 1 to 3, wherein the AP is further specifically configured to:
acquiring a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance from a preset face template library;
adjusting the size of the first preset face template and the second preset face template to be consistent, determining a third difference image between the first preset face template and the second preset face template after adjustment, taking the third difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
6. An unlocking control method is applied to a mobile terminal comprising an application processor AP and a face recognition device connected with the AP, and comprises the following steps:
the face recognition device acquires a first face image based on a first specified focal distance and acquires a second face image based on a second specified focal distance;
the AP adjusts the sizes of the first face image and the second face image to be consistent, and determines a first difference image between the adjusted first face image and the second face image; matching the first difference image with a target preset face template; and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
7. An unlock control method, characterized by comprising:
acquiring a first face image based on the first specified focal distance, and acquiring a second face image based on the second specified focal distance;
adjusting the sizes of the first face image and the second face image to be consistent, and determining a first difference image between the adjusted first face image and the second face image;
matching the first difference image with a target preset face template;
and when the first difference image is successfully matched with the target preset face template, carrying out unlocking operation.
8. The method of claim 7, wherein said obtaining a first face image based on a first specified focal length comprises:
shooting a human face based on the first specified focal length to obtain a first image;
and carrying out image segmentation on the first image to obtain the first face image.
9. The method of claim 7, further comprising:
acquiring target environment parameters;
determining a shooting parameter set corresponding to the target environment parameter according to a mapping relation between preset environment parameters and shooting parameters, wherein the shooting parameter set comprises a plurality of groups of shooting parameters, and each group of shooting parameters corresponds to a focal length;
selecting a first target shooting parameter corresponding to the first specified focal distance and a second target shooting parameter corresponding to the second specified focal distance from the shooting parameter set;
the acquiring a first face image based on a first specified focal length and acquiring a second face image based on a second specified focal length includes:
and acquiring the first face image based on the first specified focal distance and the first target shooting parameter, and acquiring the second face image based on the second specified focal distance and the second target shooting parameter.
10. The method according to any one of claims 7 or 9, further comprising:
determining a proportional relationship between the first specified focal length and the second specified focal length;
zooming the preset face template according to the proportional relation to obtain a first image;
and adjusting the sizes of the preset face template and the first image to be consistent, determining a second difference image between the adjusted preset face template and the first image, taking the second difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
11. The method according to any one of claims 7 to 9, further comprising:
acquiring a first preset face template corresponding to the first specified focal distance and a second preset face template corresponding to the second specified focal distance from a preset face template library;
adjusting the size of the first preset face template and the second preset face template to be consistent, determining a third difference image between the first preset face template and the second preset face template after adjustment, taking the third difference image as the target preset face template, and executing the step of matching the first difference image with the target preset face template.
12. An unlock control device, comprising:
the shooting unit is used for acquiring a first face image based on the first specified focal distance and acquiring a second face image based on the second specified focal distance;
a first determining unit, configured to adjust sizes of the first face image and the second face image to be consistent, and determine a first difference image between the adjusted first face image and the adjusted second face image;
the matching unit is used for matching the first difference image with a target preset face template;
and the unlocking unit is used for carrying out unlocking operation when the first difference image is successfully matched with the target preset face template.
13. A mobile terminal, comprising: an application processor AP and a memory; and one or more programs stored in the memory and configured to be executed by the AP, the programs comprising instructions for the method of any of claims 7-11.
14. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method according to any one of claims 7-11.
CN201710892407.3A 2017-09-27 2017-09-27 Unlocking control method and related product Active CN107566654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710892407.3A CN107566654B (en) 2017-09-27 2017-09-27 Unlocking control method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710892407.3A CN107566654B (en) 2017-09-27 2017-09-27 Unlocking control method and related product

Publications (2)

Publication Number Publication Date
CN107566654A CN107566654A (en) 2018-01-09
CN107566654B true CN107566654B (en) 2020-03-17

Family

ID=60983257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710892407.3A Active CN107566654B (en) 2017-09-27 2017-09-27 Unlocking control method and related product

Country Status (1)

Country Link
CN (1) CN107566654B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991239A (en) * 2019-10-30 2020-04-10 珠海格力电器股份有限公司 Identity verification method, device, equipment and computer readable storage medium
CN112883811B (en) * 2021-01-25 2023-06-02 天津怡和嘉业医疗科技有限公司 Face size determining method and device
CN113158893A (en) * 2021-04-20 2021-07-23 北京嘀嘀无限科技发展有限公司 Target identification method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101430759A (en) * 2008-12-04 2009-05-13 上海大学 Optimized recognition pretreatment method for human face
CN101520838A (en) * 2008-02-27 2009-09-02 中国科学院自动化研究所 Automatic-tracking and automatic-zooming method for acquiring iris images
CN105975926A (en) * 2016-04-29 2016-09-28 中山大学 Human face living detection method based on light field camera
CN106407984A (en) * 2015-07-31 2017-02-15 腾讯科技(深圳)有限公司 Target object recognition method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7212330B2 (en) * 2004-03-22 2007-05-01 Angstrom, Inc. Three-dimensional imaging system for pattern recognition

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520838A (en) * 2008-02-27 2009-09-02 中国科学院自动化研究所 Automatic-tracking and automatic-zooming method for acquiring iris images
CN101430759A (en) * 2008-12-04 2009-05-13 上海大学 Optimized recognition pretreatment method for human face
CN106407984A (en) * 2015-07-31 2017-02-15 腾讯科技(深圳)有限公司 Target object recognition method and device
CN105975926A (en) * 2016-04-29 2016-09-28 中山大学 Human face living detection method based on light field camera

Also Published As

Publication number Publication date
CN107566654A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107609514B (en) Face recognition method and related product
CN107197146B (en) Image processing method and device, mobile terminal and computer readable storage medium
CN108985212B (en) Face recognition method and device
CN108093134B (en) Anti-interference method of electronic equipment and related product
CN107708168B (en) SIM card switching method, mobile terminal and computer readable storage medium
CN107862265B (en) Image processing method and related product
CN107480496B (en) Unlocking control method and related product
CN107273510B (en) Photo recommendation method and related product
CN107506687B (en) Living body detection method and related product
CN107292285B (en) Iris living body detection method and related product
CN107590461B (en) Face recognition method and related product
CN107205116B (en) Image selection method, mobile terminal, image selection device, and computer-readable storage medium
CN107451446B (en) Unlocking control method and related product
CN107633499B (en) Image processing method and related product
CN107633235B (en) Unlocking control method and related product
CN107679481B (en) Unlocking control method and related product
CN107480489B (en) unlocking control method and related product
CN107657218B (en) Face recognition method and related product
CN107403147B (en) Iris living body detection method and related product
CN107644219B (en) Face registration method and related product
CN110209245B (en) Face recognition method and related product
CN110245601B (en) Eyeball tracking method and related product
CN107295173B (en) Method for deleting chat messages and related product
CN107613550B (en) Unlocking control method and related product
CN107451454B (en) Unlocking control method and related product

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant