CN109978908A - A kind of quick method for tracking and positioning of single goal adapting to large scale deformation - Google Patents

A kind of quick method for tracking and positioning of single goal adapting to large scale deformation Download PDF

Info

Publication number
CN109978908A
CN109978908A CN201910219613.7A CN201910219613A CN109978908A CN 109978908 A CN109978908 A CN 109978908A CN 201910219613 A CN201910219613 A CN 201910219613A CN 109978908 A CN109978908 A CN 109978908A
Authority
CN
China
Prior art keywords
target
template
parameter
image
coordinates
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
Application number
CN201910219613.7A
Other languages
Chinese (zh)
Other versions
CN109978908B (en
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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201910219613.7A priority Critical patent/CN109978908B/en
Publication of CN109978908A publication Critical patent/CN109978908A/en
Application granted granted Critical
Publication of CN109978908B publication Critical patent/CN109978908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/223Analysis of motion using block-matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

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)
  • Closed-Circuit Television Systems (AREA)

Abstract

The present invention relates to it is a kind of adapt to large scale deformation but the quick method for tracking and positioning of target, the following steps are included: template matching, determine the coordinate and size of target template image, cyclic convolution is done with current frame image and target template image and acquires target response matrix with Ridge Regression Modeling Method, as rough coordinates of targets at response matrix maximum value;Motion detection, before and after frames images match obtain visual angle and shake parameter, and acquire difference diagram;It counts difference diagram and obtains motion detection output coordinate;The rough coordinates of targets is corrected with the motion detection output coordinate, obtains precision target coordinate;Template renewal updates target template with the precision target coordinate, updates ridge regression parameter;The present invention can rapidly and accurately track set goal position, and suitable for the scene that target shape has large scale to change, there is good robustness, can be applied in the scenes such as shooting auto-focusing, monitor video target lock-on.

Description

一种适应大尺度形变的单目标快速跟踪定位方法A fast tracking and localization method for single target adapting to large-scale deformation

技术领域technical field

本发明属于视频信号处理技术领域,具体涉及一种适应大尺度形变的但目标快速跟踪定位方法。The invention belongs to the technical field of video signal processing, and in particular relates to a method for fast tracking and positioning of targets that is adaptable to large-scale deformation.

背景技术Background technique

目标跟踪是计算机视觉中的一个重要研究方向。它在人机交互、机器识别和人工智能等领域有着广泛的应用。Object tracking is an important research direction in computer vision. It has a wide range of applications in the fields of human-computer interaction, machine recognition, and artificial intelligence.

在目标跟踪领域,目标形状的变化一直是一个难题。现有的方法大都是在首帧建立标准模板,在后帧中以此做模板匹配求得目标位置。但一旦在跟踪过程中目标发生形变(如拍摄角度变化,人体的翻转等),模板匹配很可能会失效。In the field of target tracking, the change of target shape has always been a difficult problem. Most of the existing methods establish a standard template in the first frame, and perform template matching in the latter frame to obtain the target position. However, once the target is deformed during the tracking process (such as the change of the shooting angle, the flip of the human body, etc.), the template matching is likely to fail.

而形状的变化必然意味着目标所在处像素发生了剧烈改变,因此,十分适合运动检测来探测目标。The change of shape necessarily means that the pixel where the target is located has changed drastically, so it is very suitable for motion detection to detect the target.

发明内容SUMMARY OF THE INVENTION

为了解决现有技术中存在的目标发生形变后,模板匹配失效的技术问题,本发明提供了以下技术方案:In order to solve the technical problem of template matching failure after the target in the prior art is deformed, the present invention provides the following technical solutions:

一种适应大尺度形变的单目标快速跟踪定位方法,包括以下步骤:A single-target fast tracking and positioning method adapting to large-scale deformation, including the following steps:

步骤1、模板匹配,确定目标模板图像的坐标和大小,用当前帧图像与目标模板图像做循环卷积并用岭回归方法求得目标响应矩阵,响应矩阵最大值处作为粗略目标坐标;Step 1, template matching, determine the coordinates and size of the target template image, use the current frame image and the target template image to do circular convolution and use the ridge regression method to obtain the target response matrix, and the maximum value of the response matrix is used as the rough target coordinate;

步骤2、运动检测,Step 2, motion detection,

步骤2.1、前后帧图像匹配,获取视角晃动参数,并求得差分图;Step 2.1, match the front and rear frame images, obtain the viewing angle shaking parameters, and obtain the difference map;

步骤2.2、统计差分图获取运动检测输出坐标;Step 2.2, obtain motion detection output coordinates from statistical difference map;

