Specific embodiment
Theme described herein is discussed referring now to example embodiment.It should be understood that discussing these embodiment party
Formula merely to make those skilled in the art can better understand that and realize theme described herein, be not to right
Protection scope, applicability or the exemplary limitation illustrated in claim.Protection scope of the present invention can not departed from
In the case of, the function and arrangement of the element discussed are changed.Each example can according to need, omit, substitute or
Add various processes or component.For example, described method can be executed according to described order in a different order, with
And it can add, omit or combine each step.
In the various technologies based on facial image, top priority is to collect the facial image met the requirements.For this purpose, logical
Often not only to consider environmental factor, it is also necessary to the corresponding cooperation of gathered person, for example gathered person front is required to face camera,
Some posture etc. is kept within a certain period of time.
For example, usually having special acquisition rank in the payment technology (being referred to as " brush face " payment) based on face
Special interactive interface is presented by the terminal for payment with camera in section, show figure of the user in camera
Picture informs the user the people currently acquired so that user, which perceives, is acquiring facial image, and stops in the suitable time
Face image is exactly the facial image for comparison, is compared later using facial image collected with reserved image to complete
Payment process.
In such a scenario, entire acquisition phase is needed to control and be completed within the regular hour.If acquisition is time-consuming too long,
It will lead to user experience variation, and if acquisition is too fast, user may be not yet ready for, and be easy to cause acquired image mould
Paste, the problems such as posture is poor, illumination is improper.As it can be seen that how effectively to acquire one of the problem of facial image is as urgent need to resolve.
In this regard, the embodiment of the invention provides a kind of for acquiring the technical solution of facial image.The embodiment of the present invention
Technical solution can be applied in the various technologies based on facial image.For example, can be in " brush face " payment technology using this
The technical solution of inventive embodiments." brush face " payment technology can be applied in the various scenes for needing to pay, for example, dining room,
Supermarket, hospital, market etc..Specifically, setting the terminal paid can be used at the cashier in these places.The terminal
Camera for acquiring image, such as three-dimensional camera can be installed.It, can be with based on the image of three-dimensional camera shooting
The distance between user and the camera are calculated, carries out man face image acquiring to assist.
In addition, in such a scenario, the man face image acquiring process of the embodiment of the present invention can be by purchase events come
Triggering, for example, can star man face image acquiring process when detecting that beginning through the terminal carries out barcode scanning to commodity.
When detecting confirmation payment, man face image acquiring process can be terminated.Whole process is not necessarily to without interacting with user
Special interactive interface is presented at the terminal come inform user need cooperate to acquire facial image, thus without interference user,
So as to promote user experience.
In embodiments of the present invention, it may relate to face tracking technology.Face tracking can refer to the image in input
Real-time detection is with the presence or absence of face and determination in frame (succinct in order to describe, " picture frame " is referred to as " frame " herein) sequence
The process of its motion profile and size variation.Plurality of human faces tracking is the tracking process for multiple faces.Below with reference to concrete example
Son describes a kind of implementation of face tracking technology.
Assuming that detecting face in frame 1, then corresponding mark can be assigned for the people's face, for ease of description, at this
The mark is known as Track ID in text.Next, in the next frame (referred to herein as frame 2) of frame 1, in the people that frame 1 detects
Face areas adjacent carries out the Face datection of smaller network.If successfully being detected face, then it is assumed that the face detected in frame 2
It is same face with the face detected in frame 1, therefore the face detected in frame 2 also Track ID having the same.This
When, it is believed that the face in frame 1 is traced into frame 2.
If not detecting face near above-mentioned human face region, full figure is carried out using bigger network in frame 2
It examines again.The face detected in frame 2 at this time will be endowed new Track ID.At this point it is possible to think not track in frame 2
To the face in frame 1.
Tracking for multiple faces can also use similar principle.
In plurality of human faces tracking technique, need to carry out Face datection.Face datection can by various applicable algorithms come
It realizes, such as the algorithm based on deep learning and crucial point location.
The technical solution is described in detail below in conjunction with the embodiment of the present invention.
Fig. 1 is according to an embodiment of the present invention for acquiring the schematic flow chart of the method for facial image.
As shown in Figure 1, in step 110, receiving present frame.
Present frame can be a frame in frame sequence, which can be in the case where no progress user interaction
It is persistently shot by camera.
In the step 120, Face datection is carried out to present frame.
In step 130, if detecting m face in the current frame, the maximum face in m face is determined, wherein m
For positive integer.
In step 140, current goal face is determined based on maximum face, so as at the end of frame sequence from face mould
The image of final goal face is exported in plate library, wherein final goal face can be each frame by considering frame sequence
For target face come what is determined, face template library can be used for storing the image of the different faces detected from each frame.
As it can be seen that in embodiments of the present invention, continuing photographed frame by camera in the case where no progress user interaction
Sequence carries out Face datection to each frame in frame sequence and determines target face, and the target by considering each frame
Face determines final goal face, exports final goal face from face template library at the end of frame sequence so corresponding
Image, thus, it is possible to complete man face image acquiring in the case where not interfering user and not needing user's cooperation, so as to
Promote user experience.
In addition, by the image for obtaining final goal face based on the frame sequence of lasting shooting, it can be relatively long
Time in select the preferable facial image of quality, so as to improve the subsequent application effect based on facial image.
In embodiments of the present invention, it can constantly be shot by camera to obtain frame sequence, that is, obtained a series of
Picture frame.For example, can detected when starting items scanning in the terminal for payment in the case where " brush face " pays scene,
Starting camera carrys out photographing image frame, and is detecting when confirming payment in the terminal for payment, terminates shooting.Starting
It can constantly be shot during items scanning to confirmation payment, to obtain the frame sequence including one or more frames.Work as knot
When beam is shot, frame sequence correspondingly terminates.In embodiments of the present invention, camera can be three-dimensional camera or other similar function
The camera of energy.
When obtaining each frame (for example, referred to herein as present frame), Face datection can be carried out for the frame.For example,
Area-of-interest (Region of Interest, ROI) can be preset, Face datection is carried out in the area-of-interest.
Area-of-interest can according to actual needs or use a method known in the art to set.In addition, in certain scenes, it can
Many faces can occur in the region of interest.At this point, may not be that all people's face requires to take into account.In this way, can
To carry out preliminary screening based on some condition, for example can be confirmly detected based on the distance between face and camera
Face.For example, the above-mentioned m face detected in the current frame can be the face for being less than 700mm at a distance from camera.?
After detecting face, the maximum face in these faces can be determined.Maximum face can refer to area in the current frame
Maximum face.
Later, target face can be determined based on maximum face.Target face can be the face for referring to and being intended to acquire.Phase
Ying Di, current goal face can be the face for referring to and being intended to acquire for present frame.
In one embodiment, in step 140, whether can be first frame in frame sequence in conjunction with present frame, come true
Settled preceding target face.
For example, maximum face can be determined as to current goal face if present frame is the first frame in frame sequence.
If present frame is not the first frame in frame sequence, for example is intermediate frame or last frame, previous mesh can be based on
Face and above-mentioned maximum face are marked to determine current goal face.Previous object face can refer to the mesh of the previous frame of present frame
Mark face.As it can be seen that in the present embodiment, current goal is determined in conjunction with the target face of previous frame and the maximum face of present frame
Face can be avoided the face that frequent switching is intended to acquire, while avoid some interim interference.
For example, starting to acquire image in items scanning process, can be potentially encountered and scanning in the case where " brush face " pays scene
Commodity process, payment process are taken in commodity process etc. and substitute (for example exchanging position between user), and the people being lined up below is collected
The problems such as face etc., determine current goal face by the maximum face of target face and present frame in conjunction with previous frame in this way,
It can be avoided these interference, to correctly determine the target face for being currently intended to acquire.
It in one embodiment, can be with about determining current goal face based on previous object face and maximum face
There are a variety of situations.
For example, if the m face detected in present frame does not include previous object face, i.e., in the current frame not with
The maximum face for determining present frame then can be determined as current goal face to previous object face by track.
If m face includes previous object face, and previous object face is the maximum face of present frame, then can
Maximum face is determined as current goal face.For example, if previous object face still has in the current frame and is
Maximum face, then it is considered that the maximum face is exactly current goal face.
If m face includes previous object face, but previous object face is not the maximum face of present frame, then may be used
To determine current goal face based on maximum face and previous object face status information in the current frame.For example, in this way
Status information may include the information such as the physical distance between position and camera.
It in the present embodiment, can be by by the Track ID of previous object face and the respective Track ID of m face
It is compared, to judge whether m face includes previous object face.For example, if in m Track ID of m face
Find the Track ID of previous object face, then it is assumed that m face includes previous object face, does not otherwise include.
Can by the way that the Track ID of previous object face is compared with the Track ID of the maximum face of present frame,
To judge whether previous object face is maximum face.For example, if the Track ID of the two is identical, then it is assumed that previous object people
Face is maximum face, is not otherwise.
As it can be seen that determining current goal by the face detected in the previous object face and present frame in conjunction with previous frame
Face can be avoided some interim interference as described above, to correctly determine the target face for being currently intended to acquire.
In another embodiment, if first distance is greater than second distance, previous object face is determined as current mesh
Mark face, wherein first distance indicates the physical distance between the maximum face and camera of present frame, and second distance indicates first
Physical distance between preceding target face and camera.For example, if for present frame, between maximum face and camera
Physical distance be greater than physical distance between previous object face and camera, i.e., previous object face apart from camera more
Closely, it may be considered that current goal face is still previous object face.
If first distance is less than second distance and third distance is less than predetermined value, it is based on maximum face and previous mesh
Mark face respectively determines current goal face at a distance from the imaging region center of camera.Third distance can indicate previous
Physical distance between target face and maximum face.For example, if maximum face is closer apart from camera, but with previous mesh
The distance between face is marked also very close at this time can be based on any one in the two closer to imaging region center, to determine
Current goal face.Referring herein to predetermined value can be in conjunction with actual conditions, rule of thumb come it is preset.For example, should
Predetermined value can be 80mm.
If third distance is greater than predetermined value, maximum face can be determined as to current goal face.For example, if first
Physical distance between preceding target face and maximum face is larger, then it is assumed that maximum face is current goal face.
For example, above-mentioned third distance can be obtained by the difference between second distance and first distance.
Above-mentioned first distance, second distance and third distance can be determined according to the information that camera acquires.For example, logical
The location information for crossing each face of three-dimensional camera acquisition, can determine these physical distances.
In another embodiment, if maximum face than previous object face closer to imaging region center, will be maximum
Face is determined as current goal face.If previous object face than maximum face closer to imaging region center, will be previous
Target face is determined as current goal face.
As it can be seen that being worked as by the above-mentioned comparison based on the previous object face of previous frame and the maximum face of present frame to determine
Preceding target face can be avoided some unnecessary interference, such as user location movement etc. in collection process, thus correctly
Determine the target face for being currently intended to acquire.
As a specific implementation manner, each face can have corresponding Track ID, therefore current determining
During target face, the Track ID of the Track ID and maximum face that are actually based on previous object face are determined
The Track ID of current goal face.
From the above process it is found that other than first frame, the target face of each frame is actually based on the maximum of the frame
The target face of the previous frame of face and the frame is come what is determined, and in this way by handling frame by frame, final goal face is based on last
The target face of the previous frame of the maximum face and last frame of one frame determines.
In embodiments of the present invention, in order to export the image of final goal face, so needing in entire collection process
Safeguard the face template library for storing facial image.In embodiments of the present invention, face template library can be used for being stored in frame
The image of the different faces detected in each frame of sequence.
In one embodiment, it if detecting m face in the current frame, may determine whether to utilize this m people
The m present image of face in the current frame updates face template library.
Specifically, if present frame is the first frame in frame sequence, m present image can be stored in face template
In library.
For example, it is each to store the m face that m present image and m present image indicate in face template library
From Track ID, and this respective quality information of m present image can also be stored.
If present frame is not the first frame in frame sequence, can be retrieved in face template library whether have existed with
The corresponding m existing image of this m face.Search result be may then based on to determine whether to update face template library.For example,
The each Track ID stored in face template library can be matched with the Track ID of m face, to determine face
Whether the existing image of these faces is had existed in template library.
For example, it is assumed that having existed the existing image of the first face in m face in face template library, then can incite somebody to action
The present image of first face is determined compared with the existing image of the first face carries out quality based on quality comparison result
Whether face template library is updated.
That is, by present image and can have figure for the face for having existed image in face template library
As carrying out quality comparison.If the quality of present image is more excellent, for example, the quality that the mass ratio of present image has image is higher by
Existing image in face template library then can be replaced with the present image by certain proportion (for example, 30%).If having figure
The quality of picture is more excellent, then can not replace existing image.
In such manner, it is possible to the optimal facial image of quality be stored in face template library, so that the final goal people exported
The image of face is also that quality is optimal, so as to improve the subsequent application effect based on facial image.
For another example assuming that there is no the existing images of the second face in m face in face template library, and m is a
Do not have to include at least one Given Face recorded in face template library in face, that is to say, that in the current frame there is no with
Track the tracking of this at least one Given Face is lost to this at least one Given Face, i.e., (for example, tracking lose may be by
Caused by situations such as bowing or blocking), and the second face is the face newly detected in present frame, then can be by second
Face is compared with this at least one Given Face, and determines whether to update face template library based on comparison result.
If the 4th face alignment success in the second face and this at least one Given Face, it may be considered that the second people
Face and the 4th face are same faces.For example, can be according to the characteristic information of the second face and the spy of at least one Given Face
Reference ceases to be compared.This can use in this field any applicable algorithm to realize.If comparing score is higher than some
Predetermined value, it may be considered that comparing successfully.Predetermined value herein can be in conjunction with actual conditions, rule of thumb set.
It, can present image to the second face and the 4th people under the second face and the 4th successful situation of face alignment
The existing image of face carries out quality comparison.It, can be by face template library if the quality of the present image of the second face is more excellent
In the existing image of the 4th face replace with the present image of the second face.
It is understood that since the second face is the face newly detected in present frame, so what the second face had
Track ID and the Track ID of the 4th face are different.So, the second face and the 4th face alignment success and
The quality of the present image of second face more preferably in the case of, the existing image of the 4th face in face template library can be replaced
It is changed to the present image of the second face, and the Track ID of the second face is revised as to the Track ID of the 4th face.
If the second face and at least one Given Face compare failure, then it is assumed that the second face is the face newly increased,
It is not the face that tracking is lost, it is possible to store the present image of the second face into face template library.
In addition, if include the third face newly increased for the face before comparing in m face, then it can be by third
The present image of face is stored into face template library.
As it can be seen that can be avoided the interference during face tracking using the above-mentioned maintenance mode to face template library, thus
It can be correctly maintained in the image of all faces being likely to occur of acquisition phase, and can be ensured in face template library
The quality of facial image is all optimal.
As described above, the target face of maximum face and its previous frame based on last frame, can determine final goal
Face.For example, it may be determined that the Track ID of final goal face.In this way, final goal can be based at the end of frame sequence
The Track ID of face, find the corresponding facial image of Track ID from face template library, i.e. final goal face
Image.
In one embodiment, final goal people can be presented on associated display screen at the end of frame sequence
The image of face.
In another embodiment, it can recorde the Track ID of the target face of each frame in frame sequence, and can be with
The image of each target face found from face template library is presented on associated display screen, in this way can by with
Family selects the target facial image met the requirements as final goal facial image.
The embodiment of the present invention is described below in conjunction with specific example.It should be understood that these examples are merely to side
Those skilled in the art are helped to more fully understand the embodiment of the present invention, the range for the embodiment that is not intended to limit the present invention.
Fig. 2A is according to an embodiment of the present invention for safeguarding the signal of an example of the implementation in face template library
Figure.
In the example of Fig. 2A, it is assumed that the currently stored image for having 4 faces in face template library.Each face can have
Corresponding Track ID, it is assumed that be respectively 1,2,3 and 4.In addition, face template library can also store the image matter of this 4 faces
Measure information.For example, as shown in Figure 2 A, the picture quality for the face that Track ID is 1 is the face that 30, Track ID is 2
Picture quality is 60, and the picture quality of the face with Track ID 3 is that the picture quality for the face that 25, Track ID is 4 is
55.To simplify the explanation, corresponding facial image is not showed that in fig. 2.
The specific example for updating two kinds of situations in face template library is shown in Fig. 2A.
Situation (1):
If the present image of some face in the current frame is than having identical Track ID's in face template library
The existing picture quality of face is higher by certain proportion (such as 30%), then can update the Track ID couple in face template library
The image answered replaces existing image using present image.
For example, in fig. 2, it is assumed that the quality of the present image for the face that Track ID is 2 is 65, is better than face mould
The quality 60 of existing image in plate library, then replace with present image for existing image.
Situation (2):
If the face that Track ID is 2 and 4 (being expressed as losing ID in fig. 2) is not traced into the current frame, but
Be newly detect Track ID be 5 (being expressed as new ID in fig. 2) face, then can by Track ID be 5 face with
The face that Track ID is 2 and 4 is compared respectively.Assuming that the face alignment that face and Track ID that Track ID is 5 are 4
Success, for example compare score and be greater than 72, then it can compare the quality and Track ID of the present image for the face that Track ID is 5
For the quality of the existing image of 4 face.If the quality of the present image for the face that Track ID is 5 is more excellent, can incite somebody to action
The existing image for the face that Track ID is 4 replaces with the present image for the face that Track ID is 5, and the image is corresponding
Track ID is revised as 4 from 5.
As it can be seen that the mode in the maintenance face template library in through the embodiment of the present invention, can correctly be maintained in acquisition rank
The facial image that Duan Suoyou was likely to occur.
Fig. 2 B is according to an embodiment of the present invention for determining the schematic flow chart of the mode of current goal face.
In the example of Fig. 2 B, it is assumed that have determined that the maximum face of present frame, therefore the process of Fig. 2 B occurs true
After the maximum face of settled previous frame.
In step 201B, determine whether the m face detected in present frame includes previous object face (i.e. present frame
Previous frame target face).
If this m face does not include previous object face, in step 207B, the maximum face of present frame is determined
For current goal face.
If including previous object face in m face, in step 202B, determine whether previous object face is most
Big face.
If previous object face is maximum face, in step 207B, maximum face is determined as current goal people
Face.
If previous maximum face is not maximum face, come based on first distance, second distance and/or third distance true
Settled preceding target face.First distance can indicate the physical distance between maximum face and camera, and second distance can be with table
Show the physical distance between previous object face and camera, third distance can indicate previous object face and maximum face it
Between physical distance.
In step 203B, determine whether first distance is greater than second distance.If first distance is greater than second distance,
In step 208B, previous object face is determined as current goal face.
In step 204B, it is determined whether first distance is less than second distance and third distance is less than predetermined value.
If first distance is less than second distance and third distance is less than predetermined value, it is based on maximum face and previous mesh
Mark any one in face closer to camera imaging region center, to determine current goal face.In step 206B, determine
Maximum face whether than previous object face closer to imaging region center.If it is not, then in step 208B, it will be first
Preceding target face is determined as current goal face.If it does, maximum face is determined as current mesh then in step 209B
Mark face.
In step 205B, determine whether third distance is greater than predetermined value.If it does, then in step 209B, it will
Maximum face determines current goal face.
In order to make it easy to understand, being described below with reference to the example of Fig. 2 C-2F.
In the example of Fig. 2 C and 2D, it is assumed that the m face that camera detection arrives is 201C to 204C, and assumes face
201C is the maximum face in present frame, and face 202C is previous object face.As illustrated in figs. 2 c and 2d, first distance can be with
Indicate the physical distance between maximum face 201C and camera, second distance can indicate previous object face 202C and camera shooting
Physical distance between head.Third distance can indicate the physics between previous object face 202C and maximum face 201C away from
From.At this point, first distance is less than second distance.In addition, in the example of Fig. 2 C and 2D, it is assumed that third distance is less than predetermined value,
The imaging region center based on any one in maximum face and previous object face closer to camera is needed, at this time then to determine
Current goal face.
For example, in the example of Fig. 2 C, it is assumed that maximum face 201C is closer to imaging region center, then maximum face 201C
It can be determined that current goal face.And in the example of Fig. 2 D, previous object face 202C closer to imaging region center,
Then previous object face 202C is confirmed as current goal face.
In the example of Fig. 2 E, it is assumed that the m face that camera detection arrives is 201E to 204E, and assumes face 201E
It is previous object face, and face 202E is the maximum face of present frame.As shown in Figure 2 E, first distance can indicate most adult
Physical distance between face 202E and camera, second distance can indicate the object between previous object face 201E and camera
Manage distance.At this point,
In the example of Fig. 2 E, first distance is greater than second distance, then can be determined as previous object face 201E currently
Target face.
In the example of Fig. 2 F, it is assumed that the m face that camera detection arrives is 201F to 204F, and assumes face 201F
It is the maximum face in present frame, and face 202F is previous object face.As shown in Figure 2 F, first distance can indicate maximum
Physical distance between face 201F and camera, second distance can indicate between previous object face 202F and camera
Physical distance.Third distance can indicate the physical distance between previous object face 202F and maximum face 201F.In Fig. 2 F
Example in, it is assumed that third distance be greater than predetermined value, at this point it is possible to which maximum face 201F is determined as current goal face.
As it can be seen that in the present embodiment, being worked as by the maximum face of target face and present frame in conjunction with previous frame to determine
Preceding target face, some interference that can be effectively prevented from collection process, and avoid continually switching target face.
Fig. 3 is according to an embodiment of the present invention for acquiring the schematic block diagram of the device of facial image.
As shown in figure 3, device 300 may include receiving unit 310, detection unit 320 and face determination unit 330.
Receiving unit 310 receives present frame.Present frame is a frame in frame sequence, and frame sequence is in no carry out user
It is persistently shot in the case where interaction by camera.Detection unit 320 carries out Face datection to present frame.If detection unit
320 detect m face in the current frame, then face determination unit 330 determines the maximum face in m face, wherein m is
Positive integer.Face determination unit 330 also determines current goal face based on maximum face, so as at the end of frame sequence from people
The image of final goal face is exported in face template library.Final goal face is the target person by considering each frame of frame sequence
For face come what is determined, face template library is used to store the image of the different faces detected from each frame.
In embodiments of the present invention, frame sequence is persistently shot by camera in the case where no progress user interaction,
Face datection is carried out to each frame in frame sequence and determines target face, and by consider the target face of each frame come
It determines final goal face, exports the corresponding image of final goal face from face template library at the end of frame sequence in this way,
Thus, it is possible to complete man face image acquiring in the case where not interfering user and not needing user's cooperation, so as to promote use
Family experience.In addition, by the image for obtaining final goal face based on the frame sequence of lasting shooting, it can be relatively long
The preferable facial image of quality is selected in time, so as to improve the subsequent application effect based on facial image.
In one embodiment, if present frame is the first frame in frame sequence, face determination unit 330 can will most
Big face is determined as current goal face.If present frame is not the first frame in frame sequence, face determination unit 330 can be with
Current goal face is determined based on previous object face and maximum face, wherein previous object face is upper the one of present frame
The target face of frame.
In another embodiment, if m face does not include previous object face, face determination unit 330 can be incited somebody to action
Maximum face is determined as current goal face.
If m face includes previous object face and previous object face is maximum face, face determination unit
330 can be determined as maximum face current goal face.
If m face includes previous object face and previous object face is not maximum face, face determines single
Member 330 can determine current goal face based on the status information of maximum face and previous object face in the current frame.
In another embodiment, if first distance is greater than second distance, face determination unit 330 can be by previous mesh
Mark face is determined as current goal face, wherein the physical distance between first distance expression maximum face and camera, second
Distance indicates the physical distance between previous object face and camera.
If first distance is less than second distance and third distance is less than predetermined value, face determination unit 330 can be with
Based on maximum face and previous object face respectively at a distance from the imaging region center of camera, to determine current goal people
Face, wherein third distance indicates the physical distance between previous object face and maximum face.
If third distance is greater than predetermined value, maximum face can be determined as current goal by face determination unit 330
Face.
In another embodiment, if maximum face than previous object face closer to imaging region center, face is true
Maximum face can be determined as current goal face by order member 330.
If previous object face is than maximum face closer to imaging region center, face determination unit 330 can be incited somebody to action
Previous object face is determined as current goal face.
In another embodiment, device 300 can also include template determination unit 340.Template determination unit 340 can be true
It is fixed that the m present image of m face in the current frame whether is utilized to update face template library.
In another embodiment, if present frame is the first frame in frame sequence, template determination unit 340 can be by m
A present image storage is into face template library.
If present frame is not the first frame in frame sequence, template determination unit 340 can be in face template library searching
M corresponding with m face existing images whether are had existed, and are determined whether using m currently based on search result
Image update face template library.
In another embodiment, if m face includes the first face and have existed first in face template library
The existing image of face, then template determination unit 340 can be by the existing image of the present image of the first face and the first face
Quality comparison is carried out, and determines whether to update face template library based on quality comparison result.
If m face includes the second face but the existing image of the second face is not present in face template library, and
And there are the existing images of at least one Given Face in face template library, but m face does not include that at least one is specific
Face, then template determination unit 340 second face can be compared at least one Given Face, and be tied based on comparing
Fruit come determine whether update face template library.
If m face includes third face and has existed in m face in face template library in addition to the third party
The existing image of face except face, then template determination unit 340 can store the present image of third face to face mould
In plate library.
In another embodiment, if the quality of the present image of the first face is better than the matter of the existing image of the first face
Amount, then the existing image of the first face in face template library can be replaced with working as the first face by template determination unit 340
Preceding image.
If the quality of the existing image of the first face determines single better than the quality of the present image of the first face, template
The existing image of the first face in face template library can not be replaced with the present image of the first face by member 340.
In another embodiment, if the 4th face alignment success in the second face and at least one Given Face and
The quality of the present image of second face is better than the quality of the existing image of the 4th face, then template determination unit 340 can incite somebody to action
The existing image of the 4th face in face template library replaces with the present image of the second face.
If the quality of the second face and the success of the 4th face alignment and the existing image of the 4th face is better than the second people
The quality of the present image of face, then template determination unit 340 can not be by the existing image of the 4th face in face template library
Replace with the present image of the second face.
If the second face and at least one Given Face compare failure, template determination unit 340 can be by the second people
The present image of face is stored into face template library.
Each unit of device 300 can execute the corresponding steps in the embodiment of the method for Fig. 1 to 2B, therefore, in order to retouch
That states is succinct, and details are not described herein again for the concrete operations of each unit of device 300 and function.
Above-mentioned apparatus 300 can use hardware realization, can also use software realization, or can pass through the group of software and hardware
It closes to realize.For example, device 300 when using software realization, (can be compared memory by the processor of equipment where it
Such as nonvolatile memory) in corresponding executable instruction be read into memory operation to be formed.
Fig. 4 is according to an embodiment of the present invention for acquiring the hardware structure diagram of the calculating equipment of facial image.
As shown in figure 4, calculating equipment 400 may include at least one processor 410, memory 420, memory 430 and leads to
Believe interface 440, and at least one processor 410, memory 420, memory 430 and communication interface 440 are connected via bus 450
Together.At least one processor 410 executes at least one executable instruction for storing or encoding in memory 420 (on that is,
State the element realized in a software form).
In one embodiment, the executable instruction stored in memory 420 is executed by least one processor 410
When, so that calculating equipment 400 realizes the above various operations and functions described in conjunction with Fig. 1-3.It is succinct for description, herein not
It repeats again.
Calculating equipment 400 can be realized using any applicable form in this field, for example, it is including but not limited to desk-top
Computer, laptop computer, smart phone, tablet computer, consumer-elcetronics devices, wearable smart machine etc..
The embodiment of the invention also provides a kind of machine readable storage mediums.The machine readable storage medium can store
Executable instruction, executable instruction make machine realize the embodiment of the method described above with reference to Fig. 1-2 B when being executable by a machine
Detailed process.
For example, machine readable storage medium can include but is not limited to random access memory (Random Access
Memory, RAM), read-only memory (Read-Only Memory, ROM), electrically erasable programmable read-only memory
(Electrically-Erasable Programmable Read-Only Memory, EEPROM), static random access memory
Device (Static Random Access Memory, SRAM), hard disk, flash memory etc..
It should be understood that step and unit not all in above-mentioned each process and each structure drawing of device is all necessary
, certain step or units can be omitted according to the actual needs.The execution order of each step be not it is fixed, can be according to need
It is determined.Apparatus structure described in the various embodiments described above can be physical structure, be also possible to logical construction, that is, one
A little units may be realized by same physical entity, alternatively, some units may be realized by multiple physical entities respectively, or can be with
It is realized jointly by certain components in multiple autonomous devices.
Foregoing description is provided, is in order to which any person skilled in the art can be realized or use the embodiment of the present invention.
To those skilled in the art, the various modifications carried out to the embodiment of the present invention will be apparent, and can
In the case without departing from the scope of protection of the present invention, generic principles defined herein is applied to other modifications.Cause
This, the present invention is not limited to examples described hereins and design, but have and principle disclosed herein and novel feature phase
Consistent widest scope.