[go: up one dir, main page]

CN109064498A - Method for tracking target based on Meanshift, Kalman filtering and images match - Google Patents

Method for tracking target based on Meanshift, Kalman filtering and images match Download PDF

Info

Publication number
CN109064498A
CN109064498A CN201810864909.XA CN201810864909A CN109064498A CN 109064498 A CN109064498 A CN 109064498A CN 201810864909 A CN201810864909 A CN 201810864909A CN 109064498 A CN109064498 A CN 109064498A
Authority
CN
China
Prior art keywords
target
meanshift
template
tracking
frame
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.)
Pending
Application number
CN201810864909.XA
Other languages
Chinese (zh)
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.)
Hubei University of Technology
Original Assignee
Hubei University of Technology
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 Hubei University of Technology filed Critical Hubei University of Technology
Priority to CN201810864909.XA priority Critical patent/CN109064498A/en
Publication of CN109064498A publication Critical patent/CN109064498A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/277Analysis of motion involving stochastic approaches, e.g. using Kalman filters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides the method for tracking target based on Meanshift, Kalman filtering and images match.One aspect of the present invention is using the Kroneckerdelta function and similarity function in Meanshift, pass through the continuous renewal of iteration, target signature space is quantified, and quickly measures the similarity of object module and candidate object module, target tracking process is enabled to reach higher accuracy rate;On the other hand Kalman filtering and image matching method are used, interference of the extraneous undesirable element to target tracking process can be reduced, precise positioning is carried out to target, obtains target information that is more accurate, being more clear.External environmental interference can be eliminated using the method for images match, by comparing the securing position that target in each frame image occurs, accurate lock target position.

Description