步骤2.3、以所述运动检测输出坐标校正所述粗略目标坐标,得到精确目标坐标;Step 2.3, correcting the rough target coordinates with the motion detection output coordinates to obtain precise target coordinates;

步骤3、模板更新,以所述精确目标坐标更新目标模板,更新岭回归参数。Step 3, template update, update the target template with the precise target coordinates, and update the ridge regression parameters.

作为本发明的进一步说明,所述步骤1中当前帧图像与目标模板图像的循环卷积矩阵为,As a further description of the present invention, the circular convolution matrix of the current frame image and the target template image in the step 1 is,

设目标模板图像为z,当前帧图像为img,上式中||img||为img的范数,||z||为z的范数,FFT和IFFT分别代表图像的二维快速傅里叶变换与反变换,为FFT(z)的共轭,σ为高斯核方法的标准差;Let the target template image be z, the current frame image be img, where ||img|| is the norm of img, ||z|| is the norm of z, FFT and IFFT represent the two-dimensional fast Fourier of the image respectively Leaf transformation and inverse transformation, is the conjugate of FFT(z), and σ is the standard deviation of the Gaussian kernel method;

所述目标响应矩阵为,The target response matrix is,

R=IFFT(FFT(K)·FFT(γ))R=IFFT(FFT(K)·FFT(γ))

上式中γ为岭回归参数矩阵,R即为目标响应矩阵,其中最高峰的位置即为粗略目标坐标,表示为[xt,yt]。In the above formula, γ is the ridge regression parameter matrix, R is the target response matrix, and the position of the highest peak is the rough target coordinate, which is expressed as [x t , y t ].

作为本发明的进一步说明,所述步骤2.1中晃动参数的预测方法为,As a further description of the present invention, the method for predicting the shaking parameters in the step 2.1 is:

上式中θ=[α,β,ε]为晃动参数,α为上下晃动的参数,β为左右晃动的参数,ε是镜头缩放参数,Ic即为当前帧图像,Ip为上一帧图像,Z(Ip,ε)是将当前帧以参数ε缩放后的图像;In the above formula, θ=[α, β, ε] is the shaking parameter, α is the parameter of shaking up and down, β is the parameter of shaking left and right, ε is the zoom parameter of the lens, Ic is the current frame image, Ip is the previous frame image, Z(Ip, ε) is the image after scaling the current frame with the parameter ε;

前后帧图像的差分图为,The difference map of the front and rear frame images is,

上式中D是差分图。In the above formula, D is the difference map.

作为本发明的进一步说明,所述步骤2.2中运动检测输出坐标为,As a further description of the present invention, the motion detection output coordinates in the step 2.2 are,

设目标大小为[sizex,sizey],上式中xmd为运动目标的x坐标位置,ymd为运动目标的y坐标位置,D(i,j)是差分图在坐标[i,j]处的值;Let the target size be [size x , size y ], where x md is the x-coordinate position of the moving target, y md is the y-coordinate position of the moving target, and D(i, j) is the difference map at coordinates [i, j ] at the value;

上式中Dsum是整个差分图窗口的权重之和。In the above formula, D sum is the sum of the weights of the entire difference map window.

作为本发明的进一步说明,所述步骤2.3中精确目标坐标为,As a further description of the present invention, the precise target coordinates in the step 2.3 are,

上式中ρ是权重系数,[xfinal,yfinal]即为精确的模板坐标。In the above formula, ρ is the weight coefficient, and [x final , y final ] is the precise template coordinate.

作为本发明的进一步说明,所述步骤3中更新后的目标模板为,As a further description of the present invention, the updated target template in the step 3 is,

上式中为更新后的目标模板,δ为权重系数,更新后的岭回归参数为,In the above formula is the updated target template, δ is the weight coefficient, and the updated ridge regression parameters are,

γ=(K+λI)-1Sγ=(K+λI) -1 S

上式中γ为更新后的岭回归参数,I为与K大小一样的单位矩阵,I与正则化系数λ配合起到正则化作用,S为标准响应矩阵。In the above formula, γ is the updated ridge regression parameter, I is the unit matrix of the same size as K, I cooperates with the regularization coefficient λ to play a regularizing role, and S is the standard response matrix.

与现有技术相比,本发明取得的有益效果为:Compared with the prior art, the beneficial effects obtained by the present invention are:

