CN103093212B - The method and apparatus of facial image is intercepted based on Face detection and tracking - Google Patents

The method and apparatus of facial image is intercepted based on Face detection and tracking Download PDF

Info

Publication number
CN103093212B
CN103093212B CN201310032050.3A CN201310032050A CN103093212B CN 103093212 B CN103093212 B CN 103093212B CN 201310032050 A CN201310032050 A CN 201310032050A CN 103093212 B CN103093212 B CN 103093212B
Authority
CN
China
Prior art keywords
face
tracking
target
frame
datection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310032050.3A
Other languages
Chinese (zh)
Other versions
CN103093212A (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

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of method and apparatus intercepting facial image based on Face detection and tracking, belong to face tracking technical field.Described method comprises: adopt cascade classifier to treat detected image and carry out Face datection; When human face target being detected, average track algorithm is used to carry out face tracking to human face target; When human face target leaves surveyed area, according to the whether corresponding same human face target of the Face datection in the same frame of the position judgment of target and face tracking on each frame, select each frame of Face datection same human face target corresponding to face tracking; In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.Described device comprises: detection module, tracking module, judge module and interception module.The present invention has intercepted facial image more clearly, improves precision and the tracking effect of face tracking.

Description

The method and apparatus of facial image is intercepted based on Face detection and tracking
Technical field
The present invention relates to face tracking technical field, particularly a kind of method and apparatus intercepting facial image based on Face detection and tracking.
Background technology
Along with the raising of demand for security, the commercial values such as people flow rate statistical, personnel characteristics's identification, face recognition technology have started to appear, and progressively start application.Face datection and face tracking, as the important step of these tasks, have very important function and significance.In recent years, 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.
Face datection refers to determines the position of face and the process of size in given picture.At present, conventional method for detecting human face is the method for detecting human face based on Haar characteristic sum Boosted cascade.The core concept of this algorithm selects multiple Weak Classifier with different classification capacity by iteration to carry out being combined to form strong classifier, and combined by multiple strong classifier sequencing and form cascade classifier, as final human-face detector.
Face tracking refers to determines the movement locus of certain face and the process of size variation in input image sequence.Face tracking technology has important potential using value, and it, as a gordian technique in the fields such as Automatic face recognition, video frequency searching, video monitoring, is subject to the most attention of researcher.At present, conventional face tracking method has mean-shift algorithm, cam-shift algorithm, particle filter etc.
But under normal circumstances, the target of face tracking is in moving process, and the condition such as size shape, illumination of target can change.Current face tracking technology is along with the increase following the tracks of frame number, tracking error can increase gradually, tracking effect is caused to be deteriorated, the precision of tracking results is lower, and to find in video in the process occurring face a frame comparatively clearly to preserve and use as database in the future be also importantly in safety-protection system want summation function.
Summary of the invention
In order to improve the precision of face tracking result, the invention provides a kind of method and apparatus intercepting 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 intercepting facial image based on Face detection and tracking, described method comprises:
Adopt cascade classifier to treat detected image and carry out Face datection;
When human face target being detected, the current frame that will follow the tracks of being converted into HSV image, obtaining its brightness, colourity, the information of saturation degree; The image area information sized by target area, as central point, is extracted in the position of human face target described in random selecting around the position of previous frame; Then according to the described positional information of previous frame human face target, the initial position message of human face target, predetermined state equation is used to estimate the position of described human face target in the described current frame appearance that will follow the tracks of; Colouring information is calculated in HSV space, and the weight of the position of each estimation is calculated according to color similarity, the value large to similarity degree gives high weight, the value little to similarity gives low weight, weighted mean is asked for all weights calculated, obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target;
When described human face target leaves surveyed area, on each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame, select each frame of Face datection same human face target corresponding to face tracking,
In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
Wherein, described method also comprises:
When going out the same human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
Wherein, described method also comprises:
When going out the different human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
On the other hand, present invention also offers a kind of device intercepting facial image based on Face detection and tracking, described device comprises:
Detection module, treats detected image for adopting cascade classifier and carries out Face datection;
Tracking module, for when human face target being detected, being converted into HSV image by the current frame that will follow the tracks of, obtaining its brightness, colourity, the information of saturation degree; The image area information sized by target area, as central point, is extracted in the position of human face target described in random selecting around the position of previous frame; Then according to the described positional information of previous frame human face target, the initial position message of human face target, predetermined state equation is used to estimate the position of described human face target in the described current frame appearance that will follow the tracks of; Colouring information is calculated in HSV space, and the weight of the position of each estimation is calculated according to color similarity, the value large to similarity degree gives high weight, the value little to similarity gives low weight, weighted mean is asked for all weights calculated, obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target;
Judge module, for when described human face target leaves surveyed area, on each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame, select each frame of Face datection same human face target corresponding to face tracking,
Interception module, for in each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
Wherein, described tracking module also for:
When the Face datection that described judge module goes out in a certain frame according to the position judgment of target same human face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
Wherein, described tracking module also for:
When the Face datection that described judge module goes out in a certain frame according to the position judgment of target different human face target corresponding to face tracking, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
The beneficial effect that technical scheme provided by the invention is brought is: carry out face tracking by average track algorithm to the human face target that cascade classifier detects, when human face target leaves surveyed area, on each frame of Face datection and face tracking, select each frame of Face datection same human face target corresponding to face tracking; In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted, making full use of on the basis detecting resource and tracking assets, intercept facial image more clearly, improve the precision of face tracking, improve tracking effect, and provide support in data for intercepting facial image clearly.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram intercepting facial image based on Face detection and tracking that one embodiment of the invention provides;
Fig. 2 is the detection schematic diagram of the cascade classifier that the embodiment of the present invention provides;
Fig. 3 is the method flow diagram intercepting facial image based on Face detection and tracking that another embodiment of the present invention provides;
Fig. 4 is the schematic diagram of the calculating registration that the embodiment of the present invention provides;
Fig. 5 is the structure drawing of device intercepting facial image based on Face detection and tracking that one embodiment of the invention provides;
Fig. 6 is the structure drawing of device intercepting facial image based on Face detection and tracking that another embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
The embodiment of the present invention relates to cascade classifier.Described cascade classifier is composed in series by multiple sorter, and the number of the plurality of strong classifier is also called the progression of cascade classifier.Such as, the cascade classifier of 10 grades is made up of etc. 10 strong classifiers.Usually, cascade classifier is through training carrying out Face datection, can train during training with preprepared positive sample and negative sample.Wherein, the size and number of described positive sample and negative sample, the present invention is not specifically limited this, as the facial image that positive sample is 20*20 pixel size, sample size is 10000, negative sample be occurring in nature arbitrarily not containing the 20*20 pixel image of face, sample size is 20000 etc.Preferably, the image as sample should be tried one's best variation, draws materials comparatively suitable from each living environment of people.Whether can also reach the predetermined various index such as verification and measurement ratio, false alarm rate according to training result after having trained to adjust sorter, as increased progression of cascade classifier etc.Wherein, numerical value the present invention of predetermined verification and measurement ratio, false alarm rate does not also limit this, can set as required, and if the Face datection rate presetting every first-level class device is 99%, non-face false alarm rate is 30% etc.For every first-level class device, in the process of training, namely identify as non-face negative sample for the negative sample detected, before entering next stage sorter, need to carry out sample replacement, the negative sample these detected replaces with other identical negative sample of quantity, being then input to next stage sorter together with non-face negative sample with not detecting, proceeding training.
Wherein, cascade classifier carries out Face datection step by step, from first order sorter, the result after every first-level class device carries out Face datection is input in the sorter of next stage and proceeds Face datection, and to the last first-level class device detects the result of complete output Face datection.
See Fig. 1, one embodiment of the invention provides a kind of method intercepting facial image based on Face detection and tracking, comprising:
101: adopt cascade classifier to treat detected image and carry out Face datection.
102: when human face target being detected, use average track algorithm to carry out face tracking to described human face target.
103: when described human face target leaves surveyed area, on each frame of Face datection and face tracking, according to the whether corresponding same human face target of the Face datection in the same frame of the position judgment of target and face tracking, select each frame of Face datection same human face target corresponding to face tracking.
104: in each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
Described image to be detected is generally video image, and be one section of continuous print video, can certainly be the image of one group of static state, the present invention be not specifically limited this.When detected image for the treatment of cascade classifier detects, Face datection can be carried out according to the detection window preset, detect the existence whether having face in each detection window.Size the present invention of detection window is not specifically limited this, can arrange as required, as being set to window of the window of 20*20 pixel size, the window of 25*25 pixel size or 30*30 pixel size etc.The shifted order of described detection window on image can be that from left to right, the present invention is not specifically limited this from top to bottom.
See Fig. 2, the cascade classifier provided for the present embodiment carries out the schematic diagram of Face datection.Wherein, cascade classifier is N level, total N number of sorter.From sorter 1, treat detected image step by step carry out Face datection, the face detected just by this sorter as Output rusults enter next stage sorter proceed detect, detect non-face just as refuse result output in non-face pond.It is exactly detect the human face target obtained that last sorter N has detected rear output net result.
The weight of the estimated position that described average track algorithm refers to human face target gets average, and follows the tracks of by the position that this average is corresponding.Particularly, when human face target being detected, using average track algorithm to carry out face tracking to described human face target, can comprise:
When human face target being detected, estimate the position that described human face target occurs at next frame;
Calculate the weight of the position of each estimation, weighted mean is asked for all weights calculated;
Obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target.
In the present embodiment, on each frame of Face datection and face tracking, according to the whether corresponding same human face target of the Face datection in the same frame of the position judgment of target and face tracking, comprising:
On each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame.
In the present embodiment, described method also comprises:
When going out the same human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
In the present embodiment, described method also comprises:
When going out the different human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
In the present embodiment, Face datection, for carry out in real time, all can detect by each frame, or detects every a few frame, and as carried out Face datection etc. every two frames, the present invention is not specifically limited this.The step-length of face tracking can be identical with the step-length of Face datection, also can be different, preferably, in the present embodiment, Face datection and face tracking adopt identical step-length to carry out, and perform Face detection and tracking as being every frame or performing Face detection and tracking etc. every two frames.
The said method that the present embodiment provides, by average track algorithm, face tracking is carried out to the human face target that cascade classifier detects, when human face target leaves surveyed area, on each frame of Face datection and face tracking, select each frame of Face datection same human face target corresponding to face tracking; In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted, making full use of on the basis detecting resource and tracking assets, intercept facial image more clearly, improve the precision of face tracking, improve tracking effect, and provide support in data for intercepting facial image clearly.
See Fig. 3, another embodiment of the present invention provides a kind of method intercepting facial image based on Face detection and tracking, comprising:
301: adopt cascade classifier to treat detected image and carry out Face datection.
Described image to be detected is generally video image, and be one section of continuous print video, can certainly be the image of one group of static state, the present invention be not specifically limited this.
When detected image for the treatment of cascade classifier detects, Face datection can be carried out according to the detection window preset, detect the existence whether having face in each detection window.Size the present invention of detection window is not specifically limited this, can arrange as required, as being set to window of the window of 20*20 pixel size, the window of 25*25 pixel size or 30*30 pixel size etc.The shifted order of described detection window on image can be that from left to right, the present invention is not specifically limited this from top to bottom.
302: when human face target being detected, use average track algorithm to carry out face tracking to described human face target.
In the present embodiment, when human face target being detected, just start face tracking.The position of face tracking estimates according to algorithm.Usually can estimate multiple position, the position that described this human face target of multiple positional representation may occur at next frame, the weight corresponding according to each position can calculate a suitable position and follow the tracks of from the plurality of position.
This step can specifically comprise the following steps:
When human face target being detected, estimate the position that described human face target occurs at next frame;
Calculate the weight of the position of each estimation, weighted mean is asked for all weights calculated;
Obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target.
Wherein, predetermined state equation can be used, as second order Markov chain auto-regressive equation, estimate the position that described human face target occurs at next frame.Described calculating weight can calculate colouring information in 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 HSV image, obtain its brightness, colourity, the information of saturation degree; Then the position of random selecting human face target around the position of previous frame is as central point, extracts the image area information sized by target area; Then according to the positional information of previous frame human face target, the initial position message of human face target, suitable state equation such as second order Markov chain auto-regressive equation is used to estimate human face target in the possible position of this frame.The central point at every turn chosen is different, also different in the estimated position of this frame.Such as, choose 300 different central points, obtain 300 estimated positions altogether, calculate the characteristic information of the HSV space of each position, utilize histogram and initial pictures to compare, obtain the data of its similarity degree, the value large to similarity degree gives high weight, the value little to similarity gives low weight, and last place-centric is calculated by the weight equal value of all estimated positions.
In the present embodiment, estimate that human face target can be one in the position that next frame occurs, be generally multiple.Can a corresponding weight for each position estimated, this weight just represents the possibility that this position occurs, weight shows that more greatly the possibility that human face target occurs in this position is larger, and on the contrary, the less possibility showing that human face target occurs in this position of weight is less.When estimating multiple position, obtaining the weight of each position, obtaining multiple weight, then weighted mean is obtained to the plurality of weight averaged.
303: when described human face target leaves surveyed area, on each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame.
Wherein, described distance threshold and fractional threshold can pre-set as required, and the present invention does not limit concrete numerical value.Such as, can arrange that distance threshold is the face detection window length of side 5%, fractional threshold is set to 5%, 10% etc.
In the present embodiment, distance between the top left corner apex of the top left corner apex of the target location of Face datection and the target location of face tracking is less than or equal to distance threshold, and when the ratio of the Face datection window length of side and the face tracking window length of side is less than or equal to fractional threshold, think Face datection and face tracking two positions closely, these two positions can be considered as the position of same human face target, thus can determine that the human face target detected also is current human face target of following the tracks of.
304: each frame selecting Face datection same human face target corresponding to face tracking.
305: in each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
See Fig. 4, in the present embodiment, in any frame, the registration of the window of Face datection and the window of face tracking can calculate in the following manner:
Wherein, the top left corner apex coordinate of the window of Face datection 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 two windows are square here.
First, the width of coincidence window is calculated: 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 x again 1+ d 1and x 2+ d 2, value x_minright=min (x 1+ d 1, x 2+ d 2) as the horizontal ordinate on the summit, the upper right corner of coincidence window; Now, can calculate the wide of coincidence window is w=x_minright-x_maxleft.
Then, the height of coincidence window is calculated: 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 y again 1+ d 1and y 2+ d 2, value y_minbottom=min (y 1+ d 1, y 2+ d 2) as the ordinate on the summit, the lower left corner of coincidence window; Now, the height that can calculate coincidence window is h=y_minbottom-y_maxtop.
Finally, the wide and high area calculating coincidence window according to coincidence window is S=w × h, calculates the area of Face datection window according to the area of coincidence window and the area of Face datection window, the registration calculating Face datection window and face tracking window is destination=min (S, S_detect)/S × 100%.
In the present embodiment, in each registration calculated, choose maximum registration, using the facial image of Face datection in frame corresponding for this maximum registration as the final facial image intercepted, can result the most clearly be obtained.If maximum registration has multiple, then can choose first frame occurred in multiple frames that the plurality of the greatest coincide degree is corresponding, using the facial image of Face datection in this frame as the last facial image intercepted.
Start the tracking of human face target in above-mentioned steps, if cascade classifier detects multiple human face target, then can start the tracking of the plurality of human face target, namely respectively each human face target detected has been followed the tracks of, do not illustrate one by one herein.
Further, said method can also comprise the following steps:
When going out the same human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
And/or said method can also comprise the following steps:
When going out the different human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
In the present embodiment, can be called that in the position that present frame track human faces target obtains tracing positional is (English: TrackLocation), because Face datection is also synchronously carrying out, therefore, also can obtain the position of the human face target detected at present frame, this position can be called detects position (English: DetectLocation).Obviously, TrackLocation and DetectLocation is two results that Face datection and face tracking obtain for same human face target, and these two results have inevitable contact.In a practical situation, these two positions are usually extremely close, but from accuracy, DetectLocation is general more accurate to the judgement of target location, and TrackLocation is along with the increase of the tracking frame number to target, error will strengthen gradually, this is because move along with target, the size shape of target, illumination etc. condition is all in change, increasing with initial information gap, tracking effect also can be worse and worse.Therefore, the position of following the tracks of the facial image obtained is replaced with the position of the facial image that Face datection obtains by the present embodiment, makes TrackLocation=DetectLocation, proceeds to follow the tracks of with the position after replacing, can tracking accuracy be improved, reduce tracking error.After the human face target of following the tracks of leaves tracing area, face tracking result and Face datection result are compared, find the frame that face tracking result and Face datection result position in tracing process are the most close, can think that face traceability is now strong, interference is few, sharpness is high, and therefore choose facial image that on this frame, Face datection obtains as final sectional drawing, degree of accuracy is higher.
In the present embodiment, when the human face target of following the tracks of shifts out tracing area, can stop following the tracks of, and the tracking assets shared by this human face target is all discharged, thus can tracking assets be saved, avoid the wasting of resources.
The said method that the present embodiment provides, by average track algorithm, face tracking is carried out to the human face target that cascade classifier detects, when human face target leaves surveyed area, on each frame of Face datection and face tracking, select each frame of Face datection same human face target corresponding to face tracking; In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted, making full use of on the basis detecting resource and tracking assets, intercept facial image more clearly, improve the precision of face tracking, improve tracking effect, and provide support in data for intercepting facial image clearly.Average track algorithm is adopted to follow the tracks of in the present embodiment, to the weight averaged of each estimated position, because each estimated position reflects the various possibilities that human face target occurs at next frame, therefore, position corresponding to weighted mean represents the position that human face target occurs at next frame more comprehensively, more accurately, carries out face tracking accuracy higher according to the position that weighted mean is corresponding.Tracking results and testing result are compared, mutually verifies, make in the process of sectional drawing clear face image, there has been clear and definite data foundation.When tracking results and testing result position very close to time, can think that face traceability is now strong, interference is few, and sharpness is higher, therefore chooses this frame as final sectional drawing, and this is also the maximum difference in the present invention and present market product.
See Fig. 5, one embodiment of the invention provides a kind of device intercepting facial image based on Face detection and tracking, comprising:
Detection module 501, treats detected image for adopting cascade classifier and carries out Face datection;
Tracking module 502, for when detection module 501 detects human face target, uses average track algorithm to carry out face tracking to described human face target;
Judge module 503, for when described human face target leaves surveyed area, on each frame of Face datection and face tracking, according to the whether corresponding same human face target of the Face datection in the same frame of the position judgment of target and face tracking, select each frame of Face datection same human face target corresponding to face tracking;
Interception module 504, for in each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
See Fig. 6, tracking module 502 comprises:
Estimation unit 502a, for when described detection module detects human face target, estimates the position that described human face target occurs at next frame;
Computing unit 502b, for calculating the weight of the position of each estimation, asks for weighted mean to all weights calculated;
Tracking cell 502c, for obtaining corresponding position according to described weighted mean, carries out face tracking according to the described position obtained to described human face target.
Wherein, judge module 503 for:
On each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame.
Wherein, tracking module 502 also for:
When the Face datection that judge module 503 goes out in a certain frame according to the position judgment of target same human face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
Wherein, tracking module 502 also for:
When the Face datection that judge module 503 goes out in a certain frame according to the position judgment of target different human face target corresponding to face tracking, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
The said apparatus that the present embodiment provides can perform the method provided in above-mentioned either method embodiment, and detailed process is shown in the description in embodiment of the method, does not repeat 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 average track algorithm, face tracking is carried out to the human face target that cascade classifier detects, when human face target leaves surveyed area, on each frame of Face datection and face tracking, select each frame of Face datection same human face target corresponding to face tracking; In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted, making full use of on the basis detecting resource and tracking assets, intercept facial image more clearly, improve the precision of face tracking, improve tracking effect, and provide support in data for intercepting facial image clearly.Average track algorithm is adopted to follow the tracks of, to the weight averaged of each estimated position, because each estimated position reflects the various possibilities that human face target occurs at next frame, therefore, position corresponding to weighted mean represents the position that human face target occurs at next frame more comprehensively, more accurately, carries out face tracking accuracy higher according to the position that weighted mean is corresponding.Usually, the accuracy of Face datection result usually all can higher than the accuracy of face tracking result, therefore, the position of following the tracks of the facial image obtained is replaced with the position of the facial image that Face datection obtains, proceed to follow the tracks of with the position after replacing, can tracking accuracy be improved, reduce tracking error, and the data foundation provided for sectional drawing clear face image.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. intercept a method for facial image based on Face detection and tracking, it is characterized in that, described method comprises:
Adopt cascade classifier to treat detected image and carry out Face datection;
When human face target being detected, the current frame that will follow the tracks of being converted into HSV image, obtaining its brightness, colourity, the information of saturation degree; The image area information sized by target area, as central point, is extracted in the position of human face target described in random selecting around the position of previous frame; Then according to the described positional information of previous frame human face target, the initial position message of human face target, predetermined state equation is used to estimate the position of described human face target in the described current frame appearance that will follow the tracks of; Colouring information is calculated in HSV space, and the weight of the position of each estimation is calculated according to color similarity, the value large to similarity degree gives high weight, the value little to similarity gives low weight, weighted mean is asked for all weights calculated, obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target;
When described human face target leaves surveyed area, on each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame, select each frame of Face datection same human face target corresponding to face tracking,
In each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
2. method according to claim 1, is characterized in that, described method also comprises:
When going out the same human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
3. method according to claim 1, is characterized in that, described method also comprises:
When going out the different human face target corresponding to face tracking of the Face datection in a certain frame according to the position judgment of target, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
4. intercept a device for facial image based on Face detection and tracking, it is characterized in that, described device comprises:
Detection module, treats detected image for adopting cascade classifier and carries out Face datection;
Tracking module, for when human face target being detected, being converted into HSV image by the current frame that will follow the tracks of, obtaining its brightness, colourity, the information of saturation degree; The image area information sized by target area, as central point, is extracted in the position of human face target described in random selecting around the position of previous frame; Then according to the described positional information of previous frame human face target, the initial position message of human face target, predetermined state equation is used to estimate the position of described human face target in the described current frame appearance that will follow the tracks of; Colouring information is calculated in HSV space, and the weight of the position of each estimation is calculated according to color similarity, the value large to similarity degree gives high weight, the value little to similarity gives low weight, weighted mean is asked for all weights calculated, obtain corresponding position according to described weighted mean, according to the described position obtained, face tracking is carried out to described human face target;
Judge module, for when described human face target leaves surveyed area, on each frame of Face datection and face tracking, distance between the top left corner apex calculating the top left corner apex of the target location of Face datection in this frame and the target location of face tracking, and calculate the ratio of the Face datection window length of side and the face tracking window length of side in this frame, when described distance is less than or equal to default distance threshold and described ratio is less than or equal to default fractional threshold, judge the Face datection same human face target corresponding to face tracking in this frame, select each frame of Face datection same human face target corresponding to face tracking,
Interception module, for in each frame selected, calculate the registration of the window of Face datection and the window of face tracking in same frame, compare all registrations calculated, the facial image obtained by Face datection on the frame of maximal degree of coincidence is as the facial image intercepted.
5. device according to claim 4, is characterized in that, described tracking module also for:
When the Face datection that described judge module goes out in a certain frame according to the position judgment of target same human face target corresponding to face tracking, the facial image that face tracking in this frame obtains is replaced with the facial image that Face datection obtains, proceed face tracking with the facial image after replacing.
6. device according to claim 4, is characterized in that, described tracking module also for:
When the Face datection that described judge module goes out in a certain frame according to the position judgment of target different human face target corresponding to face tracking, the facial image arrived by Face datection in this frame, as new human face target, starts face tracking to described new human face target.
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 CN103093212A (en) 2013-05-08
CN103093212B true 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)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345644B (en) * 2013-06-17 2016-08-24 华为终端有限公司 The object detection method of on-line training and device
CN105760826B (en) 2016-02-03 2020-11-13 歌尔股份有限公司 Face tracking method and device and intelligent terminal
CN106886216B (en) * 2017-01-16 2020-08-14 深圳前海勇艺达机器人有限公司 Robot automatic tracking method and system based on RGBD face detection
CN107292240B (en) * 2017-05-24 2020-09-18 深圳市深网视界科技有限公司 Person finding method and system based on face and body recognition
CN109918975B (en) * 2017-12-13 2022-10-21 腾讯科技(深圳)有限公司 Augmented reality processing method, object identification method and terminal
CN107992853B (en) * 2017-12-22 2021-04-16 深圳市友信长丰科技有限公司 Human eye detection method and device, computer equipment and storage medium
CN108200334B (en) * 2017-12-28 2020-09-08 Oppo广东移动通信有限公司 Image shooting method and 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
CN110163029B (en) * 2018-02-11 2021-03-30 中兴飞流信息科技有限公司 Image recognition method, electronic equipment and computer readable storage medium
CN109087335B (en) * 2018-07-16 2022-02-22 腾讯科技(深圳)有限公司 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
CN109145771B (en) * 2018-08-01 2020-11-20 武汉普利商用机器有限公司 Face snapshot method and device
CN109558815A (en) * 2018-11-16 2019-04-02 恒安嘉新(北京)科技股份公司 A kind of detection of real time multi-human face and tracking
CN109918997B (en) * 2019-01-22 2023-04-07 深圳职业技术学院 Pedestrian target tracking method 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
CN110232331B (en) * 2019-05-23 2022-09-27 深圳大学 Online face clustering method and system
CN110717403B (en) * 2019-09-16 2023-10-24 国网江西省电力有限公司电力科学研究院 Face multi-target tracking method
CN112036242B (en) * 2020-07-28 2023-07-21 重庆锐云科技有限公司 Face picture acquisition method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* 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
JP5229593B2 (en) * 2010-09-30 2013-07-03 株式会社Jvcケンウッド Target tracking device and target tracking method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
基于人脸检测的人脸跟踪算法;梁路宏 等;《计算机工程与应用》;20010930;42-45 *