Method for tracking target based on Meanshift, Kalman filtering and images match
Technical field
The invention belongs to the video object detections and tracking technique field, more particularly to one kind to be based on Meanshift, Kalman The method for tracking target of filtering and images match.
Background technique
Target following technology is always one of the hot spot in computer vision research field, the targets of various different modes with Track method emerges one after another, and traditional method for tracking target has: the target following based on real-time detection, the target based on template matching Tracking, the target following etc. based on Bayesian filter, the effect that these method for tracking target are realized are unilaterally, in target following In the process, the undirectional motion of target changes the skin mode of target and scene, in addition, between the complexity of environment, target and mesh Appearance situations such as blocking between mark and scene, this makes traditional method for tracking target task become more difficult.
Expression and similarity measurement Moving Target Tracking Algorithm according to movement can be divided into four classes: based on active profile Tracking, the tracking based on feature, the tracking based on region and the tracking based on model.The precision and robustness of track algorithm are very big Definition in degree depending on the expression of moving target and similarity measurement, the real-time of track algorithm depend on matching search plan It omits and filter forecasting algorithm.
1, the tracking based on active profile:
The active contour model that Kass is proposed defines variable curve in image area, passes through the minimum to its energy function Change, it is consistent with objective contour that dynamic outline gradually adjusts own form.Advantage: by the grayscale information of image and overall profile Geological information enhances the reliability of tracking.Disadvantage: calculation amount is larger, biggish for the object or deformation that quickly move Situation, tracking effect are not ideal enough.
2, based on the tracking of feature:
The global feature of moving target is not considered, is only tracked by some notable features of target image.(it is assumed that Moving target can be expressed by unique characteristic set, search this feature set be considered as tracking gone up moving target, in addition to Realize that tracking is outer with single features, multiple features fusion can also be carried out as tracking characteristics), the tracking based on feature is main Including two aspects of feature extraction and characteristic matching.
Feature extraction: the feature of image is extracted from the original image of scenery.
Characteristic matching: the matching of interframe target signature is carried out, and target is tracked with Optimum Matching.It is common based on spy Levying matched track algorithm has based on the matched tracking of binaryzation target image, is matched based on Edge Feature Matching or corner feature Tracking, the tracking based on color of object characteristic matching etc..
Disadvantage: feature robustness is not strong, fuzzy to noise, image itself etc. more sensitive.
3, based on the tracking in region:
The template comprising target is obtained, the acquisition of template can determine that template is typically slightly greater than mesh by artificial in advance Target rectangle, also can be considered irregular shape.In image sequence, target is tracked with related algorithm.
4, based on the tracking of model:
Model is established to the target tracked by priori knowledge, the real-time of model is then carried out by matched jamming target It updates.For rigid-object, motion state transformation mainly translation, rotation etc. facilitates tracking.But for non-rigid Target, geometrical model are not readily available.
Advantage: such method is not influenced by observation visual angle, has stronger robustness, and Model Matching tracking accuracy is high, The various motion changes of suitable maneuvering target, strong antijamming capability,
Disadvantage: complexity is calculated, arithmetic speed is slow, and model modification is complex, and real-time is poor.
Traditional method for tracking target is still in the booming stage, for various complexity of Target Tracking Problem Property continues to bring out out new, more fully solution.However, lacking due to the complex nature of the problem and each conventional method itself It falls into, in target tracking domain, still there are many common problem is urgently to be resolved at present.
Summary of the invention
It is asked to overcome conventional target tracking that can not cope with complex environment, target and can not accurately track and be blocked etc. Topic, the present invention carries out technological innovation and improvement in the prior art, provide it is a kind of be based on MeanShift, Kalman filtering and The method for tracking target of image matching algorithm, can be improved the precision in object tracking process, reduce surrounding poor environment because Influence of the element to tracking effect.
The technical solution of the invention is as follows: the target based on MeanShift, Kalman filtering and image matching algorithm with Track method, method includes the following steps:
Step (1), obtain target template, set initial frame image in candidate target region, calculate target feature vector and Candidate target feature vector calculates the inclined of target feature vector and candidate target feature vector by MeanShift track algorithm Shifting value, so that it is determined that in initial frame optimal candidate target rough location;
Step (2) establishes the motion process model and observation model of optimal candidate target using kalman filter method, Determine the securing position that optimal candidate target initial position is likely to occur in next frame image;
Step (3) integrates the optimal candidate target in each frame image image using image matching method, is formed continuous Region, the side between target area after calculating continuous optimal candidate target area and template matching using meanshift again To deviant, when the small Mr. Yu's threshold value Σ of deviant or the number of iterations are less than p, target position is determined, and exit iteration, Otherwise step (1)-(three) are repeated.
Further, the concrete methods of realizing of the rough location of optimal candidate target in initial frame is determined such as in step (1) Under,
Target feature vector is calculated first:
Candidate target feature vector:
In above-mentioned two formula, δ () is Kroneckerdelta function, and k () is kernel function, b (x) be by feature space into The quantized value of pixel value in row quantizing process, C and C in formulahIt is all normaliztion constant, h is the window width of target region, U is characterized value size, and m is characterized the number of value, nhFor the pixel number for the target area that window width is h, y is target window Center point coordinate, xiFor the coordinate of ith pixel point in target window;
Then the distance between target feature vector and candidate target feature vector are calculated, i.e., deviant between the two:
WhereinIt is named as Bhattacharyya coefficient;
Finally, making (3) formula functional value minimum, i.e. Bhattacharyya coefficientIt maximizes, so that it is determined that in initial frame The rough location of optimal candidate target.
Further, the specific implementation of step (2) is as follows,
1) basic model is constructed according to newtonian motion theorem:
Wherein xk,ykIt is coordinate position of the kth frame optimal candidate target's center on x, y-axis, dxk,dykIt is exactly coordinate bit The differential set, speed that can directly using it as optimal candidate target's center on x, y-axis, t are indicated between two frame data Interval;
2) process model and observation model of the movement of optimal candidate target are set up:
Obtain observational equation:
3) transfer matrix and observing matrix are calculated: in above formula, wk-1And vk-1Actually meet the acceleration of Gaussian Profile, Therefore t initial value can be set as 1, just can obtain corresponding transfer matrixAnd observing matrix
After obtaining the two important matrixes, set corresponding noise, complete the modeling of Kalman filtering, finally according to this two Optimal candidate target rough location in a matrix and initial frame determines that optimal candidate target can in next each frame image The securing position that can occur.
Further, the specific implementation of step (3) is as follows,
1) stencil matching: due to tracking target be it is fixed, first directly acquire the template of target in the design, then for Target in captured video carries out template matching;After extracting target template in video, by this part template, then By the template matching matchTemplate function in OpenCV, in the video of reading, extract and the template matching most successful A region, and this part is set as target area, with rectangle function (function for returning to rectangle frame), by this block The coordinate of region point returns, and draws a rectangle frame convenient for observation analysis;
2) it extracts target area feature: having selected the target for needing to track according to template matching, then need to extract and work as The characteristic information of preceding target area, i.e. color characteristic histogram;
3) it calculates Meanshift vector: after the histogram treatment and drafting for completing target area, then determining best wait The color characteristic histogram of target area is selected, and calculates the MeanShift vector of offset;
4) template updates: when the small Mr. Yu's threshold value Σ of deviant or the number of iterations are less than p2, determining target position To obtain target area in 1), and iteration is exited, otherwise repeatedly step (1)-(three), re-starts template matching.
Further, the value of p is 3.
One aspect of the present invention passes through iteration using Kroneckerdelta function and similarity function in Meanshift Continuous renewal, target signature space is quantified, and quickly measure the similarity of object module and candidate object module, Target tracking process is enabled to reach higher accuracy rate;On the other hand Kalman filtering and image matching method are used, it can Interference of the extraneous undesirable element to target tracking process is reduced, precise positioning is carried out to target, acquisition is more accurate, is more clear Target information.External environmental interference is eliminated using the method for images match, is occurred by comparing target in each frame image Securing position, accurate lock target position.
Detailed description of the invention
Fig. 1 is the specific flow chart of realization process of the present invention;
Fig. 2 is the color characteristic histogram of target area;
Fig. 3 is the color characteristic histogram of candidate region.
Specific embodiment
The present invention combines MeanShift algorithm, Kalman filtering and image matching technology, and the technology of various aspects is special Point it is as follows: MeanShift algorithm belongs to Density Estimator ken, it fully rely on sample point in feature space calculating its Density function values.The principle of kernel density estimation method is similar to histogram method, and only more one are used for the kernel function of smoothed data. Arbitrary density function can progressively be converged on, it can to clothes in the case where sampling sufficient situation using kernel function estimation method Density estimation is carried out from the data of any distribution.
Kalman filtering (Kalman filtering) is a kind of using linear system state equation, is inputted by system defeated Data are observed out, the algorithm of optimal estimation is carried out to system mode, and optimal estimation is also considered as filtering.Data filtering is Remove a kind of data processing technique of noise reduction truthful data, Kalman filter can be from situation known to the measurement variance In a series of data that there is measurement noise, the state of dynamical system is estimated.Since it can carry out the data of collection in worksite It updating and handles in real time, Kalman filter is the filtering method being most widely used at present, is being communicated, it navigates, guidance and control System etc. is multi-field to have obtained preferable application.
Images match is to identify the process of same place between two width or several images by certain matching algorithm.Sensing Image change caused by visual angle changes in device noise, imaging process, target are mobile and deformation, illumination or the change of environment are brought Image change and multiple sensors the factors such as use influence, Same Scene projects obtained two at different conditions Dimension image has very big difference.Difficult to solve the matching of pattern distortion bring, there has been proposed many matching algorithms, and it Be all to be composed of following four elements: feature space;Similarity measurement;Images match alternative types;Transformation parameter Search.In imaging process, noise and due to blocking etc., cause the feature primitive in piece image in another piece image There are several candidate feature primitives or without corresponding primitive, these are all " ill-posed problems " in primary vision, usually in canonical Change and is solved under frame with various constraint conditions.
One aspect of the present invention passes through iteration using Kroneckerdelta function and similarity function in Meanshift Continuous renewal, target signature space is quantified, and quickly measure the similarity of object module and candidate object module, Target tracking process is set to reach higher accuracy rate;On the other hand Kalman filtering and image matching method are used, is reduced outer Interference of boundary's undesirable element to target tracking process quickly carry out precise positioning to target, obtain it is more accurate, be more clear Target information.
Based on the method for tracking target of MeanShift, Kalman filtering and image matching algorithm, this method includes following step It is rapid:
(1), target template is obtained, candidate target region in initial frame image is set, calculates target feature vector and candidate Target feature vector calculates the deviant of target feature vector and candidate target feature vector by MeanShift track algorithm, So that it is determined that in initial frame optimal candidate target rough location, detailed process is as follows:
1) it falls into a trap first in the ROI of setting (candidate target region of area-of-interest, the as embodiment of the present invention setting) Probability density is calculated, and the deviant between entire image ROI region and target template is calculated by MeanShift;
2) after calculating deviant, by the central point of ROI region along the calculated target centroid vector side MeanShift To target centroid movement;
3) when the offset of the central point of ROI and target centroid is 0, algorithm calculating is exited.
By previous step, an iteration is just completed, so that direction and size of the ROI of setting according to offset mean value, It is constantly mobile to target centroid or target direction, complete the Primary Location to target.It, can be with according to classical MS track algorithm It calculates target and candidate target feature vector is as follows:
Target feature vector:
Candidate target feature vector:
In above-mentioned two formula, δ () is Kroneckerdelta function, and k () is kernel function, b (x) be by feature space into The quantized value of pixel value in row quantizing process, C and C in formulahIt is all normaliztion constant, h is the window width of target region, U is characterized value size, and m is characterized the number of value, nhFor the pixel number for the target area that window width is h, y is target window Center point coordinate, xiFor the coordinate of ith pixel point in target window.
After calculating target feature vector and candidate target feature vector, it is also necessary to the similarity between the two is measured, Here a similarity function is introduced, what it was defined is the distance between target feature vector and candidate target feature vector, i.e., Deviant between the two.In order to adapt to the comparison between different target, this distance needs a measurement, for defining two The distance between a discrete distribution:
WhereinIt is named as Bhattacharyya coefficient.
During tracking, in order to find the rough location of target in the current frame, it should keep (3) formula functional value minimum, (3) formula functional value minimum is equivalent to Bhattacharyya coefficientIt maximizes.
(2), the motion process model and observation model of optimal candidate target are established using kalman filter method, are determined The securing position that previous frame optimal candidate target initial position is likely to occur in next frame image;
The specific implementation process is as follows:
1) establish the motion model of optimal candidate target: on 2d due to target, there are two moving directions, in addition The differential of position is movement speed, available four dimensional vectors, by the state vector in target following is defined as: xk= [xk,yk,dxk,dyk]T, wherein xk,ykIt is coordinate position of the kth frame optimal candidate target's center on x, y-axis, dxk,dykIt is exactly Differential on coordinate position, speed that can directly using it as optimal candidate target's center on x, y-axis.
During tracking, the information that can be observed only has the location information of optimal candidate target, and speed and acceleration The information such as degree cannot be directly observed, and therefore, only there are two variables for observation vector, be defined as: zk=[xck,yck]T, xckAnd yckRespectively indicate location information of the target's center observed in present frame on x, y-axis, building optimal candidate target fortune Movable model needs to propose an assumed condition: it is assumed that the movement of optimal candidate target is the linear motion accelerated at random, in x The acceleration a of axis and y-axisx,ayAll change at random, and assumes that the two acceleration all meet Gaussian Profile, i.e. at~N (0, σw 2)。
Basic model can be constructed according to newtonian motion theorem:
2) optimal candidate target motion process model and observation model are established: being also same side with X-axis above in Y-axis Journey can set up the process model and observation model of the movement of optimal candidate target by this motion state equation:
Wherein, t indicates the interval between two frame data.
Same also available observational equation:
3) transfer matrix and observing matrix are calculated: in formula, wk-1And vk-1The acceleration for actually meeting Gaussian Profile, because This can set t initial value as 1, just can obtain corresponding transfer matrixAnd observing matrix
After obtaining the two important matrixes, set corresponding noise, the modeling of Kalman filtering just completes, according to this two Optimal candidate target rough location in a matrix and initial frame can determine optimal candidate mesh in following each frame image Mark the securing position being likely to occur.
(3), using image matching method, the optimal candidate target in each frame image is integrated, forms continuum, then Direction deviant between the secondary target area calculated using meanshift after continuous candidate target region and template matching, when When the small Mr. Yu's threshold value Σ of deviant or the number of iterations are less than p2, target position is determined, and exit iteration, otherwise repeat to walk Suddenly (one)-(three).External environmental interference can be eliminated using the method for images match, gone out by comparing target in each frame image Existing securing position, accurate lock target position.
Detailed process is as follows:
1) stencil matching: due to tracking target be it is fixed, first directly acquire the template of target in the design, then for Target in captured video carries out template matching;After extracting target template in video, by this part template, then By the template matching matchTemplate function in OpenCV, in the video of reading, extract and the template matching most successful A region, and this part is set as target area, with rectangle function (function for returning to rectangle frame), by this block The coordinate of region point returns, and draws a rectangle frame convenient for observation analysis;
2) it extracts target area feature: having selected the target for needing to track according to template matching, in changing for MeanShift During generation, to be tracked in the video below, it is necessary first to the characteristic information in current goal region is extracted, that is, The color characteristic histogram mentioned in algorithm;
3) Meanshift vector is calculated: after the histogram treatment and drafting for completing target area, it is thus necessary to determine that candidate mesh The color characteristic histogram (candidate target region is obtained by step (1) and step (2)) in region is marked, and calculates offset MeanShift vector;
4) template updates: according to the number of iterations come judge templet update, when object is not high-speed mobile, and the frame of video When number is relatively high, the image movement of each width is substantially especially small.Therefore, MeanShift algorithm ideally, each In the tracking of frame, it should which the number of iterations is probably within 3 times, and offset is not defecated can complete the tracking of target.Therefore, when When the number of iterations is greater than 3 times, substantially it is assumed that target at this time needs to restart to match with losing.
Embodiments of the present invention are described in detail with specific example with reference to the accompanying drawing.
The present embodiment is will to be applied to dress based on the method for tracking target of MeanShift, Kalman filtering and images match The tracking of first robot, X-axis is pixel arrangement combined value in Fig. 2, and Y-axis is the normalized ratio of histogram array, normalizes ratio It is worth the color histogram feature array that this array is initial pictures, in this section of characteristic extraction procedure, first by RGB color Space turns to 4096 numerical value, because of tri- numerical value of RGB itself, if not doing quantization appropriate, numerical value can be especially big, can be serious Influence algorithm performance;It is worth in this array in combination of pixels arrangement, the RGB color of image is added up according to the sequence of BGR, Then it is integrated in histogram according to this array and correlation matrix (weight closer to center is bigger), obtains this block The characteristic color histogram in region is the characteristic color histogram for tracking target area.
After the histogram treatment and the drafting that complete target area, it is also necessary to determine the feature histogram of candidate region, Fig. 3 This array of middle normalized ratio and the normalized ratio extraction part in Fig. 2 are similar, and unique difference is exactly to calculate When pixel arrangement combines this quantized value, need to use the color weight of each point in this region, therefore unlike the normalizing in Fig. 2 Changing is an individual variable in the calculating process of ratio, and Fig. 3 is that the color that the candidate region during tracking obtains is special Levy histogram.
It is tested in the present embodiment for following two situation:
The Meanshift tracking for thering is template to update: during tracking, the size 1280*720pixel of each frame, frame per second For 60fps/s, when a length of 13s or so, tracking target sizes are 160*140pixel, and armoring robot movement speed is 0.5m/ S, the 50th, 150,200,300,400,500,600,700, under the videos of 770 frames, this tracking can preferably complete mesh Mark tracking, even if can locking tracking target in remote region;
Have the tracking under circumstance of occlusion: in the experiment, each frame video size is 1280*720pixel, and frame per second is 60fps/s, when a length of 10s or so, tracking target sizes are 160*140pixel, and armoring robot movement speed is 0.5m/s, By the tracking effect discovery observed under the 10th, 50,90,150,160,400,590,600 frame videos, this tracking is not When carrying out stencil matching update, in the case where target is blocked by fraction, moreover it is possible to it works normally, but after having blocked more It is just completely ineffective, can be completed after being updated by stencil matching appropriate target by under complete circumstance of occlusion with Track.
It should be understood that the part that this specification does not elaborate belongs to the prior art.
Although being described in conjunction with the accompanying a specific embodiment of the invention above, those of ordinary skill in the art should Understand, these are merely examples, and it is described above, it is only presently preferred embodiments of the present invention, any form not is made to the present invention On limitation, according to the technical essence of the invention any simple modification to the above embodiments, equivalent variations and repair Decorations, still belong to the protection scope of technical solution of the present invention.The scope of the present invention is only limited by the claims that follow.

