CN103823973B - Target tracking method based on MeanShift algorithm - Google Patents
Target tracking method based on MeanShift algorithm Download PDFInfo
- Publication number
- CN103823973B CN103823973B CN201410061346.2A CN201410061346A CN103823973B CN 103823973 B CN103823973 B CN 103823973B CN 201410061346 A CN201410061346 A CN 201410061346A CN 103823973 B CN103823973 B CN 103823973B
- Authority
- CN
- China
- Prior art keywords
- target
- centerdot
- sigma
- double
- smooth function
- 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
Links
Abstract
The invention discloses a target tracking method based on a MeanShift algorithm. The method cam improve reliability in the tracking process of a single target, increase tracking speed, and reduce the situation that a tracking frame shifts away from the target. The method comprises the steps: (1) calculating a characteristic value of each pixel point in an original image and generating a characteristic image, and establishing a characteristic model of the target by utilizing a double-core smooth function according to the characteristic image; (2) improving a single core smooth function in an original MeanShift algorithm into the double-core smooth function; (3) in order to ensure convergence of the algorithm, enabling the double-core smooth function to meet the limit condition of a binary convex function; (4) in order to ensure standardization of the characteristic model of the tracked target, obtaining a standardized constant formula.
Description
Technical field
The invention belongs to the technical field of Digital Image Processing, intelligent video monitoring and machine vision is and in particular to one kind
Method for tracking target based on MeanShift algorithm.
Background technology
The basis of machine vision applications is usually to the real-time modeling method of video flowing.The target recognition in later stage, track are divided
Analysis and target behavior understand etc. partly all using target following as the process of early stage.
MeanShift as a kind of efficient target pattern matching algorithm, because it does not need exhaustive search, can be adaptive
Step-length and direction should be adjusted, be widely used in the target tracking domain higher to requirement of real-time.MeanShift algorithm
Target following is modeling and the tracking process of the method performance objective being smoothed using core.It mainly has three key elements to determine tracking
The robustness of process:Target scale self adaptation;The separability of target model features;Similarity measure.
First, during the continuous tracking to specific objective, with target movement in three dimensions, the chi of target
Degree would generally constantly change.Object module based on constant tracking box wafts larger from the probability of target in the track.Therefore
The object module of adaptive scale is an important channel improving tracking effect.
Secondly, target model features and the separability of background characteristics and other target characteristics are also that accuracy is followed the tracks of in impact
One condition.Various features are blended and is an up one of method of characteristic model.In addition, the correlation reason based on pattern recognition
By by the training of special algorithm, it is possible to achieve automatically choose the good characteristic model of separability.Space is added in characteristic model
Information can also improve the separability of itself and local background.For example, the Density Estimator based on a sample characteristics.
MeanShift algorithm is fundamentally based on the similarity of feature in tracking box.In recent years, based on kernel function research
On the basis of, the similarity measure algorithm sought becomes the hot issue strengthening MeanShift algorithm.Kernel function is to follow the tracks of framework
Basis, it affects similarity to a great extent.When gradient at local extremum for the similarity curved surface improves, then
MeanShift convergence of algorithm characteristic is better, and then improves convergence rate on the basis of improving tracking accuracy.
Content of the invention
The technology solve problem of the present invention is:Overcome the deficiencies in the prior art, provide a kind of based on MeanShift algorithm
Method for tracking target, it can improve reliability during monotrack and tracking velocity, reduce tracking box and waft from mesh
Target situation.
The technical solution of the present invention is:This method for tracking target based on MeanShift algorithm, the method includes
Following steps:
(1)Each of original image pixel is calculated with its eigenvalue, generates characteristic image, for characteristic image profit
Set up clarification of objective model with double-core smooth function;
(2)Monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3)In order to ensure convergence, double-core smooth function is made to meet the qualificationss of binary convex function;
(4)In order to ensure to follow the tracks of the standardization of target characteristic model, obtain new standardized constant formula.
Because the present invention enhances the spatial information of target using double-core function, improve the separability of target and background;
Double-core function enhances the gradient in similarity curved surface local extremum region, have updated iterative formula, so that iterative search procedures is restrained
Speed faster, more accurately positions extreme value place(I.e. target location);So reliability is high, processing speed fast, it is to target
Situations such as partial occlusion and yardstick convert within the specific limits all has stronger robustness, thus reduce tracking box wafing from target
Situation.
Brief description
Fig. 1 realizes the idiographic flow schematic diagram of process for the present invention;
Fig. 2 is the similar contrast schematic diagram of writing music of the corresponding target of two examples;
Fig. 3 is the search iteration frequency curve figure of each frame in video sequence.
Specific embodiment
This method for tracking target based on MeanShift algorithm, the method comprises the following steps:
(1)Each of original image pixel is calculated with its eigenvalue, generates characteristic image, for characteristic image profit
Set up clarification of objective model with double-core smooth function;
(2)Monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3)In order to ensure convergence, double-core smooth function is made to meet the qualificationss of binary convex function;
(4)In order to ensure to follow the tracks of the standardization of target characteristic model, obtain new standardized constant formula.
Because the present invention enhances the spatial information of target using double-core function, improve the separability of target and background;
Double-core function enhances the gradient in similarity curved surface local extremum region, have updated iterative formula, so that iterative search procedures is restrained
Speed faster, more accurately positions extreme value place(I.e. target location);So reliability is high, processing speed fast, it is to target
Situations such as partial occlusion and yardstick convert within the specific limits all has stronger robustness, thus reduce tracking box wafing from target
Situation.
Preferably, step(1)In obtain its eigenvalue at each pixel of original image first, then use formula
(1)Double-core smooth function characteristic model be calculated clarification of objective model,
Wherein, two kernel functions are respectivelyWithB (x) is at x-th point in image
Eigenvalue, δ [b (x)-u] is impulse function, and h is the window width of target region, and u is characterized value size, c'hFor model criteria
Change coefficient, nhFor the pixel number of the target area for h for the window width, y is the center point coordinate of target window, xiFor target window
The coordinate of middle ith pixel point.
Preferably, step(2)The middle iterative formula by original monokaryon smooth function MeanShift algorithm is improved to be based on
The MeanShift iterative formula of double-core smooth function(2)
Wherein,For the position of target in previous frame image,For the position of target in present frame, wijFor two core letters
The joint weights of number, it passes through formula(3)Obtain, k'() and l'() be respectively k () and l () first derivative,
For clarification of objective model,For coordinateThe characteristic model of place's candidate target, m is characterized the number of value, remaining ginseng
Number implication is with claim 2.
Preferably, step(3)In if k (x) l (y) be binary convex function, then this MeanShift algorithm target with
Track process can restrain, and iterative process otherwise can be made to dissipate, and leads to target to be lost.
Preferably, step(4)Middle new standardized constant formula is formula(4)
Wherein each meaning of parameters is with claim 2.
With reference to Fig. 1, the present invention to implement step as follows:
Step 1, sets up the characteristic model of the double-core smooth function of target in initial frame.
(1a)Target in initial frame, target as to be tracked, need to complete the initialization to target to be tracked, set up
Clarification of objective model.First, obtain its sample at each pixel of original gray level image and estimate eigenvalue, secondly
Obtain the object module based on double-core smooth function, its formula is:
Wherein, y is position in initial frame for target's center's point, and kernel function k () chooses Epanechnikov
Kernel, its profile function expression formula is
Kernel function l () chooses Uniform Kernel, and its profile function expression formula is
(1b)Because model formation is improved to double-core smooth function, for ensureing the standardization of model, new generalized constant
Formula is
Wherein, y is position in initial frame for target's center's point.
(1c)In order to ensure the convergence of track algorithm, double-core function need to meet the qualificationss of binary convex function, i.e. double
Kernel function k (x) l (y) is necessary for binary convex function.Only double-core function meets this condition, and guarantee target location is repeatedly
Can restrain during generation,(1a)The k (x) l (y) of middle selection meets this qualifications.
Step 2, sets up the candidate family of the double-core smooth function of current location in the current frame.
Similar to the foundation of object module in step 1, its difference is candidate family to the computing formula of candidate family
Position be present frame current location.
Step 3, obtains pixel weights in the target following window of present frame current location.
The joint weight computing formula of its double-core function is as follows:
Wherein,For object module,For the candidate family of present frame current location,For present frame present bit
Put the center position of target, i and j is the sequence number of each of target window pixel.
Step 4, obtains the more new position of present frame target.
Its location updating formula is as follows:
Wherein, WijValue obtained by step 3.
According to step 1(a)In two kernel functions definition, have
Therefore, iterative formula can be reduced to
Step 5, judges the new target location obtaining in step 4 whether inside image, if inside image-region
Then continuing step 6, if exceeding image-region, carrying out step 7.
Step 6, judges in present frame the need of stopping iteration more new target location.Then carry out if necessary to stop updating
Step 7, if not needing to stop updating, carries out step 2.
Its judgment criterion is:The distance of the current position updating and position before is more than threshold value and then continues to update, and is less than
Threshold value then stops updating.
Step 7, by the target location output of present frame, and is identified in current frame image, draws tracking box.
Step 8, judges whether present frame is last frame, then terminates if last frame, if not last frame
Then it is loaded into next frame and carry out step 2.
Below in conjunction with accompanying drawing and specific embodiment, the present invention is described in further detail.
Fig. 2 gives the similarity surface chart of video sequence in two embodiments.In Fig. 2(a)In, contrast similarity curved surface
The gradient of in figure extreme point local neighborhood, the MeanShift track algorithm of double-core smooth function is apparently higher than original MeanShift
Algorithm;And in Fig. 2(b)In, also can be evident from identical conclusion.Higher gradient mean algorithm can faster, more accurate
Converge at extreme point.Which obviate search iteration process and stop near gentle extreme value vertex neighborhood and lead to obtain
Accurately extreme point position(I.e. target location).
Fig. 3 gives the curve chart of single frames iterative search number of times.The reality of its experimentation and Dorin Comaniciu et al.
Test process identical:With football video sequence as experimental subject, one two field picture size is 352 × 240 pixels, is transported with No. 75
Mobilize as following the tracks of target.With regard to experimental result, its maximum iteration time about 8 times/every frame, mean iterative number of time is 3.076 times/every
Frame, and the experimental result of Dorin Comaniciu et al. is 4.19 times/every frame.This experimental result display inventive algorithm is far excellent
In original MeanShift algorithm.
The above, be only presently preferred embodiments of the present invention, and not the present invention is made with any pro forma restriction, every according to
Any simple modification, equivalent variations and modification above example made according to the technical spirit of the present invention, all still belongs to the present invention
The protection domain of technical scheme.
Claims (4)
1. a kind of method for tracking target based on MeanShift algorithm, the method comprises the following steps:
(1) each of original image pixel is calculated with its eigenvalue, generates characteristic image, for characteristic image using double
Core smooth function sets up clarification of objective model;
(2) the monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3) in order to ensure convergence, double-core smooth function is made to meet the qualificationss of binary convex function;
(4) in order to ensure to follow the tracks of the standardization of target characteristic model, obtain new standardized constant formula;It is characterized in that, step
(1) obtain its eigenvalue in first at each pixel of original image, then use the double-core smooth function feature of formula (1)
Model is calculated clarification of objective model,
Wherein, two kernel functions are respectivelyWithB (x) is the eigenvalue at x point in image, δ
[b (x)-u] is impulse function, and h is the window width of target region, and u is characterized value size, c'hFor model standardization coefficient, nh
For the pixel number of the target area for h for the window width, y is the center point coordinate of target window, xiFor i-th picture in target window
The coordinate of vegetarian refreshments.
2. the method for tracking target based on MeanShift algorithm according to claim 1 is it is characterised in that in step (2)
The iterative formula of original monokaryon smooth function MeanShift algorithm is improved to the MeanShift based on double-core smooth function
Iterative formula (2)
Wherein,For the position of target's center's point in previous frame image,The position of the target's center's point for estimating in present frame,
wijFor the joint weights of two kernel functions, it is obtained by formula (3), k'() and l'() it is respectively k () and l ()
First derivative,For clarification of objective model,For coordinateThe characteristic model of place's candidate target, m is characterized the individual of value
Number.
3. the method for tracking target based on MeanShift algorithm according to claim 2 is it is characterised in that in step (3)
If k (x) l (y) is binary convex function, this MeanShift algorithm can be restrained in object tracking process, otherwise can make to change
Dissipate for process, lead to target to be lost.
4. the method for tracking target based on MeanShift algorithm according to claim 3 is it is characterised in that in step (4)
New standardized constant formula is formula (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410061346.2A CN103823973B (en) | 2014-02-24 | 2014-02-24 | Target tracking method based on MeanShift algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410061346.2A CN103823973B (en) | 2014-02-24 | 2014-02-24 | Target tracking method based on MeanShift algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103823973A CN103823973A (en) | 2014-05-28 |
CN103823973B true CN103823973B (en) | 2017-02-08 |
Family
ID=50759030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410061346.2A Active CN103823973B (en) | 2014-02-24 | 2014-02-24 | Target tracking method based on MeanShift algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103823973B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683120B (en) * | 2016-12-28 | 2019-12-13 | 杭州趣维科技有限公司 | image processing method for tracking and covering dynamic sticker |
CN109903266B (en) * | 2019-01-21 | 2022-10-28 | 深圳市华成工业控制股份有限公司 | Sample window-based dual-core density estimation real-time background modeling method and device |
CN111666962A (en) * | 2019-03-07 | 2020-09-15 | 京东数字科技控股有限公司 | Target positioning method and device for sequence data |
-
2014
- 2014-02-24 CN CN201410061346.2A patent/CN103823973B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN103823973A (en) | 2014-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102999901B (en) | Based on the processing method after the Online Video segmentation of depth transducer and system | |
CN110060277A (en) | A kind of vision SLAM method of multiple features fusion | |
CN103106667B (en) | A kind of towards blocking the Moving Objects method for tracing with scene change | |
CN105809712B (en) | A kind of efficient big displacement light stream method of estimation | |
CN103218827B (en) | The contour tracing method of segmentation and figure matching and correlation is combined in Shape-based interpolation transmission | |
CN106952288A (en) | Based on convolution feature and global search detect it is long when block robust tracking method | |
CN114758288A (en) | Power distribution network engineering safety control detection method and device | |
WO2021051526A1 (en) | Multi-view 3d human pose estimation method and related apparatus | |
CN103226708A (en) | Multi-model fusion video hand division method based on Kinect | |
CN106204484A (en) | A kind of traffic target tracking based on light stream and local invariant feature | |
CN103823973B (en) | Target tracking method based on MeanShift algorithm | |
CN103824305A (en) | Improved Meanshift target tracking method | |
CN112785636B (en) | Multi-scale enhanced monocular depth estimation method | |
CN104318100A (en) | Method for thinning thick point-cloud on basis of feature sensitive projection operator | |
CN105654518B (en) | A kind of trace template adaptive approach | |
CN111027586A (en) | Target tracking method based on novel response map fusion | |
CN113240594B (en) | High-quality point cloud completion method based on multiple hierarchies | |
CN104881852A (en) | Image segmentation method based on immune clone algorithm and fuzzy kernel-clustering algorithm | |
CN104517123A (en) | Sub-spatial clustering method guided by local motion feature similarity | |
CN107045120A (en) | A kind of adaptive framing method of one-dimensional range profile based on Factor Analysis Model | |
CN111144462A (en) | Unknown individual identification method and device for radar signals | |
CN110909778A (en) | Image semantic feature matching method based on geometric consistency | |
CN105354798B (en) | SAR image denoising method based on geometry priori and dispersion similarity measure | |
CN103778439A (en) | Body contour reconstruction method based on dynamic time-space information digging | |
CN107798684B (en) | Active contour image segmentation method and device based on symbol pressure function |
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 |