Also Published As

Publication number Publication date
CN103093212A (en) 2013-05-08

Similar Documents

Publication Publication Date Title
CN103093212B (en) The method and apparatus of facial image is intercepted based on Face detection and tracking
CN107527009B (en) Remnant detection method based on YOLO target detection
Stalder et al. Cascaded confidence filtering for improved tracking-by-detection
CN109918969B (en) Face detection method and device, computer device and computer readable storage medium
US8401292B2 (en) Identifying high saliency regions in digital images
US9008365B2 (en) Systems and methods for pedestrian detection in images
CN109447169A (en) The training method of image processing method and its model, device and electronic system
CN108647649B (en) Method for detecting abnormal behaviors in video
CN103699905B (en) Method and device for positioning license plate
CN110807385A (en) Target detection method and device, electronic equipment and storage medium
CN108288027A (en) A kind of detection method of picture quality, device and equipment
EP2128818A1 (en) Method of moving target tracking and number accounting
CN111813997B (en) Intrusion analysis method, device, equipment and storage medium
CN105893946A (en) Front face image detection method
WO2009109127A1 (en) Real-time body segmentation system
CN104036284A (en) Adaboost algorithm based multi-scale pedestrian detection method
US20230196783A1 (en) Method, system and computer readable medium for estimating crowd level using image of crowd
CN109685045A (en) A kind of Moving Targets Based on Video Streams tracking and system
CN105868708A (en) Image object identifying method and apparatus
CN110991397B (en) Travel direction determining method and related equipment
CN105303163B (en) A kind of method and detection device of target detection
CN107194393A (en) A kind of method and device for detecting Provisional Number Plate
US20170053172A1 (en) Image processing apparatus, and image processing method
CN113065379B (en) Image detection method and device integrating image quality and electronic equipment
CN106682691A (en) Image-based target detection method and apparatus

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

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

EE01 Entry into force of recordation of patent licensing contract