Claims (5)

1.基于Meanshift、卡尔曼滤波和图像匹配的目标跟踪方法,其特征在于,包括如下步骤:1. The target tracking method based on Meanshift, Kalman filtering and image matching, is characterized in that, comprises the steps: 步骤(一),获取目标模板,设定初始帧图像中候选目标区域,计算目标特征向量和候选目标特征向量,通过MeanShift跟踪算法计算目标特征向量与候选目标特征向量的偏移值,从而确定初始帧中最佳候选目标的初步位置;Step (1), obtain the target template, set the candidate target area in the initial frame image, calculate the target feature vector and the candidate target feature vector, and calculate the offset value between the target feature vector and the candidate target feature vector through the MeanShift tracking algorithm, so as to determine the initial the preliminary position of the best candidate object in the frame; 步骤(二),采用卡尔曼滤波方法建立最佳候选目标的运动过程模型和观测模型,确定最佳候选目标初始位置在下一帧图像可能出现的可靠位置;Step (2), using the Kalman filter method to establish the motion process model and observation model of the best candidate target, and determine the reliable position where the initial position of the best candidate target may appear in the next frame image; 步骤(三),采用图像匹配方法,整合每一帧图像图像中的最佳候选目标,形成连续区域,再次采用meanshift计算连续最佳候选目标区域与模板匹配后的目标区域之间的方向偏移值,当偏移值小于某阈值Σ或者迭代次数小于p时,确定目标所在位置,并退出迭代,否则重复步骤(一)-(三)。Step (3), use the image matching method to integrate the best candidate targets in each frame of the image to form a continuous area, and use meanshift again to calculate the direction offset between the continuous best candidate target area and the target area after template matching value, when the offset value is less than a certain threshold Σ or the number of iterations is less than p, determine the location of the target and exit the iteration, otherwise repeat steps (1)-(3). 2.如权利要求1所述的基于Meanshift、卡尔曼滤波和图像匹配的目标跟踪方法,其特征在于:步骤(一)中确定初始帧中最佳候选目标的初步位置的具体实现方法如下,2. the target tracking method based on Meanshift, Kalman filtering and image matching as claimed in claim 1, is characterized in that: the concrete realization method of determining the preliminary position of best candidate target in initial frame in step (1) is as follows, 首先计算目标特征向量:First calculate the target eigenvector: 候选目标特征向量:Candidate target feature vector: 上述两式中,δ(·)是Kroneckerdelta函数,k(·)是核函数,b(x)是将特征空间进行量化过程中像素值的量化值,公式中的C和Ch都是归一化常数,h为目标所在区域的窗宽,u为特征值大小,m为特征值的个数,nh为窗宽为h的目标区域的像素点个数,y为目标窗口的中心点坐标,xi为目标窗口中第i个像素点的坐标;In the above two formulas, δ( ) is the Kroneckerdelta function, k( ) is the kernel function, b(x) is the quantized value of the pixel value in the process of quantizing the feature space, and C and C h in the formula are both normalized h is the window width of the area where the target is located, u is the size of the feature value, m is the number of feature values, n h is the number of pixels in the target area with a window width of h, and y is the coordinates of the center point of the target window , x i is the coordinates of the i-th pixel in the target window; 然后计算目标特征向量和候选目标特征向量之间的距离,即两者之间的偏移值:Then calculate the distance between the target feature vector and the candidate target feature vector, that is, the offset value between the two: 其中被命名为Bhattacharyya系数;in Named as the Bhattacharyya coefficient; 最后,使(3)式函数值最小,即Bhattacharyya系数最大化,从而确定初始帧中最佳候选目标的初步位置。Finally, make the function value of (3) the smallest, that is, the Bhattacharyya coefficient Maximize to determine the initial position of the best candidate object in the initial frame. 3.如权利要求1所述的基于Meanshift、卡尔曼滤波和图像匹配的目标跟踪方法,其特征在于:步骤(二)的具体实现方式如下,3. the target tracking method based on Meanshift, Kalman filtering and image matching as claimed in claim 1, is characterized in that: the specific implementation of step (two) is as follows, 1)根据牛顿运动定理构建基本模型:1) Construct the basic model according to Newton's motion theorem: 其中xk,yk是第k帧最佳候选目标中心在x,y轴上的坐标位置,dxk,dyk就是坐标位置上的微分,可直接把它作为最佳候选目标中心在x,y轴上的速度,t表示两帧数据之间的间隔;Among them, x k , y k are the coordinate positions of the best candidate target center on the x and y axes in the kth frame, and dx k , dy k are the differentials on the coordinate positions, which can be directly regarded as the best candidate target center at x, The speed on the y-axis, t represents the interval between two frames of data; 2)建立起最佳候选目标运动的过程模型和观测模型:2) Establish the process model and observation model of the best candidate target motion: 获得观测方程:Obtain the observation equation: 3)计算转移矩阵和观测矩阵:上式中,wk-1和vk-1实际上是满足高斯分布的加速度,因此可以设定t初值为1,便能得到相应的转移矩阵和观测矩阵 3) Calculate the transfer matrix and observation matrix: In the above formula, w k-1 and v k-1 are actually accelerations that satisfy the Gaussian distribution, so the initial value of t can be set to 1, and the corresponding transfer matrix can be obtained and observation matrix 得到这两个重要矩阵后,设定相应的噪声,完成卡尔曼滤波的建模,最后根据这两个矩阵以及初始帧中的最佳候选目标初步位置确定接下来每一帧图像中最佳候选目标可能出现的可靠位置。After obtaining these two important matrices, set the corresponding noise, complete the modeling of the Kalman filter, and finally determine the best candidate in each next frame of image according to these two matrices and the initial position of the best candidate target in the initial frame Reliable locations where the target might appear. 4.如权利要求1所述的基于Meanshift、卡尔曼滤波和图像匹配的目标跟踪方法,其特征在于:步骤(三)的具体实现方式如下,4. the target tracking method based on Meanshift, Kalman filtering and image matching as claimed in claim 1, is characterized in that: the specific implementation of step (three) is as follows, 1)模版匹配:由于跟踪目标是已定的,在设计中先直接获取目标的模板,然后对于所拍摄的视频中的目标,进行模板匹配;在视频中提取到目标模板后,通过这一块模板,再通过OpenCV中的模板匹配matchTemplate函数,在读取的视频中,提取与该模板匹配最成功的一个区域,并将这一部分设为目标区域,用rectangle函数(返回矩形框的函数),将这块区域点的坐标返回,并画出一个矩形框便于观察分析;1) Template matching: Since the tracking target is fixed, the template of the target is obtained directly in the design, and then the template matching is performed on the target in the captured video; after the target template is extracted from the video, it is passed through this template , and then through the template matching matchTemplate function in OpenCV, in the read video, extract the area that matches the template most successfully, and set this part as the target area, use the rectangle function (the function that returns the rectangular frame), set The coordinates of the points in this area are returned, and a rectangular frame is drawn for observation and analysis; 2)提取目标区域特征:根据模板匹配选择出了需要跟踪的目标,然后需要提取当前目标区域的特征信息,即颜色特征直方图;2) Extract the target area features: select the target to be tracked according to the template matching, and then need to extract the feature information of the current target area, that is, the color feature histogram; 3)计算Meanshift向量:在完成目标区域的直方图处理和绘制后,然后确定最佳候选目标区域的颜色特征直方图,并计算出偏移的MeanShift向量;3) Calculate the Meanshift vector: after completing the histogram processing and drawing of the target area, then determine the color feature histogram of the best candidate target area, and calculate the offset MeanShift vector; 4)模版更新:当偏移值小于某阈值Σ或者迭代次数小于p2时,确定目标所在位置为1)中获得目标区域,并退出迭代,否则重复步骤(一)-(三),重新进行模板匹配。4) Template update: When the offset value is less than a certain threshold Σ or the number of iterations is less than p2, determine the target location as the target area obtained in 1), and exit the iteration, otherwise repeat steps (1)-(3) and re-execute the template match. 5.如权利要求4所述的基于Meanshift、卡尔曼滤波和图像匹配的目标跟踪方法,其特征在于:p的取值为3。5. the target tracking method based on Meanshift, Kalman filter and image matching as claimed in claim 4, is characterized in that: the value of p is 3.
CN201810864909.XA 2018-08-01 2018-08-01 Method for tracking target based on Meanshift, Kalman filtering and images match Pending CN109064498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810864909.XA CN109064498A (en) 2018-08-01 2018-08-01 Method for tracking target based on Meanshift, Kalman filtering and images match

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810864909.XA CN109064498A (en) 2018-08-01 2018-08-01 Method for tracking target based on Meanshift, Kalman filtering and images match