本发明通过前后帧匹配消除视角晃动,并做帧差以检测运动目标,将两者结果加权平均,可以快速准确地跟踪既定目标位置,且适用于目标形状有大尺度变化的场景中,有很好的鲁棒性,可应用于拍摄自动对焦、监控视频目标锁定等场景中。The invention eliminates the shaking of the viewing angle by matching the front and rear frames, detects the moving target by making the frame difference, and weights the results of the two to quickly and accurately track the position of the target, and is suitable for scenes with large-scale changes in the shape of the target. It has good robustness and can be used in scenes such as shooting autofocus, surveillance video target locking, etc.

以下将结合附图及实施例对本发明做进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

附图说明Description of drawings

图1是本方法的系统框图。Figure 1 is a system block diagram of the method.

图2是目标响应矩阵R。Figure 2 is the target response matrix R.

图3是帧间差法的当前帧效果图像。FIG. 3 is a current frame effect image of the inter-frame difference method.

图4是帧间差法的上一帧效果图像。Fig. 4 is the effect image of the previous frame of the inter-frame difference method.

图5是帧间差法的当前帧和上一帧之间的差分图。FIG. 5 is a difference diagram between the current frame and the previous frame of the inter-frame difference method.

图6是目标移动、并带有镜头的晃动时,帧间差法当前帧效果图。Figure 6 is a current frame effect diagram of the inter-frame difference method when the target moves and the lens is shaken.

图7是目标移动、并带有镜头的晃动时,帧间差法上一帧效果图。Figure 7 is the effect diagram of the previous frame of the frame-to-frame difference method when the target moves and the lens is shaken.

图8是目标移动、并带有镜头的晃动时,帧间差法当前帧和上一帧之间的差分图。Figure 8 is a difference diagram between the current frame and the previous frame by the inter-frame difference method when the target moves and the lens is shaken.

图9是通过本方法校正晃动参数后,当前帧效果图一。FIG. 9 is the first effect diagram of the current frame after the shaking parameters are corrected by this method.

图10是通过本方法校正晃动参数后,上一帧效果图一。FIG. 10 is the first rendering of the previous frame after the shaking parameters are corrected by this method.

图11是通过本方法校正晃动参数后,直接用帧间差法求得的当前帧与上一帧之间的差分图一。FIG. 11 is a difference diagram 1 between the current frame and the previous frame obtained directly by the inter-frame difference method after correcting the shaking parameters by this method.

图12是通过本方法校正晃动参数后,再通过镜头抖动参数的矫正,然后用帧间差法求得的当前帧与上一帧之间的差分图一。Fig. 12 is a difference diagram between the current frame and the previous frame obtained by using the method of inter-frame difference after correcting the shaking parameters by this method, and then correcting the lens shaking parameters.

图13是通过本方法校正晃动参数后,当前帧效果图二。FIG. 13 is the second effect diagram of the current frame after the shaking parameters are corrected by this method.

图14是通过本方法校正晃动参数后,上一帧效果图二。FIG. 14 is the second effect diagram of the previous frame after correcting the shaking parameters by this method.

图15是通过本方法校正晃动参数后,直接用帧间差法求得的当前帧与上一帧之间的差分图二。FIG. 15 is a second difference diagram between the current frame and the previous frame obtained directly by the inter-frame difference method after correcting the shaking parameters by this method.

图16是通过本方法校正晃动参数后,再通过镜头抖动参数的矫正,然后用帧间差法求得的当前帧与上一帧之间的差分图二。Fig. 16 is the difference between the current frame and the previous frame obtained by the method of inter-frame difference after correcting the shaking parameters by this method, and then correcting the lens shaking parameters.

图17是标准响应矩阵S。Figure 17 is the standard response matrix S.

图18是跟踪目标所在位置效果图一。Figure 18 is a first effect diagram of the location of the tracking target.

图19是图18经KCF方法处理后的跟踪效果图。FIG. 19 is a tracking effect diagram of FIG. 18 after being processed by the KCF method.

图20是图18经SAMF方法处理后的跟踪效果图。FIG. 20 is a tracking effect diagram of FIG. 18 after being processed by the SAMF method.

图21是图18经DSST方法处理后跟踪效果图。Fig. 21 is a tracking effect diagram of Fig. 18 after being processed by the DSST method.

图22是图18经Staple方法处理后的跟踪效果图。FIG. 22 is a tracking effect diagram of FIG. 18 after processing by the Staple method.

图23是图18经本方法处理后的跟踪效果图。FIG. 23 is a tracking effect diagram of FIG. 18 after processing by this method.

图24是跟踪目标所在位置效果图二。Figure 24 is the second effect diagram of the location of the tracking target.

图25是图24经KCF方法处理后的跟踪效果图。FIG. 25 is a tracking effect diagram of FIG. 24 after being processed by the KCF method.

