CN101770568A - Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation - Google Patents
Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation Download PDFInfo
- Publication number
- CN101770568A CN101770568A CN200810243204A CN200810243204A CN101770568A CN 101770568 A CN101770568 A CN 101770568A CN 200810243204 A CN200810243204 A CN 200810243204A CN 200810243204 A CN200810243204 A CN 200810243204A CN 101770568 A CN101770568 A CN 101770568A
- Authority
- CN
- China
- Prior art keywords
- image
- point
- target
- points
- unique point
- 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
Links
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 40
- 230000003287 optical effect Effects 0.000 title claims abstract description 34
- 238000004364 calculation method Methods 0.000 title abstract description 20
- 239000011159 matrix material Substances 0.000 claims abstract description 21
- 230000009466 transformation Effects 0.000 claims abstract description 7
- 238000005070 sampling Methods 0.000 claims description 9
- 239000013598 vector Substances 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 6
- 238000009499 grossing Methods 0.000 claims description 4
- 238000012887 quadratic function Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 claims description 2
- 230000008878 coupling Effects 0.000 claims 3
- 238000010168 coupling process Methods 0.000 claims 3
- 238000005859 coupling reaction Methods 0.000 claims 3
- 239000004744 fabric Substances 0.000 claims 2
- 238000010606 normalization Methods 0.000 claims 2
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 claims 1
- 239000010931 gold Substances 0.000 claims 1
- 229910052737 gold Inorganic materials 0.000 claims 1
- 238000007781 pre-processing Methods 0.000 abstract description 3
- 230000001131 transforming effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
本发明公开了一种基于仿射不变点及光流计算的目标自动识别和跟踪方法。首先对目标图像和视频帧进行图像预处理,并提取仿射不变特征点,然后进行特征点匹配,并剔除掉误匹配的点,当特征点的匹配对达到一定数量,且能生成仿射变换矩阵时,确认目标识别成功。然后利用上一步采集到的仿射不变点,进行特征光流计算,实现实时目标跟踪;如中间目标跟丢,立刻返回第一步,重新进行目标识别。本发明使用的特征点算子是一种基于尺度空间的、对图像缩放、旋转甚至仿射变换保持不变性的图像局部特征描述算子;而采用的特征光流计算方法法,计算量较小、准确度高,能实现实时跟踪。本发明广泛应用于视频监控、图像搜索、计算机辅助驾驶系统、机器人等领域。
The invention discloses an automatic target recognition and tracking method based on affine invariant points and optical flow calculation. First, image preprocessing is performed on the target image and video frame, and the affine invariant feature points are extracted, and then the feature points are matched, and the incorrectly matched points are eliminated. When the matching pairs of feature points reach a certain number, and affine can be generated When transforming the matrix, confirm that the target recognition is successful. Then use the affine invariant points collected in the previous step to perform characteristic optical flow calculations to realize real-time target tracking; if the intermediate target is lost, immediately return to the first step and perform target recognition again. The feature point operator used in the present invention is a scale-space-based image local feature description operator that maintains invariance to image scaling, rotation, and even affine transformation; and the feature optical flow calculation method adopted has a small amount of calculation , High accuracy, can realize real-time tracking. The invention is widely used in the fields of video surveillance, image search, computer-aided driving system, robot and the like.
Description
技术领域technical field
本发明涉及一种图像处理技术领域的方法,具体是一种基于仿射不变点及光流计算的目标自动识别和跟踪方法。The invention relates to a method in the technical field of image processing, in particular to an automatic target recognition and tracking method based on affine invariant points and optical flow calculation.
背景技术Background technique
目标识别与跟踪技术广泛应用于各类系统,例如视频监控系统、图像搜索系统、医疗图像系统、计算机辅助驾驶系统、机器人、智能房间等。实时、稳定地识别并跟踪运动中的目标是一件非常困难的任务,原因在于日益复杂的外界环境带来的图像噪声、模糊、光照的变化等给目标识别带来了巨大困难,同时,跟踪过程中目标的姿态、尺度随时会发生变化,这些都将影响着识别、跟踪算法的稳定性。Target recognition and tracking technology is widely used in various systems, such as video surveillance systems, image search systems, medical image systems, computer-assisted driving systems, robots, smart rooms, etc. Real-time and stable identification and tracking of moving targets is a very difficult task, because image noise, blur, and illumination changes brought about by the increasingly complex external environment have brought great difficulties to target recognition. At the same time, tracking The attitude and scale of the target will change at any time during the process, which will affect the stability of the recognition and tracking algorithms.
目标识别的主要任务是通过图像数据提取感兴趣的目标,并加以识别。目前目标识别方法主要分为由下而上的数据驱动型和由上而下的知识驱动型。由上而下的知识型目标识别方法针对图像中具体类型的目标而言,其缺点是代换性和兼容性差,识别目标改变,知识要随之改变。由下而上的数据驱动型目标识别方法不考虑目标的类型,对图像进行低层处理,适用面广,具有较强的代换性。本发明采用的就是一种由下而上的目标识别方法。The main task of target recognition is to extract the target of interest through image data and identify it. At present, target recognition methods are mainly divided into bottom-up data-driven and top-down knowledge-driven. The top-down knowledge-based target recognition method for specific types of targets in the image has the disadvantages of poor substitution and compatibility, and the recognition target changes, and the knowledge needs to change accordingly. The bottom-up data-driven target recognition method does not consider the type of the target, and performs low-level processing on the image, which is widely applicable and has strong substitution. The present invention adopts a bottom-up target recognition method.
在识别成功的基础上跟踪目标会得到较好的跟踪效果。可将目标跟踪方法按照是否利用了帧间信息,分为基于运动分析的方法和基于图像匹配的方法。基于运动分析的跟踪方法完全依靠运动检测来跟踪运动的物体,比较典型的有帧差法和光流法。光流跟踪运用目标与背景之间的不同速度来检测运动目标,具有较好的抗噪能力。光流法可以分为连续光流法和特征光流法。特征光流法是通过序列图像的特征匹配求得特征点处的光流,通过光流聚类实现目标与背景的分离。特征光流法优点在于可以处理大的帧间位移,对噪声的敏感性降低,只处理图像中很少数的特征点,计算量较小。本发明采用的就是一种基于特征光流法的目标跟踪方法。Tracking the target on the basis of successful recognition will get a better tracking effect. Target tracking methods can be divided into methods based on motion analysis and methods based on image matching according to whether inter-frame information is used. The tracking method based on motion analysis relies entirely on motion detection to track moving objects, and the typical frame difference method and optical flow method are more typical. Optical flow tracking uses the different speeds between the target and the background to detect moving targets, which has better anti-noise ability. Optical flow methods can be divided into continuous optical flow methods and characteristic optical flow methods. The characteristic optical flow method is to obtain the optical flow at the feature point through the feature matching of the sequence image, and realize the separation of the target and the background through the optical flow clustering. The advantage of the characteristic optical flow method is that it can handle large inter-frame displacements, reduce the sensitivity to noise, only process a small number of feature points in the image, and have a small amount of calculation. The present invention adopts a target tracking method based on the characteristic optical flow method.
发明内容:Invention content:
本发明的目的在于提供一种快速、准确地识别目标并进行实时目标跟踪的方法。The purpose of the present invention is to provide a method for quickly and accurately identifying a target and performing real-time target tracking.
实现本发明目的的技术解决方案为,一种基于仿射不变点及光流计算的目标识别和跟踪方法,其步骤为:The technical solution to realize the object of the present invention is a target recognition and tracking method based on affine invariant points and optical flow calculation, the steps of which are:
第一步,目标识别:首先对目标图像和视频帧进行图像预处理,并提取仿射不变特征点,然后进行特征点匹配,并剔除掉误匹配的点,当特征点的匹配对达到一定数量,并且能生成仿射变换矩阵时,确认目标识别成功。The first step, target recognition: first, image preprocessing is performed on the target image and video frame, and affine invariant feature points are extracted, then feature point matching is performed, and incorrectly matched points are eliminated. When the matching pairs of feature points reach a certain When the number and the affine transformation matrix can be generated, it is confirmed that the target recognition is successful.
该步骤提取的特征点对图像尺度和旋转保持不变,对光线变化、噪声、仿射变化都具有鲁棒性。The feature points extracted in this step remain invariant to image scale and rotation, and are robust to light changes, noise, and affine changes.
第二步,目标跟踪:利用上一步采集到的仿射不变点,进行特征光流计算,实现实时目标跟踪;如中间目标跟丢,立刻返回第一步,重新进行目标识别。The second step, target tracking: use the affine invariant points collected in the previous step to perform characteristic optical flow calculations to realize real-time target tracking; if the intermediate target is lost, immediately return to the first step and perform target recognition again.
本发明与现有技术相比,其显著优点是:1、本发明使用的特征点算子是一种基于尺度空间的、对图像缩放、旋转甚至仿射变换保持不变性的图像局部特征描述算子,其匹配精度高,在图像具有较复杂的变形(包括几何变形、分辨率变化和光照变化等)的情况下,仍然可以准确地匹配到大量的稳定点;2、本发明采用特征光流法进行目标跟踪,可以处理大的帧间位移,对噪声的敏感性降低,只处理图像中很少数的特征点,计算量较小。Compared with the prior art, the present invention has the following significant advantages: 1. The feature point operator used in the present invention is a scale-space-based image local feature description algorithm that maintains invariance to image scaling, rotation, and even affine transformation. Its matching accuracy is high, and it can still accurately match a large number of stable points when the image has more complex deformation (including geometric deformation, resolution change and illumination change, etc.); 2. The present invention uses characteristic optical flow The target tracking method can handle large inter-frame displacements, and the sensitivity to noise is reduced. Only a few feature points in the image are processed, and the amount of calculation is small.
附图说明:Description of drawings:
图1为本发明的基于仿射不变点及光流计算的目标识别和跟踪方法的流程框图。FIG. 1 is a flowchart of the target recognition and tracking method based on affine invariant points and optical flow calculation of the present invention.
图2为本发明的基于仿射不变点及光流计算的目标识别和跟踪方法的目标图像。Fig. 2 is a target image of the target recognition and tracking method based on affine invariant points and optical flow calculation of the present invention.
图3为本发明的基于仿射不变点及光流计算的目标识别和跟踪方法的目标识别并跟踪成功的视频截图。FIG. 3 is a screenshot of a successful target recognition and tracking video of the target recognition and tracking method based on affine invariant points and optical flow calculation of the present invention.
具体实施方式:Detailed ways:
以下结合附图对本发明的具体内容做进一步描述。The specific content of the present invention will be further described below in conjunction with the accompanying drawings.
本发明公开了一种基于仿射不变点及光流计算的目标自动识别和跟踪方法,该方法包括如下步骤:The invention discloses a method for automatic target recognition and tracking based on affine invariant points and optical flow calculation. The method includes the following steps:
第一步,目标识别:首先对目标图像和视频第一帧进行图像预处理,并提取仿射不变特征点,然后进行特征点匹配,并剔除掉误匹配的点,当特征点的匹配对达到一定数量,并且能生成仿射变换矩阵时,确认目标识别成功。若目标识别不成功,依次取视频的下一帧与目标图像进行匹配,直到目标识别成功;The first step, target recognition: first, perform image preprocessing on the target image and the first frame of the video, and extract affine invariant feature points, then perform feature point matching, and eliminate incorrectly matched points. When the number reaches a certain amount and an affine transformation matrix can be generated, it is confirmed that the target recognition is successful. If the target recognition is unsuccessful, the next frame of the video is sequentially matched with the target image until the target recognition is successful;
第二步,目标跟踪:利用视频本帧采集到的仿射不变点,进行特征光流计算,找到下帧中不变点的位置,实现实时目标跟踪;如中间目标跟丢,立刻返回第一步,重新进行目标识别;The second step, target tracking: use the affine invariant points collected in the current frame of the video to calculate the characteristic optical flow, find the position of the invariant points in the next frame, and realize real-time target tracking; if the intermediate target is lost, immediately return to the first One step, re-identify the target;
这种算法的思想是首先提取图像和视频帧中的仿射不变点进行匹配,从而将目标识别出来并确定目标在视频帧中的位置,然后利用这些特征点进行光流计算,实现目标实时跟踪。The idea of this algorithm is to first extract the affine invariant points in the image and the video frame for matching, so as to identify the target and determine the position of the target in the video frame, and then use these feature points to perform optical flow calculations to achieve real-time tracking of the target. track.
本发明基于仿射不变点及光流计算的目标自动识别和跟踪方法,在目标识别过程中提取仿射不变特征点的步骤如下:The present invention is based on affine invariant points and the target automatic identification and tracking method of optical flow calculation, and the steps of extracting affine invariant feature points in the process of target recognition are as follows:
第一步,利用高斯卷积核对目标图像及视频帧进行平滑处理,采用如下公式The first step is to use the Gaussian convolution kernel to smooth the target image and video frame, using the following formula
L(x,y,σ)=G(x,y,σ)*f(x,y)L(x,y,σ)=G(x,y,σ)*f(x,y)
其中L(x,y,σ)为平滑处理后尺度空间为σ的图像,G(x,y,σ)是高斯函数,f(x,y)为原来图像;Among them, L(x, y, σ) is the image whose scale space is σ after smoothing, G(x, y, σ) is the Gaussian function, and f(x, y) is the original image;
第二步,建立图像尺度空间金字塔。先对原图像放大一倍,并将此图像作为高斯尺度空间金字塔第一阶的图像原型,以后每阶的图像原型都由前一阶的图像原型下采样得到,大小为前阶原型的在高斯金字塔中每阶相邻两个高斯图像作差即得到高斯差分(DoG)金字塔。取金字塔第一阶第一层图像尺度坐标金子塔的总阶数为log2(min(w,h))-2,其中w为原始图像宽度,h为原始图像高度;The second step is to establish an image scale space pyramid. The original image is doubled first, and this image is used as the first-order image prototype of the Gaussian scale space pyramid. After that, the image prototype of each order is down-sampled from the previous-order image prototype, and the size is the size of the previous-order prototype. In the Gaussian pyramid, the difference between two adjacent Gaussian images at each level is the difference of Gaussian (DoG) pyramid. Take the image scale coordinates of the first level and the first layer of the pyramid The total order of the pyramid is log 2 (min(w, h))-2, where w is the original image width and h is the original image height;
第三步,将待检测的图像中每个像素点与同阶上、下层两幅图像相邻的2×9个像素点,以及自己周围的8个像素点进行比较,找寻极值点,确定为候选特征点;The third step is to compare each pixel in the image to be detected with the 2×9 pixels adjacent to the upper and lower images of the same order, and the 8 pixels around itself to find the extreme point and determine is a candidate feature point;
第四步,去除一些低对比度的特征点和不稳定的边缘响应点。采用拟合三维二次函数来精确特征点的DoG函数值并去除低对比度的特征点。若DoG图像中像素点值归一化在[0,1]之间,可将所有的点判定为低对比度的侯选极值点而过滤掉。利用图像边缘处的特征点在高斯差分图像的峰值处与边缘交叉处有一较大的主曲率值,但在垂直方向曲率较小这个性质将边缘处的低对比度特征点过滤掉;The fourth step is to remove some low-contrast feature points and unstable edge response points. Fitting three-dimensional quadratic function is used to refine the DoG function value of feature points and remove low-contrast feature points. If the pixel values in the DoG image are normalized between [0, 1], all The points are judged as low-contrast candidate extremum points and filtered out. Use the feature points at the edge of the image to have a large main curvature value at the intersection of the peak of the Gaussian difference image and the edge, but the curvature in the vertical direction is small to filter out the low-contrast feature points at the edge;
第五步,确定特征点方向。对于一幅图像f(x,y),像素点(x,y)处梯度的模值和方向求取如下:The fifth step is to determine the direction of the feature points. For an image f(x, y), the modulus and direction of the gradient at the pixel point (x, y) are calculated as follows:
以特征点为中心的邻域窗口(邻域窗口大小=3×1.5×特征点尺度)内采样,并用直方图统计邻域像素的梯度方向。在梯度方向直方图中,当存在另一个相当于主峰值80%能量的峰值时,则将这个方向认为是该特征点的辅方向;Sampling in the neighborhood window (neighborhood window size = 3×1.5×feature point scale) centered on the feature point, and use the histogram to count the gradient direction of the neighborhood pixels. In the gradient direction histogram, when there is another peak equivalent to 80% of the energy of the main peak, this direction is considered as the auxiliary direction of the feature point;
第六步,生成特征点描述字。首先将坐标轴旋转为特征点的方向,接下来以特征点为中心取16×16的窗口,在每4×4的小块上计算8个方向的梯度方向直方图,得到每个梯度方向的累加值,形成一个种子点,这样对于一个特征点就可以产生128维的特征向量。再继续将特征向量的长度归一化;The sixth step is to generate feature point description words. First, rotate the coordinate axis to the direction of the feature point, then take a 16×16 window centered on the feature point, calculate the gradient direction histogram of 8 directions on each 4×4 small block, and obtain the gradient direction histogram of each gradient direction Accumulate the value to form a seed point, so that a 128-dimensional feature vector can be generated for a feature point. Continue to normalize the length of the feature vector;
这样得到的特征点算子是一种基于尺度空间的、对图像缩放、旋转甚至仿射变换保持不变性、在图像具有较复杂的变形的情况下,可以准确地匹配到大量的稳定点的图像局部特征描述算子。The feature point operator obtained in this way is based on scale space, maintains invariance to image scaling, rotation and even affine transformation, and can accurately match a large number of stable points in the case of images with complex deformations. Local feature description operator.
本发明基于仿射不变点及光流计算的目标自动识别和跟踪方法,目标识别过程中特征点匹配的步骤如下:The present invention is based on an affine invariant point and an optical flow calculation target automatic identification and tracking method, and the steps of feature point matching in the target identification process are as follows:
第一步,如目标图像的特征点共有m个,描述字数组为(A1,A2,...,Am),待匹配图像的特征点共有n个,描述字数组为(B1,B2,...,Bn),对(A1,A2,...,Am)建k-d树,在k-d树中使用BBF(Best-Bin-First)算法搜索Bj(j=1,...,n)的近邻特征点Ai(i=1,...,m)。如两个特征点描述字A(a0,a1,......,a127)和B(b0,b1,......,b127)欧式距离为:In the first step, if there are m feature points in the target image, the description word array is (A 1 , A 2 , ..., A m ), and there are n feature points in the image to be matched, and the description word array is (B 1 , B 2 ,..., B n ), build a kd tree for (A 1 , A 2 ,..., A m ), and use the BBF (Best-Bin-First) algorithm to search for B j (j =1,...,n) neighbor feature point A i (i=1,...,m). For example, the Euclidean distance between two feature point descriptors A(a 0 , a 1 ,...,a 127 ) and B(b 0 , b 1 ,...,b 127 ) is:
当两幅图像的特征点描述字间欧式距离d最小时,这两个特征点就是近邻特征点,它们称为一对匹配点;When the feature points of two images describe the minimum Euclidean distance d between words, these two feature points are the nearest neighbor feature points, and they are called a pair of matching points;
第二步,利用RANSAC(RANdom SAmple Consensus)随机抽样一致性算法消除错配特征点。步骤为:The second step is to use the RANSAC (RANdom SAmple Consensus) random sampling consensus algorithm to eliminate mismatched feature points. The steps are:
(1)随机取4个特征匹配对(A1,B1)、(A2,B2)、(A3,B3)、(A4,B4),计算对应的单应性矩阵H(1) Randomly select 4 feature matching pairs (A 1 , B 1 ), (A 2 , B 2 ), (A 3 , B 3 ), (A 4 , B 4 ), and calculate the corresponding homography matrix H
(2)特征点Ai(i=1,...,4)用该矩阵对应后的点为Ci,如果Ai和Ci间的欧式距离d小于差错阈值时转第3步操作,否则转第1步操作;(2) The point corresponding to the feature point A i (i=1,...,4) with this matrix is C i , if the Euclidean distance d between A i and C i is less than the error threshold, go to step 3, Otherwise, go to step 1;
(3)对所有可能的特征匹配对检测是否满足H,把所有数据分为“内点”和“外点”;(3) To detect whether H is satisfied for all possible feature matching pairs, divide all data into "inside point" and "outside point";
(4)重复上述1-3步操作N次;(4) Repeat the above steps 1-3 N times;
(5)找出满足每次迭代计算出的对应矩阵内点最多的特征匹配对,这些点即是正确匹配点,并计算出最终的单应性矩阵H;(5) Find the feature matching pairs that satisfy the maximum number of points in the corresponding matrix calculated by each iteration, these points are the correct matching points, and calculate the final homography matrix H;
正确匹配的特征点个数必须为4个以上,即能求出单应性矩阵H,表明目标识别成功,否则依次取下一帧与目标图像进行目标识别。The number of correctly matched feature points must be more than 4, that is, the homography matrix H can be obtained, indicating that the target recognition is successful, otherwise the next frame and the target image are sequentially taken for target recognition.
本发明基于仿射不变点及光流计算的目标自动识别和跟踪方法,目标跟踪的步骤如下:The present invention is based on affine invariant point and optical flow calculation target automatic recognition and tracking method, the steps of target tracking are as follows:
第一步,由目标识别得到的仿射不变特征点建立待跟踪窗口W,计算视频图像帧间的灰度差平方和SSD(Sum of Squared intensity Differences),移动特征窗口,重复几步,直到s小于某个阈值,这时认为两帧的特征窗口匹配成功,即在下一帧中找到对应特征点的位置;The first step is to establish the window W to be tracked by the affine invariant feature points obtained by target recognition, calculate the sum of squared gray difference SSD (Sum of Squared intensity Differences) between video image frames, move the feature window, and repeat several steps until s is less than a certain threshold, at this time, it is considered that the feature windows of the two frames are successfully matched, that is, the position of the corresponding feature point is found in the next frame;
第二步,利用RANSAC(RANdom SAmple Consensus)随机抽样一致性算法,计算下一帧图像的单应性矩阵HThe second step is to use the RANSAC (RANdom SAmple Consensus) random sampling consensus algorithm to calculate the homography matrix H of the next frame of image
如最后能得到H,则认为目标跟踪成功,并消除那些不符合单应性矩阵的特征点,进入再下一帧的目标跟踪;若不能得到H,说明目标跟丢,重新进行目标识别。If H can be obtained at last, it is considered that the target tracking is successful, and those feature points that do not conform to the homography matrix are eliminated, and the target tracking of the next frame is entered; if H cannot be obtained, it means that the target is lost, and the target recognition is performed again.
结合图1,本发明一种基于仿射不变点及光流计算的目标自动识别和跟踪方法,步骤如下:In conjunction with Fig. 1, a kind of target automatic identification and tracking method based on affine invariant point and optical flow calculation of the present invention, the steps are as follows:
第一步,目标识别:The first step, target recognition:
宽度为w,高度为h的目标图像f(x,y),利用公式The target image f(x, y) with width w and height h, using the formula
L(x,y,σ)=G(x,y,σ)*f(x,y)L(x,y,σ)=G(x,y,σ)*f(x,y)
进行高斯平滑处理。然后将原图像放大一倍,并将此图像作为高斯尺度空间金字塔第一阶的图像原型,以后每阶的图像原型都由前一阶的图像原型下采样得到,大小为前阶原型的金子塔的总阶数为log2(min(w,h))-2。将图像中每个像素点与同阶上、下层两幅图像相邻的2×9个像素点,以及自己周围的8个像素点进行比较,找寻极值点,确定为候选特征点。采用拟合三维二次函数来精确特征点的高斯差分函数值并去除低对比度的特征点,同时去掉不稳定的边缘响应点。Perform Gaussian smoothing. Then the original image is doubled, and this image is used as the first-order image prototype of the Gaussian scale space pyramid. After that, the image prototype of each order is obtained by downsampling the image prototype of the previous order, and the size is the size of the previous-order prototype. The total order of the pyramid is log 2 (min(w,h))-2. Compare each pixel in the image with the adjacent 2×9 pixels of the upper and lower images of the same order, and the 8 pixels around itself, find the extreme points, and determine them as candidate feature points. Fitting a three-dimensional quadratic function is used to refine the Gaussian difference function value of feature points and remove low-contrast feature points, while removing unstable edge response points.
利用点(x,y)处梯度的模值和方向求取公式Use the modulus and direction of the gradient at the point (x, y) to find the formula
求取特征点方向及模值。然后将坐标轴旋转为特征点的方向,以特征点为中心取16×16的窗口,由每个梯度方向的累加值,产生128维的特征向量,并使特征向量的长度归一化。Obtain the direction and modulus of the feature points. Then rotate the coordinate axis to the direction of the feature point, take a 16×16 window centered on the feature point, and generate a 128-dimensional feature vector from the accumulated value of each gradient direction, and normalize the length of the feature vector.
对视频第一帧进行相同处理,提取特征点,并得到每个特征点的128维特征向量。Perform the same processing on the first frame of the video, extract the feature points, and obtain the 128-dimensional feature vector of each feature point.
以目标图像的特征点建k-d树,使用BBF(Best-Bin-First)算法搜索视频帧上的特征点,要求两点特征向量的欧式距离最小时,得到一对匹配点。搜索到所有的匹配点后,利用RANSAC(RANdom SAmple Consensus)随机抽样一致性算法消除错配特征点,正确匹配的点对大于4个,并能计算出单应性矩阵H,从而目标在视频帧中的位置识别成功,否则识别失败,在视频下一帧中重复识别目标。Build a kd tree with the feature points of the target image, use the BBF (Best-Bin-First) algorithm to search for the feature points on the video frame, and require the Euclidean distance between the two point feature vectors At minimum, a pair of matching points is obtained. After searching all the matching points, use the RANSAC (RANdom SAmple Consensus) random sampling consensus algorithm to eliminate the mismatched feature points. The correct matching point pairs are more than 4, and the homography matrix H can be calculated, so that the target is in the video frame The position recognition in is successful, otherwise the recognition fails, and the recognition target is repeated in the next frame of the video.
第二步,目标跟踪:The second step, target tracking:
由本帧目标识别得到的仿射不变特征点建立待跟踪窗口W,采用KLT(Kanade LucasTomasi)算法,计算本帧和下一帧视频图像间的灰度差平方和SSD(Sum of Squaredintensity Differences),在下一帧图像中移动特征窗口,与上一帧特征窗口进行匹配,找到对应特征点的位置,如找不到,则剔除那些丢失的特征点。The window W to be tracked is established by the affine invariant feature points obtained from the target recognition of this frame, and the KLT (Kanade Lucas Tomasi) algorithm is used to calculate the sum of squares of the gray level difference SSD (Sum of Squared intensity Differences) between this frame and the next frame of video images, Move the feature window in the next frame image, match it with the feature window of the previous frame, find the position of the corresponding feature point, if not found, remove those missing feature points.
再采用随机抽样一致性算法(RANSAC Random Sample Consensus)对下一帧图像中找到的特征点剔除误匹配的点,并生成单应性矩阵。如剩余正确匹配的点个数大于4个,并且单应性矩阵能够成功生成,说明目标跟踪成功,否则说明目标跟丢,立刻返回第一步,将下一帧图像作为当前帧,重新进行目标识别。Then use the random sampling consensus algorithm (RANSAC Random Sample Consensus) to remove the mismatched points from the feature points found in the next frame of image, and generate a homography matrix. If the number of remaining correctly matched points is greater than 4, and the homography matrix can be successfully generated, it means that the target tracking is successful; otherwise, it means that the target has been lost. Immediately return to the first step, and use the next frame image as the current frame to start the target again. identify.
图2为本发明的基于仿射不变点及光流计算的目标识别和跟踪方法的目标图像,图3为目标识别并跟踪成功的视频截图。Fig. 2 is a target image of the target recognition and tracking method based on affine invariant points and optical flow calculation of the present invention, and Fig. 3 is a video screenshot of successful target recognition and tracking.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200810243204A CN101770568A (en) | 2008-12-31 | 2008-12-31 | Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200810243204A CN101770568A (en) | 2008-12-31 | 2008-12-31 | Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN101770568A true CN101770568A (en) | 2010-07-07 |
Family
ID=42503420
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200810243204A Pending CN101770568A (en) | 2008-12-31 | 2008-12-31 | Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101770568A (en) |
Cited By (36)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101945257A (en) * | 2010-08-27 | 2011-01-12 | 南京大学 | Synthesis method for extracting chassis image of vehicle based on monitoring video content |
| CN101986348A (en) * | 2010-11-09 | 2011-03-16 | 上海电机学院 | Visual target identification and tracking method |
| CN102136133A (en) * | 2011-01-21 | 2011-07-27 | 北京中星微电子有限公司 | Image processing method and image processing device |
| CN102436590A (en) * | 2011-11-04 | 2012-05-02 | 康佳集团股份有限公司 | Real-time tracking method and system based on online learning |
| CN102496000A (en) * | 2011-11-14 | 2012-06-13 | 电子科技大学 | Urban traffic accident detection method |
| CN102567999A (en) * | 2010-12-29 | 2012-07-11 | 新奥特(北京)视频技术有限公司 | Method for applying track data |
| CN103247058A (en) * | 2013-05-13 | 2013-08-14 | 北京工业大学 | Fast optical flow field calculation method based on error-distributed multilayer grid |
| CN103324932A (en) * | 2013-06-07 | 2013-09-25 | 东软集团股份有限公司 | Video-based vehicle detecting and tracking method and system |
| CN103649988A (en) * | 2011-05-11 | 2014-03-19 | 谷歌公司 | viewpoint object selection |
| CN103985136A (en) * | 2014-03-21 | 2014-08-13 | 南京大学 | Target tracking method based on local feature point feature flow pattern |
| WO2015014111A1 (en) * | 2013-08-01 | 2015-02-05 | 华为技术有限公司 | Optical flow tracking method and apparatus |
| CN106295710A (en) * | 2016-08-18 | 2017-01-04 | 晶赞广告(上海)有限公司 | Image local feature matching process, device and terminal of based on non-geometric constraint |
| CN106454229A (en) * | 2016-09-27 | 2017-02-22 | 成都理想境界科技有限公司 | Monitoring method, camera device, image processing device and monitoring system |
| CN106504237A (en) * | 2016-09-30 | 2017-03-15 | 上海联影医疗科技有限公司 | Determine method and the image acquiring method of matching double points |
| CN106778528A (en) * | 2016-11-24 | 2017-05-31 | 四川大学 | A kind of method for detecting fatigue driving based on gaussian pyramid feature |
| CN106803880A (en) * | 2017-02-14 | 2017-06-06 | 扬州奚仲科技有限公司 | Orbit camera device people's is autonomous with clapping traveling control method |
| CN107301658A (en) * | 2017-05-19 | 2017-10-27 | 东南大学 | A kind of method that unmanned plane image is positioned with extensive old times phase image Rapid matching |
| CN107507231A (en) * | 2017-09-29 | 2017-12-22 | 智造未来(北京)机器人系统技术有限公司 | Trinocular vision identifies follow-up mechanism and method |
| US9898677B1 (en) | 2015-10-13 | 2018-02-20 | MotionDSP, Inc. | Object-level grouping and identification for tracking objects in a video |
| CN107833249A (en) * | 2017-09-29 | 2018-03-23 | 南京航空航天大学 | A kind of carrier-borne aircraft landing mission attitude prediction method of view-based access control model guiding |
| CN108154098A (en) * | 2017-12-20 | 2018-06-12 | 歌尔股份有限公司 | A kind of target identification method of robot, device and robot |
| CN108346152A (en) * | 2018-03-19 | 2018-07-31 | 北京大学口腔医院 | Method based on root of the tooth periapical film automatic Evaluation dental clinic treatment effect |
| CN109461174A (en) * | 2018-10-25 | 2019-03-12 | 北京陌上花科技有限公司 | Video object area tracking method and video plane advertisement method for implantation and system |
| CN109462748A (en) * | 2018-12-21 | 2019-03-12 | 福州大学 | A kind of three-dimensional video-frequency color correction algorithm based on homography matrix |
| CN109871813A (en) * | 2019-02-25 | 2019-06-11 | 沈阳上博智像科技有限公司 | A kind of realtime graphic tracking and system |
| CN109919971A (en) * | 2017-12-13 | 2019-06-21 | 北京金山云网络技术有限公司 | Image processing method, apparatus, electronic device, and computer-readable storage medium |
| CN110060276A (en) * | 2019-04-18 | 2019-07-26 | 腾讯科技(深圳)有限公司 | Object tracking method, tracking process method, corresponding device, electronic equipment |
| CN110288050A (en) * | 2019-07-02 | 2019-09-27 | 广东工业大学 | An automatic registration method for hyperspectral and LiDar images based on clustering and optical flow |
| CN110378936A (en) * | 2019-07-30 | 2019-10-25 | 北京字节跳动网络技术有限公司 | Optical flow computation method, apparatus and electronic equipment |
| CN110415276A (en) * | 2019-07-30 | 2019-11-05 | 北京字节跳动网络技术有限公司 | Motion information calculation method, device and electronic equipment |
| CN110730296A (en) * | 2013-04-30 | 2020-01-24 | 索尼公司 | Image processing apparatus, image processing method, and computer readable medium |
| CN110827324A (en) * | 2019-11-08 | 2020-02-21 | 江苏科技大学 | Video target tracking method |
| US10580135B2 (en) | 2016-07-14 | 2020-03-03 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for splicing images |
| WO2020107327A1 (en) * | 2018-11-29 | 2020-06-04 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for target identification in video |
| CN113673321A (en) * | 2021-07-12 | 2021-11-19 | 浙江大华技术股份有限公司 | Object re-identification method, object re-identification device, and computer-readable storage medium |
| CN116001846A (en) * | 2023-03-02 | 2023-04-25 | 苏州博慧智实物联网科技有限公司 | Automatic driving-oriented mobile action prejudging system and method |
-
2008
- 2008-12-31 CN CN200810243204A patent/CN101770568A/en active Pending
Cited By (56)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101945257A (en) * | 2010-08-27 | 2011-01-12 | 南京大学 | Synthesis method for extracting chassis image of vehicle based on monitoring video content |
| CN101986348A (en) * | 2010-11-09 | 2011-03-16 | 上海电机学院 | Visual target identification and tracking method |
| CN102567999A (en) * | 2010-12-29 | 2012-07-11 | 新奥特(北京)视频技术有限公司 | Method for applying track data |
| CN102567999B (en) * | 2010-12-29 | 2014-11-05 | 新奥特(北京)视频技术有限公司 | Method for applying track data |
| CN102136133A (en) * | 2011-01-21 | 2011-07-27 | 北京中星微电子有限公司 | Image processing method and image processing device |
| CN102136133B (en) * | 2011-01-21 | 2016-09-14 | 北京中星微电子有限公司 | A kind of image processing method and image processing apparatus |
| US9429990B2 (en) | 2011-05-11 | 2016-08-30 | Google Inc. | Point-of-view object selection |
| CN103649988B (en) * | 2011-05-11 | 2016-11-09 | 谷歌公司 | viewpoint object selection |
| CN103649988A (en) * | 2011-05-11 | 2014-03-19 | 谷歌公司 | viewpoint object selection |
| CN102436590A (en) * | 2011-11-04 | 2012-05-02 | 康佳集团股份有限公司 | Real-time tracking method and system based on online learning |
| CN102496000A (en) * | 2011-11-14 | 2012-06-13 | 电子科技大学 | Urban traffic accident detection method |
| CN102496000B (en) * | 2011-11-14 | 2013-05-08 | 电子科技大学 | Urban traffic accident detection method |
| CN110730296A (en) * | 2013-04-30 | 2020-01-24 | 索尼公司 | Image processing apparatus, image processing method, and computer readable medium |
| CN110730296B (en) * | 2013-04-30 | 2022-02-11 | 索尼公司 | Image processing apparatus, image processing method, and computer readable medium |
| CN103247058B (en) * | 2013-05-13 | 2015-08-19 | 北京工业大学 | A kind of quick the Computation of Optical Flow based on error Distributed-tier grid |
| CN103247058A (en) * | 2013-05-13 | 2013-08-14 | 北京工业大学 | Fast optical flow field calculation method based on error-distributed multilayer grid |
| CN103324932A (en) * | 2013-06-07 | 2013-09-25 | 东软集团股份有限公司 | Video-based vehicle detecting and tracking method and system |
| WO2015014111A1 (en) * | 2013-08-01 | 2015-02-05 | 华为技术有限公司 | Optical flow tracking method and apparatus |
| US9536147B2 (en) | 2013-08-01 | 2017-01-03 | Huawei Technologies Co., Ltd. | Optical flow tracking method and apparatus |
| CN103985136A (en) * | 2014-03-21 | 2014-08-13 | 南京大学 | Target tracking method based on local feature point feature flow pattern |
| US9898677B1 (en) | 2015-10-13 | 2018-02-20 | MotionDSP, Inc. | Object-level grouping and identification for tracking objects in a video |
| US10580135B2 (en) | 2016-07-14 | 2020-03-03 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for splicing images |
| US11893738B2 (en) | 2016-07-14 | 2024-02-06 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for splicing images |
| US11416993B2 (en) | 2016-07-14 | 2022-08-16 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for splicing images |
| CN106295710A (en) * | 2016-08-18 | 2017-01-04 | 晶赞广告(上海)有限公司 | Image local feature matching process, device and terminal of based on non-geometric constraint |
| CN106295710B (en) * | 2016-08-18 | 2019-06-14 | 晶赞广告(上海)有限公司 | Image local feature matching process, device and terminal based on non-geometric constraint |
| CN106454229A (en) * | 2016-09-27 | 2017-02-22 | 成都理想境界科技有限公司 | Monitoring method, camera device, image processing device and monitoring system |
| CN106504237A (en) * | 2016-09-30 | 2017-03-15 | 上海联影医疗科技有限公司 | Determine method and the image acquiring method of matching double points |
| CN106778528A (en) * | 2016-11-24 | 2017-05-31 | 四川大学 | A kind of method for detecting fatigue driving based on gaussian pyramid feature |
| CN106803880A (en) * | 2017-02-14 | 2017-06-06 | 扬州奚仲科技有限公司 | Orbit camera device people's is autonomous with clapping traveling control method |
| CN107301658A (en) * | 2017-05-19 | 2017-10-27 | 东南大学 | A kind of method that unmanned plane image is positioned with extensive old times phase image Rapid matching |
| CN107301658B (en) * | 2017-05-19 | 2020-06-23 | 东南大学 | Method for fast matching and positioning unmanned aerial vehicle image and large-scale old time phase image |
| CN107833249B (en) * | 2017-09-29 | 2020-07-07 | 南京航空航天大学 | Method for estimating attitude of shipboard aircraft in landing process based on visual guidance |
| CN107507231A (en) * | 2017-09-29 | 2017-12-22 | 智造未来(北京)机器人系统技术有限公司 | Trinocular vision identifies follow-up mechanism and method |
| CN107833249A (en) * | 2017-09-29 | 2018-03-23 | 南京航空航天大学 | A kind of carrier-borne aircraft landing mission attitude prediction method of view-based access control model guiding |
| CN109919971B (en) * | 2017-12-13 | 2021-07-20 | 北京金山云网络技术有限公司 | Image processing method, apparatus, electronic device, and computer-readable storage medium |
| CN109919971A (en) * | 2017-12-13 | 2019-06-21 | 北京金山云网络技术有限公司 | Image processing method, apparatus, electronic device, and computer-readable storage medium |
| CN108154098A (en) * | 2017-12-20 | 2018-06-12 | 歌尔股份有限公司 | A kind of target identification method of robot, device and robot |
| CN108346152A (en) * | 2018-03-19 | 2018-07-31 | 北京大学口腔医院 | Method based on root of the tooth periapical film automatic Evaluation dental clinic treatment effect |
| CN109461174B (en) * | 2018-10-25 | 2021-01-29 | 北京陌上花科技有限公司 | Video target area tracking method and video plane advertisement implanting method and system |
| CN109461174A (en) * | 2018-10-25 | 2019-03-12 | 北京陌上花科技有限公司 | Video object area tracking method and video plane advertisement method for implantation and system |
| US11010613B2 (en) | 2018-11-29 | 2021-05-18 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for target identification in video |
| WO2020107327A1 (en) * | 2018-11-29 | 2020-06-04 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for target identification in video |
| CN109462748A (en) * | 2018-12-21 | 2019-03-12 | 福州大学 | A kind of three-dimensional video-frequency color correction algorithm based on homography matrix |
| CN109871813A (en) * | 2019-02-25 | 2019-06-11 | 沈阳上博智像科技有限公司 | A kind of realtime graphic tracking and system |
| CN110060276B (en) * | 2019-04-18 | 2023-05-16 | 腾讯科技(深圳)有限公司 | Object tracking method, tracking processing method, corresponding device and electronic equipment |
| CN110060276A (en) * | 2019-04-18 | 2019-07-26 | 腾讯科技(深圳)有限公司 | Object tracking method, tracking process method, corresponding device, electronic equipment |
| CN110288050B (en) * | 2019-07-02 | 2021-09-17 | 广东工业大学 | Hyperspectral and LiDar image automatic registration method based on clustering and optical flow method |
| CN110288050A (en) * | 2019-07-02 | 2019-09-27 | 广东工业大学 | An automatic registration method for hyperspectral and LiDar images based on clustering and optical flow |
| CN110415276A (en) * | 2019-07-30 | 2019-11-05 | 北京字节跳动网络技术有限公司 | Motion information calculation method, device and electronic equipment |
| CN110378936B (en) * | 2019-07-30 | 2021-11-05 | 北京字节跳动网络技术有限公司 | Optical flow calculation method and device and electronic equipment |
| CN110378936A (en) * | 2019-07-30 | 2019-10-25 | 北京字节跳动网络技术有限公司 | Optical flow computation method, apparatus and electronic equipment |
| CN110415276B (en) * | 2019-07-30 | 2022-04-05 | 北京字节跳动网络技术有限公司 | Motion information calculation method and device and electronic equipment |
| CN110827324A (en) * | 2019-11-08 | 2020-02-21 | 江苏科技大学 | Video target tracking method |
| CN113673321A (en) * | 2021-07-12 | 2021-11-19 | 浙江大华技术股份有限公司 | Object re-identification method, object re-identification device, and computer-readable storage medium |
| CN116001846A (en) * | 2023-03-02 | 2023-04-25 | 苏州博慧智实物联网科技有限公司 | Automatic driving-oriented mobile action prejudging system and method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101770568A (en) | Target automatically recognizing and tracking method based on affine invariant point and optical flow calculation | |
| Das et al. | Use of salient features for the design of a multistage framework to extract roads from high-resolution multispectral satellite images | |
| CN114782499B (en) | A method and device for extracting static areas of images based on optical flow and view geometry constraints | |
| Timofte et al. | Multi-view traffic sign detection, recognition, and 3D localisation | |
| Kumar et al. | Review of lane detection and tracking algorithms in advanced driver assistance system | |
| Movaghati et al. | Road extraction from satellite images using particle filtering and extended Kalman filtering | |
| CN105335986B (en) | Method for tracking target based on characteristic matching and MeanShift algorithm | |
| Enzweiler et al. | Monocular pedestrian detection: Survey and experiments | |
| CN103295242B (en) | A kind of method for tracking target of multiple features combining rarefaction representation | |
| CN104134209B (en) | A kind of feature extracting and matching method and system in vision guided navigation | |
| Lee et al. | SNIDER: Single noisy image denoising and rectification for improving license plate recognition | |
| CN110084830B (en) | Video moving object detection and tracking method | |
| CN104036523A (en) | Improved mean shift target tracking method based on surf features | |
| CN106203423B (en) | A weak structure-aware visual target tracking method fused with context detection | |
| CN103262121A (en) | Detection and tracking of moving objects | |
| CN104036524A (en) | Fast target tracking method with improved SIFT algorithm | |
| CN104200495A (en) | Multi-target tracking method in video surveillance | |
| Havasi et al. | Detection of gait characteristics for scene registration in video surveillance system | |
| Yadav | Vision-based detection, tracking, and classification of vehicles | |
| CN111862147B (en) | Tracking method for multiple vehicles and multiple lines of human targets in video | |
| CN110298248A (en) | A kind of multi-object tracking method and system based on semantic segmentation | |
| CN113160276A (en) | Target tracking method, target tracking device and computer readable storage medium | |
| Kumar et al. | An efficient approach for highway lane detection based on the Hough transform and Kalman filter | |
| CN103854290A (en) | Extended target tracking method combining skeleton characteristic points and distribution field descriptors | |
| CN115861352A (en) | Monocular vision, IMU and laser radar data fusion and edge extraction 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 | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20100707 |