Publications (1)

Publication Number Publication Date
CN109064498A true CN109064498A (en) 2018-12-21

Family

ID=64832403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810864909.XA Pending CN109064498A (en) 2018-08-01 2018-08-01 Method for tracking target based on Meanshift, Kalman filtering and images match

Country Status (1)

Country Link
CN (1) CN109064498A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110006444A (en) * 2019-03-21 2019-07-12 南京师范大学 An anti-jamming visual odometry construction method based on optimal mixture Gaussian model
CN111951296A (en) * 2020-08-28 2020-11-17 福州大学 A target tracking method and device
CN111985481A (en) * 2020-07-24 2020-11-24 东南大学 An Armor Plate Recognition Algorithm Based on Light Bar Matching
CN114998390A (en) * 2022-08-02 2022-09-02 环球数科集团有限公司 A visual analysis system and method for embedded smart camera
CN119295550A (en) * 2024-12-11 2025-01-10 华南理工大学 A method and system for visual tracking and positioning of marine cage railings

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005104737A2 (en) * 2004-04-27 2005-11-10 Honda Motor Co., Ltd. Simultaneous localization and mapping using multiple view feature descriptors
CN103149939A (en) * 2013-02-26 2013-06-12 北京航空航天大学 Dynamic target tracking and positioning method of unmanned plane based on vision
CN104992451A (en) * 2015-06-25 2015-10-21 河海大学 Improved target tracking method
CN107403443A (en) * 2017-07-28 2017-11-28 中南大学 A kind of more rope multi-lay windings row's rope form state online test method and device based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005104737A2 (en) * 2004-04-27 2005-11-10 Honda Motor Co., Ltd. Simultaneous localization and mapping using multiple view feature descriptors
CN103149939A (en) * 2013-02-26 2013-06-12 北京航空航天大学 Dynamic target tracking and positioning method of unmanned plane based on vision
CN104992451A (en) * 2015-06-25 2015-10-21 河海大学 Improved target tracking method
CN107403443A (en) * 2017-07-28 2017-11-28 中南大学 A kind of more rope multi-lay windings row's rope form state online test method and device based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
董慧芬 等: "《基于相关区域分层的改进Meanshift目标跟踪算法》", 《计算机应用》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110006444A (en) * 2019-03-21 2019-07-12 南京师范大学 An anti-jamming visual odometry construction method based on optimal mixture Gaussian model
CN110006444B (en) * 2019-03-21 2020-09-22 南京师范大学 Anti-interference visual odometer construction method based on optimized Gaussian mixture model
CN111985481A (en) * 2020-07-24 2020-11-24 东南大学 An Armor Plate Recognition Algorithm Based on Light Bar Matching
CN111951296A (en) * 2020-08-28 2020-11-17 福州大学 A target tracking method and device
CN111951296B (en) * 2020-08-28 2022-07-08 福州大学 A target tracking method and device
CN114998390A (en) * 2022-08-02 2022-09-02 环球数科集团有限公司 A visual analysis system and method for embedded smart camera
CN119295550A (en) * 2024-12-11 2025-01-10 华南理工大学 A method and system for visual tracking and positioning of marine cage railings
CN119295550B (en) * 2024-12-11 2025-03-28 华南理工大学 Visual tracking and positioning method and system for marine net cage railing