图26是图24经SAMF方法处理后的跟踪效果图。FIG. 26 is a tracking effect diagram of FIG. 24 after being processed by the SAMF method.

图27是图24经DSST方法处理后跟踪效果图。Fig. 27 is a tracking effect diagram of Fig. 24 after being processed by the DSST method.

图28是图24经Staple方法处理后的跟踪效果图。FIG. 28 is a tracking effect diagram of FIG. 24 after processing by the Staple method.

图29是图24经本方法处理后的跟踪效果图。Fig. 29 is a tracking effect diagram of Fig. 24 after processing by this method.

具体实施方式Detailed ways

为进一步阐述本发明达成预定目的所采取的技术手段及功效,以下结合附图及实施例对本发明的具体实施方式、结构特征及其功效,详细说明如下。In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose, the specific embodiments, structural features and effects of the present invention are described in detail below with reference to the accompanying drawings and examples.

为解决现有技术存在的技术问题,本实施例提供的技术方案主要分为模板匹配阶段、运动检测阶段和模板更新阶段三个部分,如图1所示,在首帧中需要人为给定目标在首帧的位置和大小,进而对原图进行裁剪,得到以跟踪目标为中心的标准图。In order to solve the technical problems existing in the prior art, the technical solution provided in this embodiment is mainly divided into three parts: a template matching phase, a motion detection phase and a template updating phase. As shown in FIG. 1 , an artificial target is required in the first frame. At the position and size of the first frame, the original image is then cropped to obtain a standard image centered on the tracking target.

一、模板匹配阶段,First, the template matching stage,

设目标模板图像为z,当前帧图像为img,为了加速技术,以频域乘积代替时域卷积,则当前帧图像与目标模板图像的循环卷积矩阵K为:Let the target template image be z and the current frame image be img. In order to speed up the technology, the frequency domain product is used instead of the time domain convolution, then the circular convolution matrix K of the current frame image and the target template image is:

式(1)中||img||为img的范数,||z||为z的范数,FFT和IFFT分别代表图像的二维快速傅里叶变换与反变换,为FFT(z)的共轭,σ为高斯核方法的标准差;则目标响应矩阵为,In formula (1) ||img|| is the norm of img, ||z|| is the norm of z, FFT and IFFT represent the two-dimensional fast Fourier transform and inverse transform of the image, respectively, is the conjugate of FFT(z), σ is the standard deviation of the Gaussian kernel method; then the target response matrix is,

R=IFFT(FFT(K)·FFT(γ)) (2)R=IFFT(FFT(K)·FFT(γ)) (2)

式(2)中γ为岭回归参数矩阵。如图2所示,R即为目标响应矩阵。目标响应矩阵R为一个与图像大小一致的响应矩阵,在R中每个坐标上值的大小代表着改位置与目标的相关度,相关度越大则目标越有可能在该坐标点,故目标所在位置即为矩阵R中的最大值所在位置。通过遍历R矩阵,找到其最大值所在,记录其坐标,表示为[xt,yt],该坐标用以辅助后文中运动检测方法。In formula (2), γ is the ridge regression parameter matrix. As shown in Figure 2, R is the target response matrix. The target response matrix R is a response matrix that is consistent with the size of the image. The value of each coordinate in R represents the correlation between the modified position and the target. The greater the correlation, the more likely the target is at this coordinate point, so the target The position is the position of the maximum value in the matrix R. By traversing the R matrix, find its maximum value, record its coordinates, which are expressed as [x t , y t ], and the coordinates are used to assist the motion detection method in the following.

二、运动检测阶段2. Motion detection stage

帧间差法常用于检测运动目标,其基本原理为求相邻两帧间图像两两像素间的欧式距离而得到差分图,在差分图中每个点的值代表着当前帧与上一帧的变化程度,运动的目标则会出现在变化程度大的点上。其效果如图3、图4、图5所示。其中图3和4为分别为当前帧图像与上一帧图像,图5为两者之间的差分图。从图中明显可以看出,当摄像头静止时,帧间差法可以比较准确的获取运动目标位置。但一旦两帧不仅有目标的移动,也带有镜头的晃动,大量背景像素也发生改变。此时帧间差法的输出差分图中无法准确辨识出运动目标所在,如图6、图7、图8所示。The inter-frame difference method is often used to detect moving objects. Its basic principle is to obtain the difference map by calculating the Euclidean distance between the pixels of two adjacent frames. The value of each point in the difference map represents the current frame and the previous frame. The degree of change, the target of the movement will appear at the point with a large degree of change. The effect is shown in Figure 3, Figure 4, and Figure 5. 3 and 4 are respectively the current frame image and the previous frame image, and FIG. 5 is the difference diagram between the two. It can be clearly seen from the figure that when the camera is stationary, the inter-frame difference method can accurately obtain the position of the moving target. But once the two frames have not only the movement of the target, but also the shaking of the lens, a lot of background pixels also change. At this time, the output difference map of the inter-frame difference method cannot accurately identify the location of the moving target, as shown in Figure 6, Figure 7, and Figure 8.

