Summary of the invention
The present invention has been to provide a kind of fast and accurately target fine definition track algorithm to solve above-mentioned technical problem.
The present invention is to solve above-mentioned technical problem the technical scheme adopted is that the target based on Online Boosting
Contour tracing method, comprising the following steps:
1) initialization step:
1-1) by the 1st frame image segmentation of video at super-pixel;
1-2) to being divided into the image zooming-out partial log Euclidean distance covariance matrix L2ECM feature X after super-pixel,
Each L2ECM feature x for arranging a corresponding super-pixel in L2ECM feature;It is special that the L2ECM feature of 1st frame image is subjected to target
The differentiation of sign and background characteristics obtains the corresponding tag along sort y ∈ { -1 ,+1 } of each super-pixel, and+1 indicates target, and -1 indicates back
Scape finally obtains the classification results Y of image;
L2ECM feature X and classification results Y training Online Boosting classifier h 1-3) used;
2) the step of tracking:
At super-pixel and L2ECM feature X, t=2,3 ... 2-1) are extracted to t frame image segmentation in video, used
OnlineBoosting classifier h classifies to each column of eigenmatrix X, obtains classification results Yp;
2-2) using the region disconnected in plavini connection target, updated classification results are obtained
2-3) use L2ECM feature X and classification resultsOnline Boosting classifier h is updated, t is updated
=t+1, return step 2-1) processing video in next frame image;
Wherein, Online Boosting classifier h is by M Weak Classifier hmIt constitutes, Weak Classifier number m ∈ 1,
2 ..., M };Specific step is as follows for Online Boosting classifier h training:
Initialization step: initial setting up Weak Classifier hmThe accuracy of classificationError rateWith penalty coefficient λ,
Training step:
Classifier hmThe L2ECM feature x and corresponding tag along sort y for receiving the super-pixel of input, judge current class device hm
The L2ECM feature x classification results of super-pixel are judged: if hmTo the correct h of L2ECM feature x classification results of super-pixelm
(x)=y, then updateεmIt indicates to add penalty coefficient λ
Classifier h latermError rate;If hmTo the L2ECM feature x classification results mistake h of super-pixelm(x) ≠ y, then update
Updating classifier isIndicative function I:Judge whether to reach end update condition, if not, training step is returned to, under
The L2ECM feature x of one super-pixel is handled with corresponding tag along sort y, if so, terminating training step.
The present invention is learnt from the previous frame image of video to target using the method for Online Boosting on-line study
With the classifier of background, and the classifier to be used for the classification of target and background in next frame image, so that its processing speed adds
It is fast very much.
Innovation of the invention is: using super-pixel to containing tracking target in the problem of target finely tracks
Image carries out piecemeal, each super-pixel is seen as a point, and it reduce the complexities of calculating;Use the method for on-line study
Come segmentation object and background.In traditional Online Boosting algorithm, the weight of training sample be it is identical, will not be at any time
Between variation and change.But inside the fine tracking problem of target, since the moving target moment changes, so to online point
For class device distance when the current frame between the weight of picture frame more remote should be smaller, in order to realize what this weight gradually decayed
Effect, the present invention devise a kind of sample weights degree remote at any time and the Online Boosting classifier that successively decreases, with
The increase of video frame number, the performance of classifier become better and better, thus realize accurately tracking target fine definition.
Present invention has the advantages that sample weights degree remote at any time and the Online Boosting classification successively decreased
The Fast Classification ability of device makes the tracking to target fine definition reach real-time tracking effect.
Specific embodiment
The present invention divides the candidate region using super-pixel;Come using the target and background of video first frame image
Online Boosting classifier is initialized, the target classified to later each frame picture using the classifier in image
And background area, while classifier itself is updated with the result of classification.It is finally connected in target and is disconnected using the method for expansion
Region, thus obtain the target and background divided.
In order to facilitate the description contents of the present invention, some terms are illustrated first.
1: super-pixel, the segmentation of super-pixel and feature are extracted as existing ripe algorithm.Super-pixel refer in the picture by
A series of positions are adjacent and color, brightness, the similar pixel composition of Texture eigenvalue zonule, these zonules are protected mostly
The effective information of further progress image segmentation has been stayed, and will not generally destroy the boundary information of objects in images.Ours
For carrying out piecemeal to image in algorithm, a cumularsharolith is allowed to set the similar pixel of adjacent and feature with a super-pixel come table
Show.Super-pixel a width originally be Pixel-level (pixel-level) figure, be divided into region class (district-level)
Figure is a kind of to be abstracted to essential information.Superpixel segmentation method SLIC algorithm is in " SLIC used in this algorithm
A Superpixels Compared to State-of-the-art Superpixel Methods " Wen Zhongyou is specifically
Bright, segmentation result is as shown in Figure 1, the region that red contours fence up indicates a super-pixel.
2:L2ECM feature, partial log Euclidean distance covariance matrix Local Log-Euclidean Covariance
Matrix, this feature are extracted as existing ripe algorithm.For piece image, 1 institute of formula is configured to using its primitive character
The form shown, wherein I (x, y) indicates the pixel value of position (x, y) in image I, | | indicate absolute value, Ix(x, y) and Iy(x,
Y) first-order partial derivative to the direction x and y, I are respectively indicatedxx(x, y) and Iyy(x, y) respectively indicates the Second Order Partial to the direction x and y
Derivative.For a super-pixel s, enableWherein (xi, yi) ∈ s, d expression primitive characterLength,Indicate d dimension space, NsThe number for indicating the pixel for including in super-pixel s, then GsIt is a size
For dxNsMatrix, GsEach column be a primitive characterCalculate GsCovariance matrix Cs, then CsIt is a d
The matrix of × d, its latitude and NsIt is unrelated.In order to avoid calculate between covariance matrix geodesic curve 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) matrix symmetry, we take log (Cs) matrix
Half (upper triangular matrix) be arranged in a vector and just constitute L2ECM feature, then the corresponding L2ECM of a super-pixel is special
The length of sign is
3:Online Boosting classifier.One Online Boosting classifier h is by M Weak Classifier hm, m ∈
{ 1,2 ..., M } is constituted.Inputting is<x, y>, wherein x is the L2ECM features of 120 dimensions, y ∈ { -1 ,+1 }.
One Online Boosting classifier h is by M Weak Classifier hmIt constitutes, Weak Classifier number m ∈ 1,2 ...,
M};Specific step is as follows for Online Boosting classifier h training:
For 1~M Weak Classifier, initialize: WithRespectively indicate Weak Classifier hmPoint
The accuracy and error rate of class;
On the one hand initial setting up penalty coefficient λ=1, λ are used to punish hmThe correctness of classification, on the other hand for punishing sample
Originally weight decaying remote at any time;
For each classifier hm, according to Poisson distribution P (λ=1),It is followed to obtain one
Ring number k;The condition that circulation terminates, which can be, reaches cycle-index k, can also make other loop stop conditions customary in the art;
Method those skilled in the art that cycle-index k is obtained can also obtain by other means;
Circulation k times:
Seek m-th of Weak Classifier hmOptimal division surface: L0(hm, (x, y));L0(hm, (x, y)) and indicate a Weak Classifier
Training process, be used herein as existing decision tree decision stump as Weak Classifier, this training process and traditional
Boosting classifier is identical, may be otherwise and is trained using other existing Weak Classifiers;
If hm(x) classification is correct, i.e. y=hm(x),
ThenεmIt indicates to add this penalty term of λ
Classifier h latermError rate;
If hm(x) classification error, i.e. y ≠ hm(x),
Then
New classifier isNew for one
Input x, so that it may classify to it:
?WithIn the update mode of both λ,WithThis two for punishing hmThe correctness of classification, this of+1 is for the weight of sample at any time that decays.
Concrete operation step is as shown in Figure 2:
Initialization step:
Step 1, the first frame image for video divide the image into super-pixel using SLIC algorithm, super-pixel are arranged
Maximum number be 200.
Step 2, to being divided into the image zooming-out L2ECM feature after super-pixel to have tri- channels RGB for color image,
So the corresponding L2ECM feature of each super-pixel is the column vector of one 120 dimension.Assuming that entire image is divided into N number of super picture
Element, then the corresponding feature X of image is the matrix of 120xN.According to the markup information of first frame, available each super-pixel is corresponding
Tag along sort y ∈ { -1 ,+1 }, then the classification results Y of entire image is exactly the matrix of a Nx1.
Step 3 is made of using X obtained in step 2 and Y, feature X each super-pixel feature x, classification results Y by
The corresponding label y composition respectively of each training super-pixel feature x, Online Boosting classifier h.
Tracking step:
Step 4, since the second frame image of video, for each frame image, divided the image into using SLIC algorithm
Super-pixel extracts L2ECM feature, obtains corresponding eigenmatrix X.Using classifier h to each column (i.e. each super picture of X
Element) classify, obtain classification results Yp∈ { -1 ,+1 }.
Step 5 is connected to the region disconnected in target using the method for expansion, thus obtains new target and background
Classification results
Step 6, using X andClassifier h is updated, new classifier h is obtained, step 4 is gone to and carries out next frame
The processing of image.