Similar Documents

Publication Publication Date Title
CN109064498A (en) Method for tracking target based on Meanshift, Kalman filtering and images match
CN107563313B (en) Multi-target pedestrian detection and tracking method based on deep learning
CN106780620B (en) A system and method for identifying, positioning and tracking table tennis motion trajectory
US20060291696A1 (en) Subspace projection based non-rigid object tracking with particle filters
US20070237359A1 (en) Method and apparatus for adaptive mean shift tracking
CN109903313A (en) A Real-time Pose Tracking Method Based on 3D Target Model
Jia et al. Sensor fusion-based visual target tracking for autonomous vehicles with the out-of-sequence measurements solution
CN103149939A (en) Dynamic target tracking and positioning method of unmanned plane based on vision
CN104200485A (en) Video-monitoring-oriented human body tracking method
CN103325112A (en) Quick detecting method for moving objects in dynamic scene
CN104463911A (en) Small infrared moving target detection method based on complicated background estimation
CN101916446A (en) Gray Target Tracking Algorithm Based on Edge Information and Mean Shift
CN112989889B (en) Gait recognition method based on gesture guidance
CN109448023B (en) Satellite video small target real-time tracking method
CN110276785A (en) An anti-occlusion infrared target tracking method
CN101408983A (en) Multi-object tracking method based on particle filtering and movable contour model
CN110006444B (en) Anti-interference visual odometer construction method based on optimized Gaussian mixture model
Chen et al. A stereo visual-inertial SLAM approach for indoor mobile robots in unknown environments without occlusions
CN105913028A (en) Face tracking method and face tracking device based on face++ platform
CN114549549A (en) Dynamic target modeling tracking method based on instance segmentation in dynamic environment
Lu et al. Object contour tracking using multi-feature fusion based particle filter
Madasu et al. Estimation of vehicle speed by motion tracking on image sequences
Tang et al. Salient moving object detection using stochastic approach filtering
CN116993774A (en) Tracking method of video moving target
Zhang et al. Feature regions segmentation based RGB-D visual odometry in dynamic environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181221