故本方法首先通过前后帧匹配来预测视频当前拍摄视角的晃动参数θ=[α,β,ε],经过镜头晃动矫正后再进行帧间差法。该晃动参数的预测方法为:Therefore, this method first predicts the shaking parameter θ=[α, β, ε] of the current shooting angle of the video by matching the front and rear frames, and then performs the inter-frame difference method after the lens shake is corrected. The prediction method of the sloshing parameter is:

式(3)中θ为晃动参数,α为上下晃动的参数,β为左右晃动的参数,ε是镜头缩放参数,Ic即为当前帧图像,Ip为上一帧图像,Z(Ic,ε)是将当前帧以参数ε缩放后的图像;In formula (3), θ is the shaking parameter, α is the parameter of shaking up and down, β is the parameter of shaking left and right, ε is the lens zoom parameter, Ic is the current frame image, Ip is the previous frame image, Z(Ic, ε) is the image after scaling the current frame with the parameter ε;

以视角晃动参数θ为参考,求校正后相邻两张图的欧式距离,即可得前后两帧之间的差分图D,Taking the angle of view shaking parameter θ as a reference, find the Euclidean distance between the two adjacent images after correction, and then the difference map D between the two frames before and after can be obtained,

式(4)中D是透镜晃动参数校正后的差分图,其效果如图9至图16所示。其中图9和图13是当前帧图像,图10和图14是上一帧图像。图11和图15为两帧图像直接用帧差法求得的差分图。如图所示,由于镜头的晃动,图像中背景像素也在移动,所以在差分图中也很难锁定运动目标的所在。但是在通过镜头抖动参数的矫正,前后两帧的差分图如图12和图16所示,很显然背景信息得到了抑制,运动目标所在的位置显示出更大的差分值,效果明显。In Equation (4), D is the difference map after the lens shake parameter is corrected, and its effect is shown in Figures 9 to 16 . 9 and 13 are images of the current frame, and FIGS. 10 and 14 are images of the previous frame. Figure 11 and Figure 15 are the difference diagrams obtained directly by the frame difference method for two frames of images. As shown in the figure, the background pixels in the image are also moving due to the shaking of the lens, so it is also difficult to lock the location of the moving object in the difference map. However, after correcting the lens shake parameters, the difference maps of the two frames before and after are shown in Figure 12 and Figure 16. Obviously, the background information has been suppressed, and the position of the moving target shows a larger difference value, and the effect is obvious.

在差分图上,以模板匹配阶段的粗略目标坐标输出[xt,yt]为中心,取一大小为模板两倍的检索窗口,在该窗口中以差分图的值为权重,对各个像素坐标做加权平均,得到运动目标位置,设运动目标大小为[sizex,sizey],则运动检测输出坐标为,On the difference map, take the rough target coordinate output [x t , y t ] of the template matching stage as the center, take a retrieval window twice the size of the template, and use the value of the difference map as the weight in this window, for each pixel The coordinates are weighted and averaged to obtain the position of the moving target. If the size of the moving target is [size x , size y ], the output coordinates of the motion detection are,

式(5)中xmd为运动目标的x坐标位置,ymd为运动目标的y坐标位置,D(i,j)是差分图在坐标[i,j]处的值Dsum是整个差分图窗口的权重之和;In formula (5), x md is the x coordinate position of the moving target, y md is the y coordinate position of the moving target, D(i, j) is the value of the difference map at coordinates [i, j] D sum is the entire difference map The sum of the weights of the windows;

最终我们将模板匹配的输出与运动检测的输出加权平均,Finally we take the weighted average of the output of template matching and the output of motion detection,

上式中ρ是权重系数,[xfinal,yfinal]即为精确的模板坐标。In the above formula, ρ is the weight coefficient, and [x final , y final ] is the precise template coordinate.

三、模板更新阶段,Third, the template update stage,

在当前帧计算模板位置[xfinal,yfinal]后,以此坐标为中心,以目标大小[sizex,sizey]为尺度,重新获取当前帧目标模板z′,当前帧模板z′与上帧模板z加权平均得到新模板新模板将代替旧模板参与下一帧的跟踪任务:After calculating the template position [x final , y final ] in the current frame, take this coordinate as the center and the target size [size x , size y ] as the scale, re-acquire the current frame target template z′, the current frame template z′ and the above Frame template z-weighted average to get new template The new template will replace the old template to participate in the tracking task of the next frame:

