CN103093212A - Method and device for clipping facial images based on face detection and face tracking - Google Patents

Method and device for clipping facial images based on face detection and face tracking Download PDF

Info

Publication number
CN103093212A
CN103093212A CN2013100320503A CN201310032050A CN103093212A CN 103093212 A CN103093212 A CN 103093212A CN 2013100320503 A CN2013100320503 A CN 2013100320503A CN 201310032050 A CN201310032050 A CN 201310032050A CN 103093212 A CN103093212 A CN 103093212A
Authority
CN
China
Prior art keywords
face
people
tracking
target
frame
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.)
Granted
Application number
CN2013100320503A
Other languages
Chinese (zh)
Other versions
CN103093212B (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.)
Beijing Information Science and Technology University
Original Assignee
Beijing Information Science and Technology University
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 Beijing Information Science and Technology University filed Critical Beijing Information Science and Technology University
Priority to CN201310032050.3A priority Critical patent/CN103093212B/en
Publication of CN103093212A publication Critical patent/CN103093212A/en
Application granted granted Critical
Publication of CN103093212B publication Critical patent/CN103093212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for clipping facial images based on face detection and face tracking, and belongs to the technical field of the face tracking. The method comprises the steps: carrying out the face detection on to-be-detected images by adoption of a cascade classifier; carrying out the face tracking on a face goal through a mean value tracing algorithm when the face goal is detected; judging, on each frame, whether the face detection and the face tracking in a same frame correspond to the same face goal or not according to a position of the goal when the face goal leaves a detection area, and selecting out frames in which the face detection and the face tracking correspond to the same face goal; from the selected frames, calculating an overlap ratio between a window of the face detection and a window of the face tracking in the same frame, and serving a face image which is in a frame with the largest overlap ratio and is detected and obtained by the face detection as a clipped face image. The device comprises a detection module, a tracking module, a judging module and a clipping module. According to the method and the device for clipping the facial images based on the face detection and the face tracking, the clear face images are clipped, and accuracy of face tracking and a tracking effect are improved.

Description

