Summary of the invention
The present invention solves above-mentioned technical problem is that, it is provided that one target fine definition track algorithm fast and accurately.
The present invention solves that above-mentioned technical problem be employed technical scheme comprise that, a kind of based on Online Boosting
Target fine definition tracking, comprises the following steps:
1) initialization step:
1-1) the 1st two field picture of video is divided into super-pixel;
1-2) to being divided into image zooming-out partial log Euclidean distance covariance matrix L2ECM feature X after super-pixel,
L2ECM feature x of the corresponding super-pixel of every string in L2ECM feature;The L2ECM feature of the 1st two field picture is carried out target special
Levying the differentiation with background characteristics, {-1 ,+1} ,+1 represent target, and-1 represents the back of the body to obtain tag along sort y ∈ corresponding to each super-pixel
Scape, finally gives the classification results Y of image;
L2ECM feature X 1-3) used and classification results Y train Online Boosting grader h;
2) step followed the tracks of:
2-1) t two field picture in video is divided into super-pixel and extracts L2ECM feature X, t=2,3 ..., use
Every string of eigenmatrix X is classified by Online Boosting grader h, obtains classification results Yp;
2-2) use the region that plavini connection target breaks, the classification results after being updated
2-3) use L2ECM feature X and classification resultsOnline Boosting grader h is updated, updates t
=t+1, returns step 2-1) process the next frame image in video;
Wherein, Online Boosting grader h is constituted h by M Weak Classifierm, Weak Classifier numbering m ∈ 1,
2,…,M};Specifically comprising the following steps that of Online Boosting grader h training
Initialization step: initial setting up Weak Classifier hmThe accuracy of classificationError rateWith penalty coefficient λ,
Training step:
Grader hmReceive L2ECM feature x of the super-pixel of input and corresponding tag along sort y, it is judged that current class device hm
The L2ECM feature x classification results of super-pixel is judged: if hmThe L2ECM correct h of feature x classification results to super-pixelm
X ()=y, then updateεmRepresent plus penalty coefficient λ
Grader h afterwardsmError rate;If hmL2ECM feature x classification results mistake h to super-pixelmX () ≠ y, then update
Renewal grader isClassification function I: Judge whether to reach to terminate update condition, as no, return training step, under
L2ECM feature x of one super-pixel and corresponding tag along sort y process, in this way, terminate training step.
The present invention uses the method for Online Boosting on-line study from the previous frame image learning of video to target
With the grader of background, and this grader is used for the classification of target and background in next frame image so that its processing speed adds
Fast a lot.
The innovation of the present invention is: use super-pixel to containing following the tracks of target in the problem that target is finely followed the tracks of
Image carries out piecemeal, and each super-pixel is seen as a point, it reduces the complexity of calculating;The method using on-line study
Come segmentation object and background.In traditional Online Boosting algorithm, the weight of training sample is identical, will not be at any time
Between change and change.But inside the fine tracking problem of target, owing to the moving target moment changes, so online is divided
For class device distance when the current frame between the weight of picture frame the most remote should be the least, in order to realize what this weight gradually decayed
Effect, the present invention devises a kind of sample weights degree remote in time and the Online Boosting grader that successively decreases, with
The increase of video frame number, the performance of grader is become better and better, thus realizes following the tracks of accurately the fine definition of target.
Present invention have the advantages that, sample weights degree remote in time and the Online Boosting classification successively decreased
The Fast Classification ability of device makes to have reached the tracking of target fine definition real-time tracking effect.
Detailed description of the invention
The present invention uses super-pixel to divide this candidate region;The target and background using video the first two field picture is come
Initialize Online Boosting grader, use this grader to carry out the target in classification chart picture in later each frame picture
And background area, update grader self by the result of classification simultaneously.The method connection target finally using expansion breaks
Region, thus obtain the target and background split.
Describe present disclosure for convenience, first some terms are illustrated.
1: super-pixel, the segmentation of super-pixel and feature be extracted as existing ripe algorithm.Super-pixel refer in the picture by
The zonule of the pixel composition that a series of positions are adjacent and color, brightness, Texture eigenvalue are similar, these zonules are protected mostly
Stay the effective information carrying out image segmentation further, and typically will not destroy the boundary information of objects in images.Ours
For image is carried out piecemeal in algorithm so that a cumularsharolith puts adjacent and feature similarity pixel can carry out table by a super-pixel
Show.Super-pixel is the figure of Pixel-level (pixel-level) originally a width, is divided into region class (district-level)
Figure, be a kind of essential information is carried out abstract.The superpixel segmentation method SLIC algorithm used in this algorithm is at " SLIC
Superpixels Compared to State-of-the-art Superpixel Methods " literary composition has specifically
Bright, its segmentation result is as it is shown in figure 1, one super-pixel of region representation of fencing up of red contours.
2:L2ECM feature, partial log Euclidean distance covariance matrix Local Log-Euclidean Covariance
Matrix, this feature be extracted as existing ripe algorithm.For piece image, its primitive character is used to be configured to formula 1 institute
The form shown, wherein I (x, y) represent in image I (x, y) pixel value of position, | | represent absolute value, Ix(x, y) and Iy(x,
Y) first-order partial derivative to x and y direction, I are represented respectivelyxx(x, y) and Iyy(x y) represents the Second Order Partial to x and y direction respectively
Derivative.For super-pixel s, orderWherein (xi,yi) ∈ s, d represents primitive characterLength,Represent d dimension space, NsRepresent the number of the pixel comprised in super-pixel s, then GsIt it is a size
For dxNsMatrix, GsEvery string be a primitive characterCalculate GsCovariance matrix Cs, then CsIt is a d
The matrix of × d, its latitude and NsUnrelated.In order to avoid the geodesic curve that calculates between covariance matrix in the Riemann space away from
From, we are by CsBe converted to the log (C in theorem in Euclid spaces), due to log (Cs) symmetry of matrix, we take log (Cs) matrix
Half (upper triangular matrix) be arranged in a vector and just constitute L2ECM feature, then L2ECM corresponding to super-pixel is special
That levies is a length of
3:Online Boosting grader.One Online Boosting grader h is by M Weak Classifier hm,m∈
1,2 ..., M} is constituted.Input is<x, y>, and wherein x is the L2ECM feature of 120 dimensions, y ∈ {-1 ,+1}.
One Online Boosting grader h is constituted h by M Weak Classifierm, Weak Classifier numbering m ∈ 1,2 ...,
M};Specifically comprising the following steps that of Online Boosting grader h training
For 1~M Weak Classifier, initialize:WithRepresent Weak Classifier h respectivelymPoint
The accuracy of class and error rate;
Initial setting up penalty coefficient λ=1, λ mono-aspect is used for punishing hmThe correctness of classification, on the other hand is used for punishing sample
This weight decay remote in time;
For each grader hm, according to Poisson distribution P (λ=1),Obtain a circulation
Number of times k;The condition of loop ends can be to reach cycle-index k, it is possible to so that other loop stop conditions customary in the art;Follow
Method those skilled in the art that ring number of times k obtains can also obtain by other means;
Circulate k time:
Seek m-th Weak Classifier hmOptimum division surface: L0(hm, (x, y));L0(hm, (x, y)) represents a Weak Classifier
Training process, be used herein as existing decision tree decision stump as Weak Classifier, this training process is with traditional
Boosting grader is identical, may be otherwise other existing Weak Classifiers of use and is trained;
If hmX () classification is correct, i.e. y=hm(x),
ThenεmRepresent plus this penalty term of λ
Grader h afterwardsmError rate;
If hm(x) classification error, i.e. y ≠ hm(x),
Then
New grader isNew for one
Input x, it is possible to it is classified:
?WithIn the update mode of both λ,WithThese two are used for punishing hmThe correctness of classification, this of+1 is for decaying sample weight in time.
Concrete operation step is as shown in Figure 2:
Initialization step:
Step 1, the first two field picture for video, use SLIC algorithm to divide the image into into super-pixel, arrange super-pixel
Maximum number be 200.
Step 2, to being divided into the image zooming-out L2ECM feature after super-pixel, for coloured image, have tri-passages of RGB,
So L2ECM feature corresponding to each super-pixel is the column vector of one 120 dimension.Assume that entire image is divided into N number of super picture
Element, then image characteristic of correspondence X is the matrix of 120xN.According to the markup information of the first frame, each super-pixel can be obtained corresponding
Tag along sort y ∈ {-1 ,+1}, then the classification results Y of entire image is exactly the matrix of a Nx1.
Step 3, using in step 2 X and Y obtained, feature X is made up of each super-pixel feature x, classification results Y by
The difference label y composition that each training super-pixel feature x is corresponding, Online Boosting grader h.
Tracking step:
Step 4, from the beginning of the second two field picture of video, for each two field picture, use SLIC algorithm to divide the image into into
Super-pixel, extracts L2ECM feature, obtains characteristic of correspondence matrix X.Use grader h every string (i.e. each super picture to X
Element) classify, obtain classification results Yp∈{-1,+1}。
Step 5, use the region that breaks of method connection target expanded, thus obtain new target and background
Classification results
Step 6, use X andGrader h is updated, obtains new grader h, forward step 4 to and carry out next frame
The process of image.