式(8)中δ为权重系数,在得到新模板后,以式(1)重新计算响应矩阵K用以更新岭回归参数γ,In formula (8), δ is the weight coefficient. After the new template is obtained, the response matrix K is recalculated according to formula (1) to update the ridge regression parameter γ,

γ=(K+λI)-1S (9)γ=(K+λI) -1 S (9)

式(9)中α为更新后的岭回归参数,I为与K大小一样的单位矩阵,I与正则化系数λ配合起到正则化作用,S为标准响应矩阵。其中λ取值为一个很小的正实数。S取值为与图像大小一致,标准差极小的二维高斯核形状,其形状如图17所示。In formula (9), α is the updated ridge regression parameter, I is the unit matrix of the same size as K, I cooperates with the regularization coefficient λ to play a regularizing role, and S is the standard response matrix. where λ is a small positive real number. The value of S is consistent with the size of the image and has a very small standard deviation of the two-dimensional Gaussian kernel shape, as shown in Figure 17.

存在目标尺度大幅度形变的视频场景中,本方法有着绝对优势,与先进的跟踪方法相比,本方法鲁棒性更高,能完成其他方法不能完成的跟踪任务。其效果展示如图6所示。Compared with the advanced tracking methods, this method has higher robustness and can complete the tracking tasks that other methods cannot. The effect is shown in Figure 6.

综上,本方法的主要特点为:1、)通过前后帧图像的匹配来预测和消除镜头抖动。然后对运动目标进行帧差分检测;2)结合运动检测算法和相关滤波跟踪。采用运动检测法对跟踪算法的结果进行校正,取得更好的跟踪效果。3)该算法可以在目标快速运动变形时完成更复杂的跟踪任务。To sum up, the main features of this method are: 1. Predict and eliminate lens shake by matching the front and rear frame images. Then perform frame differential detection on moving objects; 2) Combine motion detection algorithm and correlation filter tracking. Motion detection method is used to correct the results of the tracking algorithm to achieve better tracking results. 3) The algorithm can complete more complex tracking tasks when the target moves and deforms rapidly.

以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be considered that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field of the present invention, without departing from the concept of the present invention, some simple deductions or substitutions can be made, which should be regarded as belonging to the protection scope of the present invention.

Claims (6)