Method and apparatus based on Face detection and tracking intercepting facial image
Technical field
The present invention relates to the face tracking technical field, particularly a kind of method and apparatus based on Face detection and tracking intercepting facial image.
Background technology
Along with the raising of demand for security, the commercial values such as people flow rate statistical, the identification of personnel's feature, face recognition technology have begun to appear, and progressively begin to use.The detection of people's face and face tracking have very important function and significance as the important step of these tasks.In recent years, the researchist has dropped into a large amount of time and efforts in this field, is devoted to develop method for detecting human face and tracking fast and accurately.
People's face detects and refer to determine the position of people's face and the process of size in given picture.At present, method for detecting human face commonly used is based on the method for detecting human face of Haar feature and Boosted cascade.The core concept of this algorithm is to select a plurality of Weak Classifiers with different classification capacities by iteration to be combined to form strong classifier, and is combined by a plurality of strong classifier sequencings and form cascade classifier, as final human-face detector.
Face tracking refers to determine the movement locus of someone's face and the process of size variation in input image sequence.The face tracking technology has important potential using value, and it is subject to researcher's generally attention as a gordian technique in the fields such as Automatic face recognition, video frequency searching, video monitoring.At present, face tracking method commonly used has mean-shift algorithm, cam-shift algorithm, particle filter etc.
Yet generally, the target of face tracking is in moving process, and the conditions such as the size shape of target, illumination can change.Present face tracking technology is along with the increase of following the tracks of frame number, tracking error can increase gradually, cause the tracking effect variation, the precision of tracking results is lower, is also requirement and function important in safety-protection system and find in the process that occurs people's face in video comparatively clearly a frame to preserve and use as database in the future.
Summary of the invention
In order to improve the precision of face tracking result, the invention provides a kind of method and apparatus that intercepts the method for facial image based on Face detection and tracking.Described technical scheme is as follows:
On the one hand, the invention provides a kind of method based on Face detection and tracking intercepting facial image, described method comprises:
Adopt cascade classifier to treat detected image and carry out the detection of people's face;
When people's face target being detected, use the average track algorithm to carry out face tracking to described people's face target;
When described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking;
In each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
Wherein, when people's face target being detected, use the average track algorithm that described people's face target is followed the tracks of, comprising:
When people's face target being detected, estimate that described people's face target is in the position of next frame appearance;
Calculate the weight of the position of each estimation, all weights that calculate are asked for weighted mean;
Obtain corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
Wherein, people's face detect and each frame of face tracking on, whether the people's face detection in frame same as the position judgment of target and face tracking corresponding same person face target, comprising:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
Wherein, described method also comprises:
When the people's face in the position judgment according to target goes out a certain frame detects same person face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
Wherein, described method also comprises:
When people's face in the position judgment according to target goes out a certain frame detected from the corresponding different people's face target of face tracking, the facial image that people's face in this frame is detected was as new people's face target, to described new people's face target start face tracking.
On the other hand, the present invention also provide a kind of based on Face detection and tracking intercepting facial image device, described device comprises:
Detection module is used for adopting cascade classifier to treat detected image and carries out the detection of people's face;
Tracking module is used for when described detection module detects people's face target, uses the average track algorithm to carry out face tracking to described people's face target;
Judge module, be used for when described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking;
Interception module, for each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
Wherein, described tracking module comprises:
Estimation unit is used for when described detection module detects people's face target, estimates that described people's face target is in the position of next frame appearance;
Computing unit for the weight of the position of calculating each estimation, is asked for weighted mean to all weights that calculate;
Tracking cell is used for obtaining corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
Wherein, described judge module is used for:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
Wherein, described tracking module also is used for:
When described judge module goes out people's face in a certain frame and detects same person face target corresponding to face tracking according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
Wherein, described tracking module also is used for:
When described judge module goes out people's face in a certain frame and detects from the corresponding different people's face target of face tracking according to the position judgment of target, the facial image that people's face in this frame is detected is as new people's face target, to described new people's face target start face tracking.
The beneficial effect that technical scheme provided by the invention is brought is: by the average track algorithm, people's face target that cascade classifier detects is carried out face tracking, when people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, select each frame that people's face detects same person face target corresponding to face tracking; In each frame of selecting, calculate the registration of the window of people's face detects in same frame window and face tracking, people's face on the frame of maximal degree of coincidence is detected the facial image obtain as the facial image of intercepting, taking full advantage of on the basis of detecting resource and tracking assets, intercepted facial image more clearly, improved the precision of face tracking, promoted tracking effect, and facial image provides the support on data in order to intercept clearly.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, during the below will describe embodiment, the accompanying drawing of required use is done to introduce simply, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram based on Face detection and tracking intercepting facial image that one embodiment of the invention provides;
Fig. 2 is the detection schematic diagram of the cascade classifier that provides of the embodiment of the present invention;
Fig. 3 is the method flow diagram based on Face detection and tracking intercepting facial image that another embodiment of the present invention provides;
Fig. 4 is the schematic diagram of the calculating registration that provides of the embodiment of the present invention;
Fig. 5 is the structure drawing of device based on Face detection and tracking intercepting facial image that one embodiment of the invention provides;
Fig. 6 is the structure drawing of device based on Face detection and tracking intercepting facial image that another embodiment of the present invention provides.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
The embodiment of the present invention relates to cascade classifier.Described cascade classifier is composed in series by a plurality of sorters, and the number of these a plurality of strong classifiers is called again the progression of cascade classifier.For example, the cascade classifier of 10 grades is comprised of etc. 10 strong classifiers.Usually, cascade classifier is trained carrying out the detection of people's face, can train with preprepared positive sample and negative sample during training.Wherein, the size and number of described positive sample and negative sample, the present invention is not specifically limited this, it is the facial image of 20*20 pixel size as positive sample, sample size is 10000, and negative sample is the 20*20 pixel image that occurring in nature does not contain arbitrarily people's face, and sample size is 20000 etc.Preferably, should try one's best as the image of sample diversified, draw materials from each living environment of people comparatively suitable.Can also whether reach the various indexs such as predetermined verification and measurement ratio, false alarm rate according to training result after training is completed sorter is adjusted, as progression of increasing cascade classifier etc.Wherein, predetermined verification and measurement ratio, numerical value the present invention of false alarm rate do not do restriction yet to this, can set as required, as the people's face verification and measurement ratio that presets each grade sorter are 99%, and non-face false alarm rate is 30% etc.For each grade sorter, in the process of training, namely identify for the negative sample that has detected and be non-face negative sample, before entering the next stage sorter, need to carry out sample replaces, these negative samples that detected are replaced with other identical negative sample of quantity, are then to input to the next stage sorter together with non-face negative sample with not detecting, and proceed training.
Wherein, cascade classifier is to carry out step by step people's face to detect, from first order sorter, each grade sorter carries out result after people's face detects and is input to and proceeds people's face in the sorter of next stage and detect, the result that the to the last complete output of one-level detection of classifier people face detects.
Referring to Fig. 1, one embodiment of the invention provides a kind of method based on Face detection and tracking intercepting facial image, comprising:
101: adopt cascade classifier to treat detected image and carry out the detection of people's face.
102: when people's face target being detected, use the average track algorithm to carry out face tracking to described people's face target.
103: when described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking.
104: in each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
Described image to be detected is generally video image, is one section continuous video, can certainly be the image of one group of static state, and the present invention is not specifically limited this.When cascade classifier is treated detected image and detected, can carry out people's face according to default detection window and detect, detect the existence whether people's face is arranged in each detection window.Big or small the present invention of detection window is not specifically limited this, can arrange as required, as be set to the window of 20*20 pixel size, the window of 25*25 pixel size or window of 30*30 pixel size etc.The translation order of described detection window on image can be for from top to bottom, and from left to right, the present invention is not specifically limited this.
Referring to Fig. 2, the cascade classifier that provides for the present embodiment carries out the schematic diagram that people's face detects.Wherein, cascade classifier is the N level, total N sorter.Treat step by step detected image from sorter 1 beginning and carry out people's face and detect, the people's face that detects just enters the next stage sorter by this sorter as Output rusults and proceeds to detect, and what detect non-facely just outputs in non-face pond as the result of refusing.After last sorter N detects and completes, the output net result is exactly to detect the people's face target that obtains.
Described average track algorithm refers to the weight of the estimated position of people's face target is got average, and follows the tracks of by position corresponding to this average.Particularly, when people's face target being detected, use the average track algorithm to carry out face tracking to described people's face target, can comprise:
When people's face target being detected, estimate that described people's face target is in the position of next frame appearance;
Calculate the weight of the position of each estimation, all weights that calculate are asked for weighted mean;
Obtain corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
In the present embodiment, people's face detect and each frame of face tracking on, whether the people's face detection in frame same as the position judgment of target and face tracking corresponding same person face target, comprising:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
In the present embodiment, described method also comprises:
When the people's face in the position judgment according to target goes out a certain frame detects same person face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
In the present embodiment, described method also comprises:
When people's face in the position judgment according to target goes out a certain frame detected from the corresponding different people's face target of face tracking, the facial image that people's face in this frame is detected was as new people's face target, to described new people's face target start face tracking.
In the present embodiment, people's face detects as carrying out in real time, can all detect by each frame, perhaps detects every several frames, detects etc. as carry out people's face every two frames, and the present invention is not specifically limited this.The step-length that the step-length of face tracking and people's face detect can be identical, also can be different, preferably, in the present embodiment, people's face detects with face tracking and adopts identical step-length to carry out, as is every frame execution Face detection and tracking or carries out Face detection and trackings etc. every two frames.
The said method that the present embodiment provides, by the average track algorithm, people's face target that cascade classifier detects is carried out face tracking, when people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, select each frame that people's face detects same person face target corresponding to face tracking; In each frame of selecting, calculate the registration of the window of people's face detects in same frame window and face tracking, people's face on the frame of maximal degree of coincidence is detected the facial image obtain as the facial image of intercepting, taking full advantage of on the basis of detecting resource and tracking assets, intercepted facial image more clearly, improved the precision of face tracking, promoted tracking effect, and facial image provides the support on data in order to intercept clearly.
Referring to Fig. 3, another embodiment of the present invention provides a kind of method based on Face detection and tracking intercepting facial image, comprising:
301: adopt cascade classifier to treat detected image and carry out the detection of people's face.
Described image to be detected is generally video image, is one section continuous video, can certainly be the image of one group of static state, and the present invention is not specifically limited this.
When cascade classifier is treated detected image and detected, can carry out people's face according to default detection window and detect, detect the existence whether people's face is arranged in each detection window.Big or small the present invention of detection window is not specifically limited this, can arrange as required, as be set to the window of 20*20 pixel size, the window of 25*25 pixel size or window of 30*30 pixel size etc.The translation order of described detection window on image can be for from top to bottom, and from left to right, the present invention is not specifically limited this.
302: when people's face target being detected, use the average track algorithm to carry out face tracking to described people's face target.
In the present embodiment, just start face tracking when people's face target being detected.The position of face tracking estimates according to algorithm.Usually can estimate a plurality of positions, this people's face target of described a plurality of positional representations is in the position that next frame may occur, and the weight corresponding according to each position can calculate a suitable position and follow the tracks of from these a plurality of positions.
This step can specifically comprise the following steps:
When people's face target being detected, estimate that described people's face target is in the position of next frame appearance;
Calculate the weight of the position of each estimation, all weights that calculate are asked for weighted mean;
Obtain corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
Wherein, can use predetermined state equation, as second order Markov chain auto-regressive equation, estimate that described people's face target is in the position of next frame appearance.Described Determining Weights can calculate colouring information in the HSV space, and calculates the weight of the position of each estimation according to color similarity.Particularly, the current frame that will follow the tracks of can be converted into the HSV image, obtain its brightness, colourity, the information of saturation degree; Then choose at random the position of people's face target around the position of previous frame as central point, extract take the image area information of target area as size; Then according to the positional information of previous frame people face target, the initial position message of people's face target, use suitable state equation such as second order Markov chain auto-regressive equation to estimate people's face target in the possible position of this frame.The central point of at every turn choosing is different, and is also different in the estimated position of this frame.For example, choose different central points 300 times, obtain altogether 300 estimated positions, calculate the characteristic information in the HSV space of each position, utilize histogram and initial pictures to compare, obtain the data of its similarity degree, give high weight to the large value of similarity degree, give low weight to the little value of similarity, last place-centric is obtained by the weight mean value computation of all estimated positions.
In the present embodiment, estimate that people's face target can be one in the position that next frame occurs, and is generally a plurality of.Can corresponding weight for each position that estimates, this weight just represents the possibility that this position occurs, weight shows that more greatly people's face target is just larger in the possibility of this position appearance, and on the contrary, weight is less shows that people's face target is just less in the possibility of this position appearance.When estimating a plurality of position, obtain the weight of each position, obtain a plurality of weights, then these a plurality of weight averaged are obtained weighted mean.
303: when described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
Wherein, described distance threshold and ratio threshold value can set in advance as required, and the present invention does not do restriction to concrete numerical value.For example, 5% of the distance threshold behaviour face detection window length of side can be set, be 5%, 10% etc. with the ratio threshold value setting.
In the present embodiment, distance between the top left corner apex of the top left corner apex of the target location that people's face detects and the target location of face tracking is less than or equal to distance threshold, and the ratio of people's face detection window length of side and the face tracking window length of side is during less than or equal to the ratio threshold value, think that people's face detects and two positions of face tracking are very approaching, these two positions can be considered as the position of same person face target, be also current people's face target of following the tracks of thereby can determine the people's face target that detects.
304: select each frame that people's face detects same person face target corresponding to face tracking.
305: in each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
Referring to Fig. 4, in the present embodiment, the registration of the window that in arbitrary frame, people's face detects and the window of face tracking can calculate in the following manner:
Wherein, the top left corner apex coordinate of the window of people's face detection is (x 1, y 1), the length of side is d 1, the top left corner apex coordinate of the window of face tracking is (x 2, y 2), the length of side is d 2, suppose that here two windows are square.
At first, calculate the width of coincidence window: comparison x 1, x 2Size, value x_maxleft=max (x 1, x 2) as the horizontal ordinate of the top left corner apex of coincidence window; Calculate again x 1+ d 1And x 2+ d 2, value x_min right=min (x 1+ d 1, x 2+ d 2) as the horizontal ordinate on the summit, the upper right corner of coincidence window; At this moment, can calculate the wide w=x_min right-x_maxleft of being of coincidence window.
Then, calculate the height of coincidence window: comparison y 1, y 2Size, value y_maxtop=max (y 1, y 2) as the ordinate of the top left corner apex of coincidence window; Calculate again y 1+ d 1And y 2+ d 2, value y_min bottom=min (y 1+ d 1, y 2+ d 2) as the ordinate on the summit, the lower left corner of coincidence window; The height that at this moment, can calculate coincidence window is h=y_minbottom-y_maxtop.
At last, be S=w * h according to the wide and high area that calculates coincidence window of coincidence window, calculate the area of people's face detection window
Figure BDA00002785115400091
According to the area of coincidence window and the area of people's face detection window, the registration that calculates people's face detection window and face tracking window is destination=min (S, S_detect)/S * 100%.
In the present embodiment, choose maximum registration in each registration that calculates, the facial image that in frame corresponding to the registration that this is maximum, people's face detects can obtain result the most clearly as the facial image that finally intercepts.If it is a plurality of that maximum registration has, can choose the frame of first appearance in a plurality of frames corresponding to these a plurality of the greatest coincide degrees, the facial image that people's face in this frame is detected is as the facial image that intercepts at last.
Started the tracking of people's face target in above-mentioned steps, if cascade classifier detects a plurality of people's face targets, can start the tracking of these a plurality of people's face targets, namely respectively everyone the face target that detects has been followed the tracks of, herein not explanation one by one.
Further, said method can also comprise the following steps:
When the people's face in the position judgment according to target goes out a certain frame detects same person face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
And/or said method can also comprise the following steps:
When people's face in the position judgment according to target goes out a certain frame detected from the corresponding different people's face target of face tracking, the facial image that people's face in this frame is detected was as new people's face target, to described new people's face target start face tracking.
In the present embodiment, can be called tracing positional (English: Track Location) in the position that present frame track human faces target obtains, because detecting, people's face also synchronously carrying out, therefore, the position of people's face target that also can obtain detecting at present frame, this position can be called detection position (English: Detect Location).Obviously, Track Location and Detect Location are two results that people's face detects and face tracking obtains for same person face target, and these two results have inevitable contact.In actual conditions, these two positions are usually extremely close, but from accuracy, Detect Location is generally more accurate to the judgement of target location, and Track Location is along with the increase to the tracking frame number of target, error will strengthen gradually, this is because along with Suitable For Moving-goal Problems, and the size shape of target, illumination etc. condition are all changing, increasing with initial information gap, tracking effect also can be worse and worse.Therefore, the present embodiment replaces with the position of the facial image that tracking obtains the position of detecting the facial image that obtains for people's face, makes Track Location=Detect Location, proceeds to follow the tracks of with the position after replacing, can improve tracking accuracy, reduce tracking error.After people's face target of following the tracks of is left tracing area, face tracking result and people's face testing result are compared, find the most approaching frame of face tracking result and people's face testing result position in tracing process, can think that people's face traceability of this moment is strong, disturb few, therefore sharpness is high, chooses people's face on this frame and detects the facial image that obtains as final sectional drawing, and degree of accuracy is higher.
In the present embodiment, when people's face target of following the tracks of shifts out tracing area, can stop following the tracks of, and the shared tracking assets of this people's face target is all discharged, thereby can save tracking assets, avoid the wasting of resources.
The said method that the present embodiment provides, by the average track algorithm, people's face target that cascade classifier detects is carried out face tracking, when people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, select each frame that people's face detects same person face target corresponding to face tracking; In each frame of selecting, calculate the registration of the window of people's face detects in same frame window and face tracking, people's face on the frame of maximal degree of coincidence is detected the facial image obtain as the facial image of intercepting, taking full advantage of on the basis of detecting resource and tracking assets, intercepted facial image more clearly, improved the precision of face tracking, promoted tracking effect, and facial image provides the support on data in order to intercept clearly.Adopt the average track algorithm to follow the tracks of in the present embodiment, weight averaged to each estimated position, because the various possibilities that people's face target occurs at next frame have been reflected in each estimated position, therefore, representative's face target is in the position that next frame occurs more comprehensively, more accurately in position corresponding to weighted mean, carries out the face tracking accuracy according to position corresponding to weighted mean higher.Tracking results and testing result are compared, mutually verification, making in the process of sectional drawing clear face image has had clear and definite data foundation.When tracking results and testing result position extremely near the time, can think that people's face traceability of this moment is strong, disturb less, sharpness is higher, therefore chooses this frame as final sectional drawing, this is also the present invention and the difference of the maximum in the product of market now.
Referring to Fig. 5, one embodiment of the invention provides a kind of device based on Face detection and tracking intercepting facial image, comprising:
Detection module 501 is used for adopting cascade classifier to treat detected image and carries out the detection of people's face;
Tracking module 502 is used for when detection module 501 detects people's face target, uses the average track algorithm to carry out face tracking to described people's face target;
Judge module 503, be used for when described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking;
Interception module 504, for each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
Referring to Fig. 6, tracking module 502 comprises:
Estimation unit 502a is used for when described detection module detects people's face target, estimates that described people's face target is in the position of next frame appearance;
Computing unit 502b for the weight of the position of calculating each estimation, asks for weighted mean to all weights that calculate;
Tracking cell 502c is used for obtaining corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
Wherein, judge module 503 is used for:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
Wherein, tracking module 502 also is used for:
When judge module 503 goes out people's face in a certain frame and detects same person face target corresponding to face tracking according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
Wherein, tracking module 502 also is used for:
When judge module 503 went out people's face in a certain frame and detects from the corresponding different people's face target of face tracking according to the position judgment of target, the facial image that people's face in this frame is detected was as new people's face target, to described new people's face target start face tracking.
The said apparatus that the present embodiment provides can be provided by the method that provides in above-mentioned either method embodiment, and the description in the square method embodiment of detailed process is not given unnecessary details herein.Described device can be applied in the electronic equipments such as computing machine, and the present invention is not specifically limited this.
The said apparatus that the present embodiment provides, by the average track algorithm, people's face target that cascade classifier detects is carried out face tracking, when people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, select each frame that people's face detects same person face target corresponding to face tracking; In each frame of selecting, calculate the registration of the window of people's face detects in same frame window and face tracking, people's face on the frame of maximal degree of coincidence is detected the facial image obtain as the facial image of intercepting, taking full advantage of on the basis of detecting resource and tracking assets, intercepted facial image more clearly, improved the precision of face tracking, promoted tracking effect, and facial image provides the support on data in order to intercept clearly.Adopt the average track algorithm to follow the tracks of, weight averaged to each estimated position, because the various possibilities that people's face target occurs at next frame have been reflected in each estimated position, therefore, representative's face target is in the position that next frame occurs more comprehensively, more accurately in position corresponding to weighted mean, carries out the face tracking accuracy according to position corresponding to weighted mean higher.Usually, the accuracy of people's face testing result usually all can be higher than the accuracy of face tracking result, therefore, the position of the facial image that obtains for the detection of people's face is replaced in the position of the facial image that tracking is obtained, proceed to follow the tracks of with the position after replacing, can improve tracking accuracy, reduce tracking error, and the data foundation that provides for the sectional drawing clear face image.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. the method based on Face detection and tracking intercepting facial image, is characterized in that, described method comprises:
Adopt cascade classifier to treat detected image and carry out the detection of people's face;
When people's face target being detected, use the average track algorithm to carry out face tracking to described people's face target;
When described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking;
In each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
2. method according to claim 1, is characterized in that, when people's face target being detected, uses the average track algorithm that described people's face target is followed the tracks of, and comprising:
When people's face target being detected, estimate that described people's face target is in the position of next frame appearance;
Calculate the weight of the position of each estimation, all weights that calculate are asked for weighted mean;
Obtain corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
3. method according to claim 1, is characterized in that, people's face detect and each frame of face tracking on, whether the people's face detection in frame same as the position judgment of target and face tracking corresponding same person face target, comprising:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
4. method according to claim 1, is characterized in that, described method also comprises:
When the people's face in the position judgment according to target goes out a certain frame detects same person face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
5. method according to claim 1, is characterized in that, described method also comprises:
When people's face in the position judgment according to target goes out a certain frame detected from the corresponding different people's face target of face tracking, the facial image that people's face in this frame is detected was as new people's face target, to described new people's face target start face tracking.
One kind based on Face detection and tracking intercepting facial image device, it is characterized in that, described device comprises:
Detection module is used for adopting cascade classifier to treat detected image and carries out the detection of people's face;
Tracking module is used for when described detection module detects people's face target, uses the average track algorithm to carry out face tracking to described people's face target;
Judge module, be used for when described people's face target is left surveyed area, on each frame of the detection of people's face and face tracking, people's face in frame same as the position judgment of target detects and face tracking corresponding same person face target whether, selects each frame of people's face detection same person face target corresponding to face tracking;
Interception module, for each frame of selecting, calculate the registration of people's face detects in same frame window and the window of face tracking, all registrations that relatively calculate detect people's face on the frame of maximal degree of coincidence the facial image that obtains as the facial image that intercepts.
7. device according to claim 6, is characterized in that, described tracking module comprises:
Estimation unit is used for when described detection module detects people's face target, estimates that described people's face target is in the position of next frame appearance;
Computing unit for the weight of the position of calculating each estimation, is asked for weighted mean to all weights that calculate;
Tracking cell is used for obtaining corresponding position according to described weighted mean, according to the described position that obtains, described people's face target is carried out face tracking.
8. device according to claim 6, is characterized in that, described judge module is used for:
On each frame of the detection of people's face and face tracking, calculate the distance between the top left corner apex of target location of the top left corner apex of the target location that people's face detects in this frame and face tracking, and calculate the ratio of the interior people's face detection window length of side of this frame and the face tracking window length of side, when described distance during less than or equal to default ratio threshold value, judges that the people's face in this frame detects same person face target corresponding to face tracking less than or equal to default distance threshold and described ratio.
9. device according to claim 6, is characterized in that, described tracking module also is used for:
When described judge module goes out people's face in a certain frame and detects same person face target corresponding to face tracking according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced as people's face detects the facial image that obtains, proceeded face tracking with the facial image after replacing.
10. device according to claim 6, is characterized in that, described tracking module also is used for:
When described judge module goes out people's face in a certain frame and detects from the corresponding different people's face target of face tracking according to the position judgment of target, the facial image that people's face in this frame is detected is as new people's face target, to described new people's face target start face tracking.
CN201310032050.3A 2013-01-28 2013-01-28 The method and apparatus of facial image is intercepted based on Face detection and tracking Active CN103093212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310032050.3A CN103093212B (en) 2013-01-28 2013-01-28 The method and apparatus of facial image is intercepted based on Face detection and tracking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310032050.3A CN103093212B (en) 2013-01-28 2013-01-28 The method and apparatus of facial image is intercepted based on Face detection and tracking

