CN103823973A - Target tracking method based on MeanShift algorithm - Google Patents
Target tracking method based on MeanShift algorithm Download PDFInfo
- Publication number
- CN103823973A CN103823973A CN201410061346.2A CN201410061346A CN103823973A CN 103823973 A CN103823973 A CN 103823973A CN 201410061346 A CN201410061346 A CN 201410061346A CN 103823973 A CN103823973 A CN 103823973A
- Authority
- CN
- China
- Prior art keywords
- centerdot
- target
- 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.)
- Granted
Links
Images
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, be specifically related to a kind of method for tracking target based on MeanShift algorithm.
Background technology
The real-time target of video flowing is followed the tracks of to the basis that is generally machine vision applications.The all processing using target following as early stage of the part such as target identification, trajectory analysis and the goal behavior understanding in later stage.
MeanShift is as the efficient target pattern matching algorithm of one, because it does not need exhaustive search, can Adaptive Adjustment of Step Length and direction, and be widely used in the higher target tracking domain of requirement of real-time.The target following of MeanShift algorithm is modeling and the tracing process of utilizing the method performance objective that core is level and smooth.It mainly contains three key elements and has determined the robustness of tracing process: target scale self-adaptation; The separability of target model features; Similarity measure.
First,, in the Continuous Tracking process to specific objective, along with the movement of target in three dimensions, the yardstick of target can constantly change conventionally.Object module based on constant tracking frame wafts larger from the possibility of target in tracking.Therefore the object module of adaptive scale is an important channel of improving tracking effect.
Secondly, the separability of target model features and background characteristics and other target signatures is also the condition that accuracy is followed the tracks of in impact.It is one of method of lifting feature model that various features is merged mutually.In addition, based on the correlation theory of pattern-recognition, by the training of special algorithm, can realize and automatically choose the characteristic model that separability is good.In characteristic model, add spatial information also can improve the separability of itself and local background.For example, the Density Estimator based on a sample characteristics.
MeanShift algorithm is the similarity based on following the tracks of feature in frame in essence.In recent years, on the basis based on kernel function research, the similarity measure algorithm of seeking becomes the hot issue of strengthening MeanShift algorithm.Kernel function is the basis of following the tracks of framework, and it affects similarity to a great extent.When similarity curved surface improves in the gradient at local extremum place, MeanShift convergence of algorithm characteristic is better, and then improves speed of convergence on the basis of improving tracking accuracy.
Summary of the invention
Technology of the present invention is dealt with problems and is: overcome the deficiencies in the prior art, a kind of method for tracking target based on MeanShift algorithm is provided, its reliability and tracking velocity, minimizing tracking frame that can improve in monotrack process wafts from the situation of target.
Technical solution of the present invention is: this method for tracking target based on MeanShift algorithm, and the method comprises the following steps:
(1) each pixel in original image is calculated to its eigenwert, generating feature image, utilizes double-core smooth function to set up clarification of objective model for characteristic image;
(2) the monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3), in order to guarantee convergence, make double-core smooth function meet the qualifications of binary convex function;
(4), in order to guarantee the standardization of tracking target characteristic model, obtain new standardized constant formula.
Strengthen the spatial information of target because the present invention utilizes double-core function, improved the separability of target and background; Double-core function has strengthened the gradient in similarity curved surface local extremum region, has upgraded iterative formula, makes iterative search procedures speed of convergence faster, locates more accurately extreme value place (being target location); So reliability is high, processing speed is fast, its partial occlusion to target and yardstick the situation such as convert within the specific limits and all have stronger robustness, follow the tracks of frame and waft from the situation of target thereby reduce.
Accompanying drawing explanation
Fig. 1 is the idiographic flow schematic diagram of implementation procedure of the present invention;
Fig. 2 is two similar contrast schematic diagram of writing music of target that example is corresponding;
Fig. 3 is the search iteration frequency curve figure of each frame in video sequence.
Embodiment
This method for tracking target based on MeanShift algorithm, the method comprises the following steps:
(1) each pixel in original image is calculated to its eigenwert, generating feature image, utilizes double-core smooth function to set up clarification of objective model for characteristic image;
(2) the monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3), in order to guarantee convergence, make double-core smooth function meet the qualifications of binary convex function;
(4), in order to guarantee the standardization of tracking target characteristic model, obtain new standardized constant formula.
Strengthen the spatial information of target because the present invention utilizes double-core function, improved the separability of target and background; Double-core function has strengthened the gradient in similarity curved surface local extremum region, has upgraded iterative formula, makes iterative search procedures speed of convergence faster, locates more accurately extreme value place (being target location); So reliability is high, processing speed is fast, its partial occlusion to target and yardstick the situation such as convert within the specific limits and all have stronger robustness, follow the tracks of frame and waft from the situation of target thereby reduce.
Preferably, in step (1), first the each pixel place at original image obtains its eigenwert, then uses the double-core smooth function characteristic model of formula (1) to calculate clarification of objective model,
Wherein, two kernel functions are respectively
with
b (x) is the eigenwert at x some place in image, and δ [b (x)-u] is impulse function, and h is the window width of target region, and u is eigenwert size, c'
hfor model standardization coefficient, n
hfor the pixel number of the window width target area that is h, the center point coordinate that y is target window, x
ifor the coordinate of i pixel in target window.
Preferably, in step (2), the iterative formula of original monokaryon smooth function MeanShift algorithm is improved to the MeanShift iterative formula (2) based on double-core smooth function
Wherein,
for the position of target in previous frame image,
for the position of target in present frame, w
ijbe the associating weights of two kernel functions, it obtains by formula (3), k'() and l'() be respectively the first order derivative of k () and l (),
for clarification of objective model,
for coordinate
the characteristic model of place's candidate target, the number that m is eigenwert, all the other meaning of parameters are with claim 2.
Preferably, step (3) if in k (x) l (y) be binary convex function, this MeanShift algorithm can be restrained in target following process, otherwise can make iterative process disperse, and causes track rejection.
Preferably, in step (4), new standardized constant formula is formula (4)
Wherein each meaning of parameters is with claim 2.
With reference to Fig. 1, specific implementation step of the present invention is 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, is target to be tracked, need to complete the initialization for the treatment of tracking target, sets up clarification of objective model.First, obtain its sample estimate eigenwert at each pixel place of original gray level image, next obtains the object module based on double-core smooth function, and its formula is:
Wherein, y is the position of target's center's point in initial frame, and kernel function k () chooses Epanechnikov Kernel, and its section function expression is
Kernel function l () chooses Uniform Kernel, and its section function expression is
(1b), because model formation is improved to double-core smooth function, for guaranteeing the standardization of model, new generalized constant formula is
Wherein, y is the position of target's center's point in initial frame.
(1c) in order to guarantee the convergence of track algorithm, double-core function need meet the qualifications of binary convex function, that is, double-core function k (x) l (y) is necessary for binary convex function.Only have double-core function to meet this condition, guarantee target location can be restrained in iterative process, and k (x) l (y) choosing in (1a) meets this qualifications.
Step 2, is based upon the candidate family of the double-core smooth function of current location in present frame.
The computing formula of candidate family is similar to the foundation of object module in step 1, and its difference is the current location that the position of candidate family is present frame.
Step 3, obtains pixel weights in the target following window of present frame current location.
The associating weights computing formula of its double-core function is as follows:
Wherein,
for object module,
for the candidate family of present frame current location,
for the center position of present frame current location target, i and j are the sequence number of each pixel in target window.
Step 4, obtains the renewal position of present frame target.
Its position more new formula is as follows:
Wherein, W
ijvalue obtained by step 3.
According to step 1(a) in the definition of two kernel functions, have
Therefore, iterative formula can be reduced to
Step 5, step 7, whether in image inside, if in image-region inside, continue step 6, if exceed image-region, carry out in the new target location obtaining in determining step 4.
Step 6, judges at present frame whether need to stop more new target location of iteration.If need to stop upgrading, carry out step 7, if not needing to stop upgrades, carry out step 2.
Its judgment criterion is: the position of current renewal is greater than threshold value with the distance of position before continues to upgrade, and is less than threshold value and stops upgrading.
Below in conjunction with accompanying drawing and specific embodiment, the present invention is described in further detail.
Fig. 2 has provided the similarity surface chart of video sequence in two embodiment.In Fig. 2 (a), the gradient of extreme point local neighborhood in contrast similarity surface chart, the MeanShift track algorithm of double-core smooth function is apparently higher than original MeanShift algorithm; And in Fig. 2 (b), also can obviously show identical conclusion.Higher gradient means that algorithm can converge on extreme point place sooner, more accurately.It has been avoided search iteration process to stop near mild extreme point neighborhood and has caused obtaining extreme point position (being target location) accurately.
Fig. 3 has provided the curve map of single frames iterative search number of times.Its experimentation is identical with the people's such as Dorin Comaniciu experimentation: take football video sequence as experimental subjects, one two field picture size is 352 × 240 pixels, take No. 75 sportsmen as tracking target.With regard to experimental result, approximately 8 times/every frame of its maximum iteration time, mean iterative number of time is 3.076 times/every frame, and the people's such as Dorin Comaniciu experimental result is 4.19 times/every frame.This experimental result shows that algorithm of the present invention is much better than original MeanShift algorithm.
The above; it is only preferred embodiment of the present invention; not the present invention is done to any pro forma restriction, any simple modification, equivalent variations and modification that every foundation technical spirit of the present invention is done above embodiment, all still belong to the protection domain of technical solution of the present invention.
Claims (5)
1. the method for tracking target based on MeanShift algorithm, is characterized in that, the method comprises the following steps:
(1) each pixel in original image is calculated to its eigenwert, generating feature image, utilizes double-core smooth function to set up clarification of objective model for characteristic image;
(2) the monokaryon smooth function in original MeanShift algorithm is improved to double-core smooth function;
(3), in order to guarantee convergence, make double-core smooth function meet the qualifications of binary convex function;
(4), in order to guarantee the standardization of tracking target characteristic model, obtain new standardized constant formula.
2. the method for tracking target based on MeanShift algorithm according to claim 1, it is characterized in that, in step (1), first the each pixel place at original image obtains its eigenwert, then uses the double-core smooth function characteristic model of formula (1) to calculate clarification of objective model
Wherein, two kernel functions are respectively
with
b (x) is the eigenwert at x point place in image, and δ [b (x)-u] is impulse function, and h is the window width of target region, and u is eigenwert size, c'
hfor model standardization coefficient, n
hfor the pixel number of the window width target area that is h, the center point coordinate that y is target window, x
ifor the coordinate of i pixel in target window.
3. the method for tracking target based on MeanShift algorithm according to claim 2, it is characterized in that, in step (2), the iterative formula of original monokaryon smooth function MeanShift algorithm is improved to the MeanShift iterative formula (2) based on double-core smooth function
Wherein,
for the position of target's center's point in previous frame image,
for the position of target's center's point of estimating in present frame.W
ijbe the associating weights of two kernel functions, it obtains by formula (3).K'() and l'() be respectively the first order derivative of k () and l (),
for clarification of objective model,
for coordinate
the characteristic model of place's candidate target, the number that m is eigenwert.
4. the method for tracking target based on MeanShift algorithm according to claim 3, it is characterized in that, step (3) if in k (x) l (y) be binary convex function, this MeanShift algorithm can be restrained in target following process, otherwise can make iterative process disperse, cause track rejection.
5. the method for tracking target based on MeanShift algorithm according to claim 4, is characterized 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 true CN103823973A (en) | 2014-05-28 |
CN103823973B 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) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683120A (en) * | 2016-12-28 | 2017-05-17 | 杭州趣维科技有限公司 | Image processing method being able to track and cover dynamic sticker |
CN109903266A (en) * | 2019-01-21 | 2019-06-18 | 深圳市华成工业控制有限公司 | A kind of real-time background modeling method of double-core density estimation and device based on sample window |
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
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683120A (en) * | 2016-12-28 | 2017-05-17 | 杭州趣维科技有限公司 | Image processing method being able to track and cover dynamic sticker |
CN106683120B (en) * | 2016-12-28 | 2019-12-13 | 杭州趣维科技有限公司 | image processing method for tracking and covering dynamic sticker |
CN109903266A (en) * | 2019-01-21 | 2019-06-18 | 深圳市华成工业控制有限公司 | A kind of real-time background modeling method of double-core density estimation and device based on sample window |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103823973B (en) | 2017-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108319972B (en) | End-to-end difference network learning method for image semantic segmentation | |
CN103514441B (en) | Facial feature point locating tracking method based on mobile platform | |
CN112184752A (en) | Video target tracking method based on pyramid convolution | |
CN108665481A (en) | Multilayer depth characteristic fusion it is adaptive resist block infrared object tracking method | |
CN104050488B (en) | A kind of gesture identification method of the Kalman filter model based on switching | |
CN110473231B (en) | Target tracking method of twin full convolution network with prejudging type learning updating strategy | |
CN102063727B (en) | Covariance matching-based active contour tracking method | |
CN104834922A (en) | Hybrid neural network-based gesture recognition method | |
CN109190544B (en) | Human identity recognition method based on sequence depth image | |
CN108198201A (en) | A kind of multi-object tracking method, terminal device and storage medium | |
CN104992451A (en) | Improved target tracking method | |
CN103218827B (en) | The contour tracing method of segmentation and figure matching and correlation is combined in Shape-based interpolation transmission | |
CN104200485A (en) | Video-monitoring-oriented human body tracking method | |
CN108665485A (en) | A kind of method for tracking target merged with twin convolutional network based on correlation filtering | |
CN107833239B (en) | Optimization matching target tracking method based on weighting model constraint | |
CN109740537B (en) | Method and system for accurately marking attributes of pedestrian images in crowd video images | |
CN101251928A (en) | Object tracking method based on core | |
CN107657625A (en) | Merge the unsupervised methods of video segmentation that space-time multiple features represent | |
CN105654518B (en) | A kind of trace template adaptive approach | |
CN105631899A (en) | Ultrasonic image motion object tracking method based on gray-scale texture feature | |
CN114092517A (en) | Multi-target tracking method based on traditional and deep learning algorithm | |
CN104778670A (en) | Fractal-wavelet self-adaption image denoising method based on multivariate statistical model | |
CN103823973A (en) | Target tracking method based on MeanShift algorithm | |
CN106339693A (en) | Positioning method of face characteristic point under natural condition | |
CN103996207A (en) | Object tracking method |
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 |