1.一种适应大尺度形变的单目标快速跟踪定位方法,其特征在于,包括以下步骤:1. a single target fast tracking and positioning method adapted to large-scale deformation, is characterized in that, comprises the following steps: 步骤1、模板匹配,确定目标模板图像的坐标和大小,用当前帧图像与目标模板图像做循环卷积并用岭回归方法求得目标响应矩阵,响应矩阵最大值处作为粗略目标坐标;Step 1, template matching, determine the coordinates and size of the target template image, use the current frame image and the target template image to do circular convolution and use the ridge regression method to obtain the target response matrix, and the maximum value of the response matrix is used as the rough target coordinate; 步骤2、运动检测,Step 2, motion detection, 步骤2.1、前后帧图像匹配,获取视角晃动参数,并求得差分图;Step 2.1, match the front and rear frame images, obtain the viewing angle shaking parameters, and obtain the difference map; 步骤2.2、统计差分图获取运动检测输出坐标;Step 2.2, obtain motion detection output coordinates from statistical difference map; 步骤2.3、以所述运动检测输出坐标校正所述粗略目标坐标,得到精确目标坐标;Step 2.3, correcting the rough target coordinates with the motion detection output coordinates to obtain precise target coordinates; 步骤3、模板更新,以所述精确目标坐标更新目标模板,更新岭回归参数。Step 3, template update, update the target template with the precise target coordinates, and update the ridge regression parameters. 2.根据权利要求1所述的方法,其特征在于:所述步骤1中当前帧图像与目标模板图像的循环卷积矩阵为,2. method according to claim 1, is characterized in that: the circular convolution matrix of current frame image and target template image in described step 1 is, 设目标模板图像为z,当前帧图像为img,上式中||img||为img的范数,||z||为z的范数,FFT和IFFT分别代表图像的二维快速傅里叶变换与反变换,为FFT(z)的共轭,σ为高斯核方法的标准差;Let the target template image be z, the current frame image be img, where ||img|| is the norm of img, ||z|| is the norm of z, FFT and IFFT represent the two-dimensional fast Fourier of the image respectively Leaf transformation and inverse transformation, is the conjugate of FFT(z), and σ is the standard deviation of the Gaussian kernel method; 所述目标响应矩阵为,The target response matrix is, R=IFFT(FFT(K)·FFT(γ))R=IFFT(FFT(K)·FFT(γ)) 上式中γ为岭回归参数矩阵,R即为目标响应矩阵,其中最高峰的位置即为粗略目标坐标,表示为[xt,yt]。In the above formula, γ is the ridge regression parameter matrix, R is the target response matrix, and the position of the highest peak is the rough target coordinate, which is expressed as [x t , y t ]. 3.根据权利要求2所述的方法,其特征在于:所述步骤2.1中晃动参数的预测方法为,3. method according to claim 2, is characterized in that: the prediction method of shaking parameter in described step 2.1 is, 上式中θ=[α,β,ε]为晃动参数,α为上下晃动的参数,β为左右晃动的参数,ε是镜头缩放参数,Ic即为当前帧图像,Ip为上一帧图像,Z(Ic,ε)是将当前帧以参数ε缩放后的图像;In the above formula, θ=[α, β, ε] is the shaking parameter, α is the parameter of shaking up and down, β is the parameter of shaking left and right, ε is the zoom parameter of the lens, Ic is the current frame image, Ip is the previous frame image, Z(Ic, ε) is the image after scaling the current frame with the parameter ε; 前后帧图像的差分图为,The difference map of the front and rear frame images is, 上式中D是差分图。In the above formula, D is the difference map. 4.根据权利要求3所述的方法,其特征在于:所述步骤2.2中运动检测输出坐标为,4. The method according to claim 3, characterized in that: in the step 2.2, the motion detection output coordinates are, 设目标大小为[sizex,sizey],上式中xmd为运动目标的x坐标位置,ymd为运动目标的y坐标位置,D(i,j)是差分图在坐标[i,j]处的值;Let the target size be [size x , size y ], where x md is the x-coordinate position of the moving target, y md is the y-coordinate position of the moving target, and D(i, j) is the difference map at coordinates [i, j ] at the value; 上式中Dsum是整个差分图窗口的权重之和。In the above formula, D sum is the sum of the weights of the entire difference map window. 5.根据权利要求4所述的方法,其特征在于:所述步骤2.3中精确目标坐标为,5. method according to claim 4 is characterized in that: in described step 2.3, precise target coordinates are, 上式中ρ是权重系数,[xfinal,yfinal]即为精确的模板坐标。In the above formula, ρ is the weight coefficient, and [x final , y final ] is the precise template coordinate. 6.根据权利要求5所述的方法,其特征在于:所述步骤3中更新后的目标模板为,6. method according to claim 5, is characterized in that: the target template after updating in described step 3 is, 上式中为更新后的目标模板,δ为权重系数,更新后的岭回归参数为,In the above formula is the updated target template, δ is the weight coefficient, and the updated ridge regression parameters are, γ=(K+λI)-1Sγ=(K+λI) -1 S 上式中γ为更新后的岭回归参数,I为与K大小一样的单位矩阵,I与正则化系数λ配合起到正则化作用,S为标准响应矩阵。In the above formula, γ is the updated ridge regression parameter, I is the unit matrix of the same size as K, I cooperates with the regularization coefficient λ to play a regularizing role, and S is the standard response matrix.
CN201910219613.7A 2019-03-21 2019-03-21 A Single Target Fast Tracking and Localization Method Adapting to Large-Scale Deformation Active CN109978908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910219613.7A CN109978908B (en) 2019-03-21 2019-03-21 A Single Target Fast Tracking and Localization Method Adapting to Large-Scale Deformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910219613.7A CN109978908B (en) 2019-03-21 2019-03-21 A Single Target Fast Tracking and Localization Method Adapting to Large-Scale Deformation

Publications (2)

Publication Number Publication Date
CN109978908A true CN109978908A (en) 2019-07-05
CN109978908B CN109978908B (en) 2023-04-28

Family

ID=67080039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910219613.7A Active CN109978908B (en) 2019-03-21 2019-03-21 A Single Target Fast Tracking and Localization Method Adapting to Large-Scale Deformation

Country Status (1)