Publications (2)

Publication Number Publication Date
CN103093212A true CN103093212A (en) 2013-05-08
CN103093212B CN103093212B (en) 2015-11-18

Family

ID=48205760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310032050.3A Active CN103093212B (en) 2013-01-28 2013-01-28 The method and apparatus of facial image is intercepted based on Face detection and tracking

Country Status (1)

Country Link
CN (1) CN103093212B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345644A (en) * 2013-06-17 2013-10-09 华为终端有限公司 Method and device for detecting online-training targets
CN106886216A (en) * 2017-01-16 2017-06-23 深圳前海勇艺达机器人有限公司 Robot automatic tracking method and system based on RGBD Face datections
WO2017133605A1 (en) * 2016-02-03 2017-08-10 歌尔股份有限公司 Method and device for facial tracking and smart terminal
CN107292240A (en) * 2017-05-24 2017-10-24 深圳市深网视界科技有限公司 It is a kind of that people's method and system are looked for based on face and human bioequivalence
CN107992853A (en) * 2017-12-22 2018-05-04 深圳市友信长丰科技有限公司 Eye detection method, device, computer equipment and storage medium
CN108200334A (en) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 Image capturing method, device, storage medium and electronic equipment
CN108241853A (en) * 2017-12-28 2018-07-03 深圳英飞拓科技股份有限公司 A kind of video frequency monitoring method, system and terminal device
CN109034247A (en) * 2018-07-27 2018-12-18 北京以萨技术股份有限公司 A kind of recognition of face sample extraction method of the higher degree based on track algorithm
CN109087335A (en) * 2018-07-16 2018-12-25 腾讯科技(深圳)有限公司 A kind of face tracking method, device and storage medium
CN109145771A (en) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 A kind of face snap method and device
CN109558815A (en) * 2018-11-16 2019-04-02 恒安嘉新(北京)科技股份公司 A kind of detection of real time multi-human face and tracking
WO2019114696A1 (en) * 2017-12-13 2019-06-20 腾讯科技(深圳)有限公司 Augmented reality processing method, object recognition method, and related apparatus
CN109918997A (en) * 2019-01-22 2019-06-21 深圳职业技术学院 A kind of pedestrian target tracking based on multi-instance learning
CN110046548A (en) * 2019-03-08 2019-07-23 深圳神目信息技术有限公司 Tracking, device, computer equipment and the readable storage medium storing program for executing of face
CN110163029A (en) * 2018-02-11 2019-08-23 中兴飞流信息科技有限公司 A kind of image-recognizing method, electronic equipment and computer readable storage medium
CN110232331A (en) * 2019-05-23 2019-09-13 深圳大学 A kind of method and system of online face cluster
CN110717403A (en) * 2019-09-16 2020-01-21 国网江西省电力有限公司电力科学研究院 Face multi-target tracking method
CN112036242A (en) * 2020-07-28 2020-12-04 重庆锐云科技有限公司 Face picture acquisition method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266155A (en) * 2008-04-30 2009-11-12 Toshiba Corp Apparatus and method for mobile object tracking
JP2012080222A (en) * 2010-09-30 2012-04-19 Jvc Kenwood Corp Target tracking device and target tracking method
CN102592147A (en) * 2011-12-30 2012-07-18 深圳市万兴软件有限公司 Method and device for detecting human face
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266155A (en) * 2008-04-30 2009-11-12 Toshiba Corp Apparatus and method for mobile object tracking
JP2012080222A (en) * 2010-09-30 2012-04-19 Jvc Kenwood Corp Target tracking device and target tracking method
CN102592147A (en) * 2011-12-30 2012-07-18 深圳市万兴软件有限公司 Method and device for detecting human face
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁路宏 等: "基于人脸检测的人脸跟踪算法", 《计算机工程与应用》, 30 September 2001 (2001-09-30), pages 42 - 45 *

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014201971A1 (en) * 2013-06-17 2014-12-24 华为终端有限公司 Object detection method and device for online training
CN103345644B (en) * 2013-06-17 2016-08-24 华为终端有限公司 The object detection method of on-line training and device
CN103345644A (en) * 2013-06-17 2013-10-09 华为终端有限公司 Method and device for detecting online-training targets
WO2017133605A1 (en) * 2016-02-03 2017-08-10 歌尔股份有限公司 Method and device for facial tracking and smart terminal
US10747988B2 (en) 2016-02-03 2020-08-18 Goertek Inc Method and device for face tracking and smart terminal
CN106886216A (en) * 2017-01-16 2017-06-23 深圳前海勇艺达机器人有限公司 Robot automatic tracking method and system based on RGBD Face datections
CN107292240B (en) * 2017-05-24 2020-09-18 深圳市深网视界科技有限公司 Person finding method and system based on face and body recognition
CN107292240A (en) * 2017-05-24 2017-10-24 深圳市深网视界科技有限公司 It is a kind of that people's method and system are looked for based on face and human bioequivalence
US10891799B2 (en) 2017-12-13 2021-01-12 Tencent Technology (Shenzhen) Company Limited Augmented reality processing method, object recognition method, and related device
WO2019114696A1 (en) * 2017-12-13 2019-06-20 腾讯科技(深圳)有限公司 Augmented reality processing method, object recognition method, and related apparatus
CN109918975B (en) * 2017-12-13 2022-10-21 腾讯科技(深圳)有限公司 Augmented reality processing method, object identification method and terminal
CN109918975A (en) * 2017-12-13 2019-06-21 腾讯科技(深圳)有限公司 A kind of processing method of augmented reality, the method for Object identifying and terminal
CN107992853A (en) * 2017-12-22 2018-05-04 深圳市友信长丰科技有限公司 Eye detection method, device, computer equipment and storage medium
CN108200334A (en) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 Image capturing method, device, storage medium and electronic equipment
CN108241853A (en) * 2017-12-28 2018-07-03 深圳英飞拓科技股份有限公司 A kind of video frequency monitoring method, system and terminal device
CN110163029A (en) * 2018-02-11 2019-08-23 中兴飞流信息科技有限公司 A kind of image-recognizing method, electronic equipment and computer readable storage medium
CN110163029B (en) * 2018-02-11 2021-03-30 中兴飞流信息科技有限公司 Image recognition method, electronic equipment and computer readable storage medium
CN109087335A (en) * 2018-07-16 2018-12-25 腾讯科技(深圳)有限公司 A kind of face tracking method, device and storage medium
CN109034247B (en) * 2018-07-27 2021-04-23 北京以萨技术股份有限公司 Tracking algorithm-based higher-purity face recognition sample extraction method
CN109034247A (en) * 2018-07-27 2018-12-18 北京以萨技术股份有限公司 A kind of recognition of face sample extraction method of the higher degree based on track algorithm
CN109145771B (en) * 2018-08-01 2020-11-20 武汉普利商用机器有限公司 Face snapshot method and device
CN109145771A (en) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 A kind of face snap method and device
CN109558815A (en) * 2018-11-16 2019-04-02 恒安嘉新(北京)科技股份公司 A kind of detection of real time multi-human face and tracking
CN109918997A (en) * 2019-01-22 2019-06-21 深圳职业技术学院 A kind of pedestrian target tracking based on multi-instance learning
CN110046548A (en) * 2019-03-08 2019-07-23 深圳神目信息技术有限公司 Tracking, device, computer equipment and the readable storage medium storing program for executing of face
CN110232331A (en) * 2019-05-23 2019-09-13 深圳大学 A kind of method and system of online face cluster
CN110717403A (en) * 2019-09-16 2020-01-21 国网江西省电力有限公司电力科学研究院 Face multi-target tracking method
CN110717403B (en) * 2019-09-16 2023-10-24 国网江西省电力有限公司电力科学研究院 Face multi-target tracking method
CN112036242A (en) * 2020-07-28 2020-12-04 重庆锐云科技有限公司 Face picture acquisition method and device, computer equipment and storage medium
CN112036242B (en) * 2020-07-28 2023-07-21 重庆锐云科技有限公司 Face picture acquisition method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN103093212B (en) 2015-11-18