Country Link
CN (1) CN109978908B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555405A (en) * 2019-08-30 2019-12-10 北京迈格威科技有限公司 Target tracking method and device, storage medium and electronic equipment
CN110660090A (en) * 2019-09-29 2020-01-07 Oppo广东移动通信有限公司 Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN115631359A (en) * 2022-11-17 2023-01-20 诡谷子人工智能科技(深圳)有限公司 Image data processing method and device for machine vision recognition

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056158A (en) * 2016-06-03 2016-10-26 西安电子科技大学 Template image global searching method based on mask matrix and fast Fourier transform
US20180053294A1 (en) * 2016-08-19 2018-02-22 Sony Corporation Video processing system and method for deformation insensitive tracking of objects in a sequence of image frames
CN108230367A (en) * 2017-12-21 2018-06-29 西安电子科技大学 A kind of quick method for tracking and positioning to set objective in greyscale video
CN108876816A (en) * 2018-05-31 2018-11-23 西安电子科技大学 Method for tracking target based on adaptive targets response
CN108961308A (en) * 2018-06-01 2018-12-07 南京信息工程大学 A kind of residual error depth characteristic method for tracking target of drift detection

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056158A (en) * 2016-06-03 2016-10-26 西安电子科技大学 Template image global searching method based on mask matrix and fast Fourier transform
US20180053294A1 (en) * 2016-08-19 2018-02-22 Sony Corporation Video processing system and method for deformation insensitive tracking of objects in a sequence of image frames
CN108230367A (en) * 2017-12-21 2018-06-29 西安电子科技大学 A kind of quick method for tracking and positioning to set objective in greyscale video
CN108876816A (en) * 2018-05-31 2018-11-23 西安电子科技大学 Method for tracking target based on adaptive targets response
CN108961308A (en) * 2018-06-01 2018-12-07 南京信息工程大学 A kind of residual error depth characteristic method for tracking target of drift detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
库涛等: "尺度目标的频域核回归跟踪研究", 《空军工程大学学报(自然科学版)》 *
曲巨宝等: "运动图像快速跟踪技术研究", 《重庆师范大学学报(自然科学版)》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555405A (en) * 2019-08-30 2019-12-10 北京迈格威科技有限公司 Target tracking method and device, storage medium and electronic equipment
CN110555405B (en) * 2019-08-30 2022-05-06 北京迈格威科技有限公司 Target tracking method and device, storage medium and electronic equipment
CN110660090A (en) * 2019-09-29 2020-01-07 Oppo广东移动通信有限公司 Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN110660090B (en) * 2019-09-29 2022-10-25 Oppo广东移动通信有限公司 Subject detection method and apparatus, electronic device, and computer-readable storage medium
US11538175B2 (en) 2019-09-29 2022-12-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for detecting subject, electronic device, and computer readable storage medium
CN115631359A (en) * 2022-11-17 2023-01-20 诡谷子人工智能科技(深圳)有限公司 Image data processing method and device for machine vision recognition

Also Published As

Publication number Publication date
CN109978908B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN103325112B (en) Moving target method for quick in dynamic scene
CN110796010B (en) A Video Stabilization Method Combining Optical Flow and Kalman Filter
WO2020253618A1 (en) Video jitter detection method and device
CN111311666A (en) Monocular vision odometer method integrating edge features and deep learning
CN110956661B (en) Method for calculating dynamic pose of visible light and infrared camera based on bidirectional homography matrix
CN106683121A (en) Robust object tracking method in fusion detection process
CN107452015B (en) A Target Tracking System with Redetection Mechanism
CN110827321B (en) Multi-camera collaborative active target tracking method based on three-dimensional information
CN106886748B (en) TLD-based variable-scale target tracking method applicable to unmanned aerial vehicle
CN108230367A (en) A kind of quick method for tracking and positioning to set objective in greyscale video
CN105894443B (en) A kind of real-time video joining method based on improved SURF algorithm
CN112836640A (en) A single-camera multi-target pedestrian tracking method
US20220222849A1 (en) Pose Tracking Method, Pose Tracking Device and Electronic Device
CN101383899A (en) A hovering video image stabilization method for space-based platforms
CN101316368A (en) Panoramic Image Stabilization Method Based on Global Feature Point Iteration
CN109559330A (en) Visual tracking method, device, electronic equipment and the storage medium of moving target
CN105279771B (en) A kind of moving target detecting method based on the modeling of online dynamic background in video
TWI639136B (en) Real-time video stitching method
CN106845410B (en) Flame identification method based on deep learning model
CN109978908B (en) A Single Target Fast Tracking and Localization Method Adapting to Large-Scale Deformation
CN111429485B (en) Cross-modal filter tracking method based on adaptive regularization and high confidence update
CN113971684B (en) Real-time robust target tracking method based on KCF and SURF features
CN111998862A (en) Dense binocular SLAM method based on BNN
CN114143459B (en) A video de-shaking method suitable for large zoom cameras
Chui et al. Event-based feature tracking in continuous time with sliding window optimization

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
GR01 Patent grant
GR01 Patent grant