Similar Documents

Publication Publication Date Title
CN103093212A (en) Method and device for clipping facial images based on face detection and face tracking
CN107527009B (en) Remnant detection method based on YOLO target detection
Stalder et al. Cascaded confidence filtering for improved tracking-by-detection
US9008365B2 (en) Systems and methods for pedestrian detection in images
CN105260749B (en) Real-time target detection method based on direction gradient binary pattern and soft cascade SVM
US8447139B2 (en) Object recognition using Haar features and histograms of oriented gradients
US20230289979A1 (en) A method for video moving object detection based on relative statistical characteristics of image pixels
KR100682906B1 (en) Apparatus and method for detecting face in image using boost algorithm
WO2019114036A1 (en) Face detection method and device, computer device, and computer readable storage medium
CN103699905B (en) Method and device for positioning license plate
CN108596128B (en) Object recognition method, device and storage medium
CN104318225B (en) Detection method of license plate and device
CN106295532B (en) A kind of human motion recognition method in video image
CN105893946A (en) Front face image detection method
CN111383244B (en) Target detection tracking method
CN110991397B (en) Travel direction determining method and related equipment
CN109711322A (en) A kind of people's vehicle separation method based on RFCN
CN109460787A (en) IDS Framework method for building up, device and data processing equipment
CN103065163B (en) A kind of fast target based on static images detects recognition system and method
CN109255326A (en) A kind of traffic scene smog intelligent detecting method based on multidimensional information Fusion Features
Cai et al. Intelligent video analysis-based forest fires smoke detection algorithms
CN104268595B (en) general object detection method and system
CN103390151A (en) Face detection method and device
CN112347967B (en) Pedestrian detection method fusing motion information in complex scene
CN110472639B (en) Target extraction method based on significance prior information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20130508

Assignee: Zhongke Yuchen Technology Co.,Ltd.

Assignor: Beijing Information Science & Technology University

Contract record no.: X2020990000703

Denomination of invention: Face tracking method and device based on face detection

Granted publication date: 20151118

License type: Common License

Record date: 20201223