[go: up one dir, main page]

CN102831617A - Method and system for detecting and tracking moving object - Google Patents

Method and system for detecting and tracking moving object Download PDF

Info

Publication number
CN102831617A
CN102831617A CN2012102469467A CN201210246946A CN102831617A CN 102831617 A CN102831617 A CN 102831617A CN 2012102469467 A CN2012102469467 A CN 2012102469467A CN 201210246946 A CN201210246946 A CN 201210246946A CN 102831617 A CN102831617 A CN 102831617A
Authority
CN
China
Prior art keywords
image
target
tracked
area
pyramid
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
CN2012102469467A
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.)
Liaocheng University
Original Assignee
Liaocheng 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 Liaocheng University filed Critical Liaocheng University
Priority to CN2012102469467A priority Critical patent/CN102831617A/en
Publication of CN102831617A publication Critical patent/CN102831617A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a moving target detecting and tracking method based on a DSP (digital signal processor), and a system for realizing the method. The method comprises the following steps of: firstly, establishing a background model by using a method that an interframe difference is combined with a background difference aiming at a Y-component of an image; subsequently detecting a foreground moving target; establishing an initial target template; carrying out pyramid downsampling for two times on the target template and a video image to be tracked respectively so as to reduce resolution of the target template and the video image to be tracked. A particle group optimization algorithm is adopted on a top layer of a pyramid to position a tracked target; a diamond search method is adopted on a middle layer and a bottom layer of the pyramid to position the tracked target; and the target template is updated constantly along with change of the moving target during a process that the target is tracked, thereby realizing real-time continuous tracking to the target.

Description

一种运动目标检测与跟踪的方法和系统A method and system for moving target detection and tracking

技术领域 technical field

本发明属于图像处理与计算机视觉领域,涉及DSP技术,特别涉及金子塔多分辨率算法、粒子群优化算法和钻石搜索算法的运动目标检测与跟踪的方法和系统。 The invention belongs to the field of image processing and computer vision, relates to DSP technology, in particular to a method and a system for detecting and tracking a moving target of a pyramid multi-resolution algorithm, a particle swarm optimization algorithm and a diamond search algorithm.

背景技术 Background technique

运动目标的检测与跟踪技术是计算机视觉的重要分支,是当前智能图像处理和视频处理的热点问题,有着广阔的应用前景和长远的经济价值。在军事方面,运动目标检测与跟踪技术可用于对空中或者地面监视范围内的运动目标的检测与跟踪;在社会生活方面,运动目标检测与跟踪技术可用于各种单位的实时监控,及时发现险情,预测可能出现的危险;在医学方面,运动目标的检测与跟踪技术可以使医生更好的诊断病情,解除病人痛苦。 The detection and tracking technology of moving objects is an important branch of computer vision, and it is a hot issue in intelligent image processing and video processing at present. It has broad application prospects and long-term economic value. In terms of military affairs, moving target detection and tracking technology can be used to detect and track moving targets in the air or ground surveillance range; in terms of social life, moving target detection and tracking technology can be used for real-time monitoring of various units to detect danger in time , to predict possible dangers; in medicine, the detection and tracking technology of moving objects can enable doctors to better diagnose the disease and relieve the pain of patients.

运动目标检测技术是指通过图像序列间的运算,找出图像中运动目标所在区域,为之后运动目标的匹配与跟踪做准备。常用的运动目标检测方法主要有:背景差分法、帧间差分法和光流法。但是背景差分法无法适应实际环境中光线的变化;帧间差分法下分割出来的运动区域内常有空洞;光流法的计算量庞大,算法复杂无法满足实时跟踪的要求。 The moving target detection technology refers to finding out the area where the moving target is located in the image through the operation between the image sequences, and preparing for the matching and tracking of the moving target. Commonly used moving target detection methods mainly include: background difference method, frame difference method and optical flow method. However, the background difference method cannot adapt to the changes in light in the actual environment; the motion area segmented by the frame difference method often has holes; the calculation amount of the optical flow method is huge, and the algorithm is complex and cannot meet the requirements of real-time tracking.

运动目标跟踪技术是指分析检测获取的运动目标,将不同帧内的同一运动目标关联起来,得到其运动轨迹。常用的运动目标跟踪方法有:基于模板的跟踪、基于特征的跟踪、基于目标区域的跟踪和基于目标轮廓的跟踪。但是基于模板的跟踪计算量很大;基于特征的跟踪很难确定目标的特征;基于目标区域的跟踪当目标被遮挡或者变形时容易跟丢目标;基于目标轮廓的跟踪很难实时跟踪速度快或者形变大的目标。 The moving object tracking technology refers to analyzing and detecting the obtained moving object, associating the same moving object in different frames to obtain its moving track. Commonly used moving target tracking methods are: template-based tracking, feature-based tracking, target area-based tracking and target contour-based tracking. But template-based tracking has a lot of calculations; feature-based tracking is difficult to determine the characteristics of the target; target area-based tracking is easy to lose the target when the target is occluded or deformed; tracking based on the target outline is difficult to track quickly or quickly in real time. Large-scale targets.

粒子群优化算法是Kennedy博士和Eberhart博士通过对鸟群觅食行为的研究,提出的一种求解复杂问题的优化方法,在求解问题的最优解时,每个粒子通过当前自身的最优解(个体极值                                                

Figure 2012102469467100002DEST_PATH_IMAGE001
)和整个粒子群的最优解(全局极值)来更新自己的速度
Figure 2012102469467100002DEST_PATH_IMAGE003
和位置
Figure 880121DEST_PATH_IMAGE001
,进而通过适应度评价函数计算对应的适应值,进而比较适应值选择出整体最优解,依据下式更新下一代的速度和位置,不断迭代从而寻找到系统的最优解。 The particle swarm optimization algorithm is an optimization method for solving complex problems proposed by Dr. Kennedy and Dr. Eberhart through the research on the foraging behavior of birds. When solving the optimal solution of the problem, each particle passes through its own optimal solution. (individual extremum
Figure 2012102469467100002DEST_PATH_IMAGE001
) and the optimal solution of the entire particle swarm (global extremum ) to update their speed
Figure 2012102469467100002DEST_PATH_IMAGE003
and location
Figure 880121DEST_PATH_IMAGE001
, and then calculate the corresponding fitness value through the fitness evaluation function, and then compare the fitness value to select the overall optimal solution, update the speed and position of the next generation according to the following formula, and continuously iterate to find the optimal solution of the system.

                             

Figure DEST_PATH_IMAGE005
                                 
Figure DEST_PATH_IMAGE005
                                 

其中,

Figure 280808DEST_PATH_IMAGE006
为惯性权重,为粒子的速度,
Figure DEST_PATH_IMAGE007
为学习因子,其取值为
Figure 693783DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE009
Figure 8964DEST_PATH_IMAGE010
是(0,1)之间的随机数,
Figure 559026DEST_PATH_IMAGE001
代表个体极值,
Figure 20094DEST_PATH_IMAGE002
代表全局极值。粒子在空间中不断学习个体极值和全局极值的经验更新粒子速度和位置直到寻找到最优解。 in,
Figure 280808DEST_PATH_IMAGE006
is the inertia weight, is the velocity of the particle,
Figure DEST_PATH_IMAGE007
is the learning factor, and its value is
Figure 693783DEST_PATH_IMAGE008
,
Figure DEST_PATH_IMAGE009
and
Figure 8964DEST_PATH_IMAGE010
is a random number between (0,1),
Figure 559026DEST_PATH_IMAGE001
represents the individual extremum,
Figure 20094DEST_PATH_IMAGE002
represents the global extremum. The particle continuously learns the experience of the individual extremum and the global extremum in the space to update the particle velocity and position until the optimal solution is found.

钻石搜索法是指充分利用运动矢量的中心偏执思想,通过搜索窗口中心位置附近的点找到目标模块与待搜索区域的最佳匹配区域。在使用该方法搜索最佳匹配区域时,选择小的搜索模板可能陷入局部最优,而选择大的搜索模板可能无法找到最佳匹配区域,因此该方法采用两种形状大小的钻石模板进行匹配搜索。其搜索过程如下:首先从搜索窗口的中心开始,反复使用大钻石模板进行搜索。如果最佳匹配点出现在模块的边沿,那么以该点为中心,继续以大钻石模板进行搜索;如果最佳匹配点出现在模板的中心,那么换用小钻石模板进行搜索周围的四个点,找出最佳匹配点,最后结束搜索。在搜索过程中,如果本步需要搜索的点在上一步中已经搜索过了,那么就不再考虑这些点了。如果模板中有些点超出了搜索窗口的范围,那么也不再考虑这些点。虽然钻石搜索法没有限定搜索的次数,但是由于运动矢量的中心偏置,会很快搜索到最佳匹配区域。 The diamond search method refers to making full use of the central paranoid idea of the motion vector to find the best matching area between the target module and the area to be searched by searching for points near the center of the window. When using this method to search for the best matching area, choosing a small search template may fall into a local optimum, and choosing a large search template may not find the best matching area, so this method uses diamond templates of two shapes and sizes for matching search . The search process is as follows: First, start from the center of the search window, and repeatedly use the big diamond template to search. If the best matching point appears on the edge of the module, then use this point as the center to continue searching with the large diamond template; if the best matching point appears in the center of the template, then use the small diamond template to search for the surrounding four points , to find the best matching point, and finally end the search. During the search process, if the points that need to be searched in this step have been searched in the previous step, then these points are no longer considered. If some points in the template are beyond the scope of the search window, then these points are no longer considered. Although the diamond search method does not limit the number of searches, but due to the center offset of the motion vector, the best matching area will be searched quickly.

目前需要提出更加有效的运动目标检测与跟踪方法。 At present, more effective moving target detection and tracking methods need to be proposed.

发明内容 Contents of the invention

为克服上述已有技术问题的不足,本发明提出一种实时的基于DSP的运动目标的检测与跟踪方法以及实现这种方法的图像处理系统,从而实现运动目标的实时检测与跟踪。 In order to overcome the shortcomings of the above-mentioned existing technical problems, the present invention proposes a real-time DSP-based moving target detection and tracking method and an image processing system for realizing the method, thereby realizing real-time detection and tracking of moving targets.

本发明提供的基于DSP的运动目标检测与跟踪系统,包含视频采集模块、视频处理模块以及显示模块;所述视频采集模块通过一路CCD摄像头采集视频信号,将采集的模拟视频信号传输到SEED VPM642视频处理模块,在VPM642中通过高性能视频解码器TVP5150将模拟视频信号转换成BT.656格式的视频信号,并将该信号传输给DSP的视频接口;DSP的视频接口结合EDMA通道将视频信号传送到SDRAM的缓存区中,通过DM642处理完数据后,由视频编码器SAA7121H将数据转换成模拟信号传送给显示模块的显示器,通过显示器显示前景运动目标。 The DSP-based moving target detection and tracking system provided by the present invention includes a video acquisition module, a video processing module and a display module; the video acquisition module collects video signals through a CCD camera, and transmits the collected analog video signals to SEED VPM642 video The processing module converts the analog video signal into a video signal in BT.656 format through the high-performance video decoder TVP5150 in VPM642, and transmits the signal to the video interface of DSP; the video interface of DSP combines the EDMA channel to transmit the video signal to In the buffer area of SDRAM, after the data is processed by DM642, the video encoder SAA7121H converts the data into an analog signal and sends it to the display of the display module, and displays the foreground moving target through the display.

本发明还提供了一种改进的针对采集到的图像中Y分量的背景建模方法,包括如下步骤: The present invention also provides an improved background modeling method for the Y component in the collected image, comprising the following steps:

步骤1:首先输入一帧图像,判断帧数是否大于3,当帧数大于3的时候对输入图像的Y分量进行连续三帧差分,并将差分后的图像进行二值化;假设输入的三帧图像分别为

Figure DEST_PATH_IMAGE011
,其差分图像分别记为
Figure 33678DEST_PATH_IMAGE012
,其中
Figure DEST_PATH_IMAGE013
,其三帧差分图像记为
Figure 822774DEST_PATH_IMAGE014
,此处&代表逻辑与运算; Step 1: First input a frame of image, determine whether the number of frames is greater than 3, and when the number of frames is greater than 3, perform three consecutive frames of difference on the Y component of the input image, and binarize the image after the difference; assuming that the input of three The frame images are
Figure DEST_PATH_IMAGE011
, and their difference images are denoted as
Figure 33678DEST_PATH_IMAGE012
,in
Figure DEST_PATH_IMAGE013
, and its three-frame differential image is denoted as
Figure 822774DEST_PATH_IMAGE014
, where & stands for logical AND operation;

步骤2:将

Figure DEST_PATH_IMAGE015
进行二值化处理,生成二值化图像
Figure 111279DEST_PATH_IMAGE016
; Step 2: Put
Figure DEST_PATH_IMAGE015
Perform binarization processing to generate a binarized image
Figure 111279DEST_PATH_IMAGE016
;

步骤3:将二值化图像

Figure 879384DEST_PATH_IMAGE016
分割为
Figure DEST_PATH_IMAGE017
的模块,记为
Figure 778332DEST_PATH_IMAGE018
; Step 3: Binarize the image
Figure 879384DEST_PATH_IMAGE016
divided into
Figure DEST_PATH_IMAGE017
module, denoted as
Figure 778332DEST_PATH_IMAGE018
;

步骤4:将每一块

Figure 694205DEST_PATH_IMAGE018
进行形态学连通区域检测和滤波,去除噪声;如果该区域内0的个数超过整体像素数的85%,则此块图像的背景稳定,进行步骤5;否则,进行步骤6; Step 4: Put each piece
Figure 694205DEST_PATH_IMAGE018
Perform morphological connected region detection and filtering to remove noise; if the number of 0s in this region exceeds 85% of the overall number of pixels, then the background of this block image is stable, and proceed to step 5; otherwise, proceed to step 6;

步骤5:生成该块图像的背景图像模型; Step 5: generate a background image model of the block image;

步骤6:判断生成的背景模块的数量是否大于整体模块数量的90%,如果大于90%,则背景模型初始化结束,生成背景图像模型

Figure DEST_PATH_IMAGE019
,否则,进行步骤1。 Step 6: Determine whether the number of generated background modules is greater than 90% of the total number of modules. If it is greater than 90%, the initialization of the background model is completed and the background image model is generated.
Figure DEST_PATH_IMAGE019
, otherwise, go to step 1.

本发明提供的基于DSP的运动目标检测与跟踪方法,包括以下步骤: The DSP-based moving target detection and tracking method that the present invention provides comprises the following steps:

A、针对图像的Y分量通过帧间差分和背景差分相结合的方法检测出前景运动目标; A. For the Y component of the image, the foreground moving target is detected by a method combining inter-frame difference and background difference;

B、通过前景运动目标建立目标模板同时确定下一帧待跟踪的区域; B. Establish a target template through the foreground moving target and determine the area to be tracked in the next frame;

C、对目标模板和待跟踪区域进行金字塔采样; C. Pyramid sampling the target template and the area to be tracked;

D、通过粒子群优化算法和钻石搜索算法跟踪运动目标; D. Track moving targets through particle swarm optimization algorithm and diamond search algorithm;

E、不断更新目标模板实现运动目标的实时跟踪。 E. Constantly update the target template to achieve real-time tracking of moving targets.

前面所述的运动目标检测与跟踪方法,优选的方案在于,所述步骤A具体步骤如下: The preferred solution of the aforementioned moving target detection and tracking method is that the specific steps of the step A are as follows:

A1、针对图像的Y分量通过帧间差分和背景差分建模的方法建立背景模型; A1, for the Y component of the image, the background model is established by the method of inter-frame difference and background difference modeling;

A2、将当前帧图像的Y分量与背景图像的Y分量相减,得到图像Y分量的差值图像; A2, subtracting the Y component of the current frame image from the Y component of the background image to obtain a difference image of the Y component of the image;

A3、对由A2得到的Y分量的差值图像进行二值化处理; A3, performing binarization processing on the difference image of the Y component obtained by A2;

A4、对A3得到的Y分量的二值化图像进行连通区域检测和滤波,去除噪声; A4, the binarized image of the Y component that A3 obtains carries out connected region detection and filtering, removes noise;

A5、将A4得到的Y分量的二值化图像分别向x轴和y轴投影,根据设定的阈值寻找出前景运动目标。 A5. Project the binarized image of the Y component obtained in A4 to the x-axis and the y-axis respectively, and find out the foreground moving target according to the set threshold.

前面所述的运动目标检测与跟踪方法,优选的方案在于,所述步骤B具体步骤如下:将当前帧图像的Y分量中以运动目标的形心作为中心,选取

Figure 333871DEST_PATH_IMAGE020
的区域作为目标模板,在下一帧图像的Y分量中以上一帧图像测得的运动目标的形心为中心,选取
Figure DEST_PATH_IMAGE021
的区域作为待跟踪区域。 The aforementioned moving target detection and tracking method, the preferred solution is that the specific steps of the step B are as follows: take the centroid of the moving target as the center in the Y component of the current frame image, and select
Figure 333871DEST_PATH_IMAGE020
The region of the image is used as the target template, and in the Y component of the next frame image, the centroid of the moving target measured in the previous frame image is taken as the center, and the
Figure DEST_PATH_IMAGE021
area as the area to be tracked.

前面所述的运动目标检测与跟踪方法,优选的方案在于,所述步骤C具体步骤如下: The preferred solution of the aforementioned moving target detection and tracking method is that the specific steps of step C are as follows:

C1、对目标模板进行降采样处理,得到目标模板的中间层金字塔图像;然后对目标模板的中间层金字塔进行降采样处理,得到目标模板的顶层金字塔; C1, carry out down-sampling processing to target template, obtain the middle layer pyramid image of target template; Then carry out down-sampling processing to the middle layer pyramid of target template, obtain the top layer pyramid of target template;

C2、对待跟踪区域进行降采样处理,得到待跟踪区域的中间层金字塔,然后对待跟踪区域的中间层金字塔进行降采样处理,得到待跟踪区域的顶层金字塔。 C2. Perform down-sampling processing on the area to be tracked to obtain a middle-level pyramid of the area to be tracked, and then perform down-sampling processing on the middle-level pyramid of the area to be tracked to obtain a top-level pyramid of the area to be tracked.

前面所述的运动目标检测与跟踪方法,优选的方案在于,所述步骤D具体步骤如下: The preferred solution of the aforementioned moving target detection and tracking method is that the specific steps of the step D are as follows:

D1、对目标模板和待跟踪区域的顶层金字塔进行匹配运算,在搜索的过程中结合PSO算法,通过粒子间的相互作用得到待跟踪区域顶层金字塔中运动目标的位置,本发明中使用的相关匹配函数是最小平均绝对差值函数(MAD),运用此函数可以有效地减少运算量; D1, carry out matching operation to target template and the top pyramid of area to be tracked, combine PSO algorithm in the process of searching, obtain the position of moving target in the top pyramid of area to be tracked by the interaction between particles, correlation matching used in the present invention The function is the minimum mean absolute difference function (MAD), using this function can effectively reduce the amount of calculation;

D2、根据D1得到的匹配区域像素位置,在待跟踪区域的中间层图像中,进行搜索匹配,所搜的区域为D1匹配定位的位置附近,搜索的过程中使用的搜索方法是钻石搜索法; D2, according to the pixel position of the matching area obtained by D1, search and match in the middle layer image of the area to be tracked, the searched area is near the position where D1 is matched and positioned, and the search method used in the search process is the diamond search method;

D3、根据D2确定的位置,在待跟踪区域的原始层图像中进行搜索匹配,搜索的过程中使用的方法是钻石搜索法,经过这一步,搜索到这一帧中运动目标的位置; D3, according to the position determined by D2, search and match in the original layer image of the area to be tracked, the method used in the search process is the diamond search method, through this step, search for the position of the moving target in this frame;

D4、根据D3确定的位置,在该帧图像上标记出目标位置,同时标记出下一帧的搜索范围。 D4. According to the position determined in D3, mark the target position on the image frame, and mark the search range of the next frame at the same time.

前面所述的运动目标检测与跟踪方法,优选的方案在于,所述步骤E具体步骤如下: The preferred solution of the aforementioned moving target detection and tracking method is that the specific steps of the step E are as follows:

E1、根据D4确定的位置,更新目标模板和下一帧图像中待跟踪区域的范围; E1, according to the position determined by D4, update the scope of the target template and the area to be tracked in the next frame image;

E2、判断跟踪是否结束,如果没有结束,则回到B1进行下一帧的跟踪。 E2, judging whether the tracking is over, if not, returning to B1 to track the next frame.

本发明提供的运动目标检测与跟踪方法,该方法包括:采集视频图像序列,将图像序列的Y分量通过帧间差分和帧间差分结合的方法,建立Y分量下的背景图像;将当前帧图像的Y分量和背景图像的Y分量进行背景差分,得到当前帧图像Y分量的差值图像;接着对得到的图像Y分量进行二值化,然后对其进行连通区域检测和滤波,去除噪声,接着将图像分别向x轴和y轴投影,根据设定的阈值寻找出前景运动目标。 The method for detecting and tracking a moving target provided by the present invention includes: collecting a video image sequence, and combining the Y component of the image sequence with inter-frame difference and inter-frame difference to establish a background image under the Y component; background difference between the Y component of the background image and the Y component of the background image to obtain the difference image of the Y component of the current frame image; then binarize the Y component of the obtained image, and then perform connected region detection and filtering on it to remove noise, and then Project the image to the x-axis and y-axis respectively, and find out the foreground moving target according to the set threshold.

本发明提供的运动目标检测与跟踪方法,该方法包括:将寻找到的前景运动目标的形心作为中心,选取

Figure 582581DEST_PATH_IMAGE020
的区域作为目标模板,在下一帧图像的Y分量中以上一帧图像测得的运动目标的形心为中心,选取的区域作为待跟踪区域。 The moving object detection and tracking method provided by the present invention includes: taking the centroid of the foreground moving object found as the center, and selecting
Figure 582581DEST_PATH_IMAGE020
The area of the image is used as the target template, and in the Y component of the next frame image, the centroid of the moving target measured in the previous frame image is the center, and the area as the area to be tracked.

接着对目标模板和待跟踪区域进行金字塔采样,具体步骤如下:对目标模板进行降采样处理,得到目标模板的中间层金字塔图像;然后对目标模板的中间层金字塔进行降采样处理,得到目标模板的顶层金字塔;对待跟踪区域进行降采样处理,得到待跟踪区域的中间层金字塔,然后对待跟踪区域的中间层金字塔进行降采样处理,得到待跟踪区域的顶层金字塔。 Then carry out pyramid sampling on the target template and the area to be tracked, and the specific steps are as follows: down-sampling the target template to obtain the pyramid image of the middle layer of the target template; then down-sampling the middle layer pyramid of the target template to obtain the Top-level pyramid: perform down-sampling processing on the area to be tracked to obtain the middle-level pyramid of the area to be tracked, and then perform down-sampling processing on the middle-level pyramid of the area to be tracked to obtain the top-level pyramid of the area to be tracked.

对目标模板和待跟踪区域的顶层金字塔进行匹配运算,在搜索的过程中结合PSO算法,通过粒子间的相互作用得到待跟踪区域顶层金字塔中运动目标的位置。运用PSO算法可以优化搜索过程,在待跟踪区域中有效的寻找到目标模板的最佳匹配区域。 The matching operation is performed on the target template and the top pyramid of the area to be tracked, and the PSO algorithm is combined in the search process to obtain the position of the moving target in the top pyramid of the area to be tracked through the interaction between particles. Using the PSO algorithm can optimize the search process, and effectively find the best matching area of the target template in the area to be tracked.

Figure 122125DEST_PATH_IMAGE005
Figure 122125DEST_PATH_IMAGE005

其中,

Figure 412292DEST_PATH_IMAGE006
为惯性权重,
Figure 980939DEST_PATH_IMAGE003
为粒子的速度,为学习因子,其取值为
Figure 649610DEST_PATH_IMAGE008
Figure 246814DEST_PATH_IMAGE009
Figure 32367DEST_PATH_IMAGE010
是(0,1)之间的随机数,
Figure 583696DEST_PATH_IMAGE001
代表个体极值,
Figure 994955DEST_PATH_IMAGE002
代表全局极值。粒子在空间中不断学习个体极值和全局极值的经验更新粒子速度和位置。知道寻找到最优解。在顶层金子塔匹配中,粒子的搜索区域就是待搜索区域,在粒子搜过的过程中给他定义的粒子的速度为粒子的位移和方向,用
Figure 945200DEST_PATH_IMAGE022
表示,其中
Figure DEST_PATH_IMAGE023
 表示行的位移大小和方向,表示列的位移大小和方向。本发明中使用的适应度评价函数是最小平均绝对差值函数(MAD),根据适应度评价函数更新个体极值和群体极值,通过该方法可以有效快速的在待跟踪区域的顶层金字塔中寻找到运动目标。 in,
Figure 412292DEST_PATH_IMAGE006
is the inertia weight,
Figure 980939DEST_PATH_IMAGE003
is the velocity of the particle, is the learning factor, and its value is
Figure 649610DEST_PATH_IMAGE008
,
Figure 246814DEST_PATH_IMAGE009
and
Figure 32367DEST_PATH_IMAGE010
is a random number between (0,1),
Figure 583696DEST_PATH_IMAGE001
represents the individual extremum,
Figure 994955DEST_PATH_IMAGE002
represents the global extremum. Particles continuously learn the experience of individual extremum and global extremum in space to update particle velocity and position. know to find the optimal solution. In the top-level pyramid matching, the search area of the particle is the area to be searched, and the velocity of the particle defined for it during the search process of the particle is the displacement and direction of the particle.
Figure 945200DEST_PATH_IMAGE022
said, among them
Figure DEST_PATH_IMAGE023
Indicates the displacement magnitude and direction of the row, Indicates the displacement magnitude and direction of the column. The fitness evaluation function used in the present invention is the minimum mean absolute difference function (MAD), and the individual extremum and the group extremum are updated according to the fitness evaluation function. Through this method, the top pyramid of the area to be tracked can be effectively and quickly searched for to exercise goals.

根据得到的匹配区域像素位置,在待跟踪区域的中间层图像中,进行搜索匹配,所搜的区域顶层匹配定位的位置附近,搜索的过程中使用的搜索方法是钻石搜索法;接着在待跟踪区域的原始层图像中进行搜索匹配,搜索的过程中使用的方法是钻石搜索法,经过这一步,搜索到这一帧中运动目标的位置;在该帧图像上标记出目标位置,同时标记出下一帧的搜索范围。 According to the pixel position of the matching area obtained, search and match are carried out in the middle layer image of the area to be tracked, and the top layer of the searched area is located near the matching location. The search method used in the search process is the diamond search method; Search and match in the original layer image of the area. The method used in the search process is the diamond search method. After this step, the position of the moving target in this frame is searched; the target position is marked on the frame image, and at the same time the The search range for the next frame.

根据标记出的目标位置,更新目标模板和下一帧图像中待跟踪区域的范围,接着判断跟踪是否结束,如果没有结束,则开始下一帧的跟踪。 According to the marked target position, update the target template and the scope of the area to be tracked in the next frame image, and then judge whether the tracking is over, if not, start the tracking of the next frame.

本发明采用基于模板的跟踪方法,为了降低计算的复杂度,提出了基于金子塔多分辨率结合粒子群优化算法和钻石搜索算法的模板匹配方法。金字塔多分辨率就是指通过减少图像的像素个数缩小图像,在此基础上将缩小后的目标模板与目标搜索区域进行匹配搜索,如果缩小一次后,搜索的计算量仍然很大,则进行第二次图像缩小,图像缩小的次数根据目标模板图像和待搜索区域图像的大小而定。如果将缩小的图像按照分辨率的高低上下排列,就组成一个金字塔结构,在此金字塔中,越是位于上层的图像的分辨率越低,图像的像素数就越少。 The invention adopts a template-based tracking method, and in order to reduce the complexity of calculation, proposes a template matching method based on pyramid multi-resolution combined with particle swarm optimization algorithm and diamond search algorithm. Pyramid multi-resolution refers to shrinking the image by reducing the number of pixels in the image, and then matching and searching the reduced target template with the target search area. Secondary image reduction, the number of image reductions depends on the size of the target template image and the image of the region to be searched. If the reduced images are arranged up and down according to the resolution, a pyramid structure is formed. In this pyramid, the lower the resolution of the image at the upper layer, the fewer the number of pixels of the image.

本发明提供的方法首先针对图像的Y分量使用帧间差分和背景差分结合的方法建立背景模型,然后检测出前景运动目标;接着通过前景运动目标建立初始目标模板,再对目标模板和待跟踪视频图像分别进行两次金字塔降采样,降低目标模板和待跟踪视频图像的分辨率。在顶层金子塔上采用粒子群优化算法对跟踪目标进行定位,在中间层和底层金字塔上采用钻石搜索的方法对跟踪目标进行定位。在目标跟踪的过程中目标模板随运动目标的变化而不断更新,实现对目标的实时连续跟踪。 The method provided by the present invention first establishes a background model for the Y component of the image using the method of combining inter-frame difference and background difference, and then detects the foreground moving target; The image is subjected to pyramid downsampling twice to reduce the resolution of the target template and the video image to be tracked. The particle swarm optimization algorithm is used to locate the tracking target on the top pyramid, and the diamond search method is used to locate the tracking target on the middle and bottom pyramids. In the process of target tracking, the target template is continuously updated with the change of the moving target, realizing real-time continuous tracking of the target.

与现有技术相比较,本发明的技术优势还体现在: Compared with the prior art, the technical advantages of the present invention are also reflected in:

1、本发明提出的改进的针对输入图像中Y分量的背景建模方法通过9帧就可以在图像的Y分量上建立背景模型,如果采用求取均值后生成背景图像需要30帧才能生成较好的背景模型。 1. The improved background modeling method for the Y component in the input image proposed by the present invention can establish a background model on the Y component of the image through 9 frames. If the background image is generated after calculating the mean value, it needs 30 frames to generate better background mockup.

2、本发明将金子塔多分辨率引入到运动目标的检测与跟踪方法中,有效的降低了目标模板和待跟踪视频图像的分辨率。 2. The present invention introduces pyramid multi-resolution into the detection and tracking method of moving targets, effectively reducing the resolution of target templates and video images to be tracked.

3、本发明首次将粒子群优化算法运用在基于DSP的运动目标检测与跟踪系统中,使用该方法可以在顶层金字塔中快速有效的定位运动目标,在本发明的具体实施中其计算量为普通算法的90%,如果待跟踪区域越大其计算量减少越明显。 3, the present invention uses particle swarm optimization algorithm in the moving target detection and tracking system based on DSP for the first time, uses this method to locate the moving target quickly and effectively in the top pyramid, and its calculation amount is ordinary in the specific implementation of the present invention 90% of the algorithm, if the area to be tracked is larger, the calculation amount will be reduced more obviously.

4、本发明将钻石搜索法运用在基于DSP的运动目标检测与跟踪系统中,使用该方法可以在中间层和底层金字塔中快速定位跟踪目标,在本发明的具体实施中整体计算量为普通模板匹配法的30%,在光照稳定情况下正确率能达到92%。 4. The present invention uses the diamond search method in the DSP-based moving target detection and tracking system. This method can be used to quickly locate and track the target in the middle layer and the bottom pyramid. In the specific implementation of the present invention, the overall calculation amount is a common template 30% of the matching method, the correct rate can reach 92% under stable light conditions.

附图说明 Description of drawings

图1:图像处理系统结构图。 Figure 1: Structural diagram of the image processing system.

图2:初始化背景模型。 Figure 2: Initializing the background model.

图3:运动目标检测与跟踪算法流程图。 Figure 3: Flow chart of moving target detection and tracking algorithm.

具体实施方式 Detailed ways

下面结合实施例和附图详细说明本发明的技术方案,但保护范围不被此限制。 The technical solutions of the present invention will be described in detail below in conjunction with the embodiments and drawings, but the scope of protection is not limited thereto.

实施例  一种实时的基于DSP的运动目标的检测与跟踪方法以及实现这种方法的图像处理系统,从而实现运动目标的实时检测与跟踪。 Embodiments of a real-time DSP-based detection and tracking method for a moving target and an image processing system for realizing the method, thereby realizing real-time detection and tracking of a moving target.

图1为基于DSP的运动目标检测与跟踪系统(图像处理系统)的结构图,如图1所示,图像处理系统包含视频采集模块、视频处理模块以及显示模块三个部分。本发明中通过一路CCD摄像头采集视频信号,将采集的模拟视频信号传输到SEED VPM642视频处理模块,在VPM642中通过高性能视频解码器TVP5150将模拟视频信号转换成BT.656格式的视频信号,并将该信号传输给DSP的视频接口。DSP的视频接口结合EDMA通道将视频信号传送到SDRAM的缓存区中,通过DM642处理完数据后,由视频编码器SAA7121H将数据转换成模拟信号传送给显示器,通过显示器可以看到目标跟踪的效果。 Figure 1 is a structural diagram of a DSP-based moving target detection and tracking system (image processing system). As shown in Figure 1, the image processing system includes three parts: video acquisition module, video processing module and display module. In the present invention, the video signal is collected by a CCD camera, the analog video signal collected is transmitted to the SEED VPM642 video processing module, and the analog video signal is converted into the video signal of the BT.656 format by the high-performance video decoder TVP5150 in the VPM642, and Transmit this signal to the video interface of DSP. The video interface of the DSP combines the EDMA channel to transmit the video signal to the SDRAM buffer area. After the data is processed by the DM642, the video encoder SAA7121H converts the data into an analog signal and sends it to the display. The effect of target tracking can be seen through the display.

本发明提出的基于DSP的运动目标的检测与跟踪系统的工作流程主要包含三个部分:DM642初始化、系统驱动初始化、运动目标的检测与跟踪。DM642初始化主要包含芯片内部存储器接口初始化、外围设备初始化、中断初始化等;系统驱动初始化包含视频编解码器初始化、DM642视频端口初始化、EDMA通道初始化等。在完成系统初始化后,DM642不再干预视频信号的输入输出,系统进入无限循环阶段,在该阶段DM642主要用于实现运动目标的检测与跟踪。 The working process of the DSP-based moving target detection and tracking system proposed by the present invention mainly includes three parts: DM642 initialization, system driver initialization, and moving target detection and tracking. DM642 initialization mainly includes chip internal memory interface initialization, peripheral device initialization, interrupt initialization, etc.; system driver initialization includes video codec initialization, DM642 video port initialization, EDMA channel initialization, etc. After the system initialization is completed, DM642 no longer intervenes in the input and output of video signals, and the system enters an infinite loop stage. In this stage, DM642 is mainly used to realize the detection and tracking of moving targets.

本发明提出一种改进的针对采集到的图像中Y分量的背景建模方法,其算法步骤如图2所示: The present invention proposes an improved background modeling method aimed at the Y component in the collected image, and its algorithm steps are as shown in Figure 2:

步骤1:首先输入一帧图像,判断帧数是否大于3,当帧数大于3的时候对输入图像的Y分量进行连续三帧差分,并将差分后的图像进行二值化。假设输入的三帧图像分别为

Figure 392810DEST_PATH_IMAGE011
,其差分图像分别记为,其中,其三帧差分图像记为
Figure 539867DEST_PATH_IMAGE014
(此处&代表逻辑与运算)。 Step 1: First input a frame of image, determine whether the number of frames is greater than 3, and when the number of frames is greater than 3, perform three consecutive frames of difference on the Y component of the input image, and binarize the image after the difference. Assume that the input three frames of images are
Figure 392810DEST_PATH_IMAGE011
, and their difference images are denoted as ,in , and its three-frame differential image is denoted as
Figure 539867DEST_PATH_IMAGE014
(Here & stands for logical AND operation).

步骤2:将

Figure 377373DEST_PATH_IMAGE015
进行二值化处理,生成二值化图像
Figure 68118DEST_PATH_IMAGE016
。 Step 2: Put
Figure 377373DEST_PATH_IMAGE015
Perform binarization processing to generate a binarized image
Figure 68118DEST_PATH_IMAGE016
.

步骤3:将二值化图像

Figure 792622DEST_PATH_IMAGE016
分割为的模块,记为
Figure 930528DEST_PATH_IMAGE018
。 Step 3: Binarize the image
Figure 792622DEST_PATH_IMAGE016
divided into module, denoted as
Figure 930528DEST_PATH_IMAGE018
.

步骤4:将每一块

Figure 972434DEST_PATH_IMAGE018
进行形态学连通区域检测和滤波,去除噪声。如果该区域内0的个数超过整体像素数的85%,则此块图像的背景稳定转入5 ),否则,转入6 )。 Step 4: Put each piece
Figure 972434DEST_PATH_IMAGE018
Perform morphological connected region detection and filtering to remove noise. If the number of 0 in this area exceeds 85% of the overall pixel number, then the background of this block image is stable and turns to 5), otherwise, turns to 6).

步骤6:生成该块图像的背景图像模型。 Step 6: Generate a background image model of the block image.

步骤7:判断生成的背景模块的数量是否大于整体模块数量的90%,如果大于90%,则背景模型初始化结束,生成背景图像模型

Figure 751778DEST_PATH_IMAGE019
,否则,转入1 )。 Step 7: Determine whether the number of generated background modules is greater than 90% of the total number of modules. If it is greater than 90%, the initialization of the background model is completed and the background image model is generated.
Figure 751778DEST_PATH_IMAGE019
, otherwise, go to 1).

图3为本发明提出的基于DSP的运动目标检测与跟踪方法,该方案包括如下步骤: Fig. 3 is the moving target detection and tracking method based on DSP that the present invention proposes, and this scheme comprises the steps:

步骤A:针对图像的Y分量通过帧间差分和背景差分相结合的方法检测出前景运动目标(通过将当前帧

Figure DEST_PATH_IMAGE025
与背景模型
Figure 361882DEST_PATH_IMAGE019
进行差分得到灰度图像,然后将得到的灰度图像按一定的阈值二值化生成二值化图像,对该图像进行形态学连通区域检测和滤波,去除噪声。即
Figure 908401DEST_PATH_IMAGE026
,其中
Figure DEST_PATH_IMAGE027
为阈值)。 Step A: For the Y component of the image, the foreground moving target is detected by combining the inter-frame difference and the background difference (by combining the current frame
Figure DEST_PATH_IMAGE025
with the background model
Figure 361882DEST_PATH_IMAGE019
The gray-scale image is obtained by difference, and then the obtained gray-scale image is binarized according to a certain threshold to generate a binary image, and the morphological connected region detection and filtering are performed on the image to remove noise. Right now
Figure 908401DEST_PATH_IMAGE026
,in
Figure DEST_PATH_IMAGE027
is the threshold).

将获得的二值化图像分别向x轴和y轴投影,通过灰度直方图方法寻找到前景运动目标。 The obtained binarized image is projected to the x-axis and y-axis respectively, and the foreground moving target is found by the gray histogram method.

概括起来,所述步骤A具体步骤如下: In summary, the specific steps of step A are as follows:

A1、针对图像的Y分量通过帧间差分和背景差分建模的方法建立背景模型; A1, for the Y component of the image, the background model is established by the method of inter-frame difference and background difference modeling;

A2、将当前帧图像的Y分量与背景图像的Y分量相减,得到图像Y分量的差值图像; A2, subtracting the Y component of the current frame image from the Y component of the background image to obtain a difference image of the Y component of the image;

A3、对由A2得到的Y分量的差值图像进行二值化处理; A3, performing binarization processing on the difference image of the Y component obtained by A2;

A4、对A3得到的Y分量的二值化图像进行连通区域检测和滤波,去除噪声; A4, the binarized image of the Y component that A3 obtains carries out connected region detection and filtering, removes noise;

A5、将A4得到的Y分量的二值化图像分别向x轴和y轴投影,根据设定的阈值寻找出前景运动目标。 A5. Project the binarized image of the Y component obtained in A4 to the x-axis and the y-axis respectively, and find out the foreground moving target according to the set threshold.

步骤B:通过前景运动目标建立目标模板同时确定下一帧待跟踪的区域(将寻找到的前景运动目标的形心作为中心,选取的区域作为目标模板,在下一帧图像的Y分量中以上一帧图像测得的运动目标的形心为中心,选取

Figure DEST_PATH_IMAGE029
的区域作为待跟踪区域)。 Step B: Establish a target template through the foreground moving target and determine the area to be tracked in the next frame (taking the centroid of the foreground moving target found as the center, select The region of the image is used as the target template, and in the Y component of the next frame image, the centroid of the moving target measured in the previous frame image is taken as the center, and the
Figure DEST_PATH_IMAGE029
area as the area to be tracked).

概括起来,所述步骤B具体步骤如下:将当前帧图像的Y分量中以运动目标的的形心作为中心,选取的区域作为目标模板,在下一帧图像的Y分量中以上一帧图像测得的运动目标的形心为中心,选取

Figure 582503DEST_PATH_IMAGE021
的区域作为待跟踪区域。 To sum up, the specific steps of step B are as follows: take the centroid of the moving target as the center in the Y component of the current frame image, and select The region of the image is used as the target template, and in the Y component of the next frame image, the centroid of the moving target measured in the previous frame image is taken as the center, and the
Figure 582503DEST_PATH_IMAGE021
area as the area to be tracked.

步骤C:对目标模板和待跟踪区域进行金字塔采样,具体步骤如下: Step C: Pyramid sampling the target template and the area to be tracked, the specific steps are as follows:

对目标模板进行降采样处理,得到目标模板的中间层金字塔图像;然后对目标模板的中间层金字塔进行降采样处理,得到目标模板的顶层金字塔;对待跟踪区域进行降采样处理,得到待跟踪区域的中间层金字塔,然后对待跟踪区域的中间层金字塔进行降采样处理,得到待跟踪区域的顶层金字塔。 Downsampling is performed on the target template to obtain the middle layer pyramid image of the target template; then downsampling is performed on the middle layer pyramid of the target template to obtain the top pyramid of the target template; downsampling is performed on the area to be tracked to obtain the image of the area to be tracked The middle layer pyramid, and then the middle layer pyramid of the area to be tracked is down-sampled to obtain the top layer pyramid of the area to be tracked.

步骤D:通过粒子群优化算法和钻石搜索算法跟踪运动目标(对目标模板和待跟踪区域的顶层金字塔进行匹配运算,在搜索的过程中结合PSO算法,通过粒子间的相互作用得到待跟踪区域顶层金字塔中运动目标的位置。运用PSO算法可以优化搜索过程,在待跟踪区域中有效的寻找到目标模板的最佳匹配区域)。 Step D: track the moving target through the particle swarm optimization algorithm and the diamond search algorithm (matching the target template and the top pyramid of the area to be tracked, combining the PSO algorithm during the search process, and obtaining the top layer of the area to be tracked through the interaction between particles The position of the moving target in the pyramid. Using the PSO algorithm can optimize the search process and effectively find the best matching area of the target template in the area to be tracked).

Figure 865586DEST_PATH_IMAGE004
Figure 865586DEST_PATH_IMAGE004

Figure 872463DEST_PATH_IMAGE005
Figure 872463DEST_PATH_IMAGE005

其中,

Figure 190180DEST_PATH_IMAGE006
为惯性权重,
Figure 266721DEST_PATH_IMAGE003
为粒子的速度,
Figure 538564DEST_PATH_IMAGE007
为学习因子,其取值为
Figure 725963DEST_PATH_IMAGE008
Figure 835870DEST_PATH_IMAGE009
是(0,1)之间的随机数,
Figure 26473DEST_PATH_IMAGE001
代表个体极值,
Figure 17563DEST_PATH_IMAGE002
代表全局极值。粒子在空间中不断学习个体极值和全局极值的经验更新粒子速度和位置。知道寻找到最优解。在顶层金子塔匹配中,粒子的搜索区域就是待搜索区域,在粒子搜过的过程中给他定义的粒子的速度为粒子的位移和方向,用
Figure 545758DEST_PATH_IMAGE022
表示,其中
Figure 964101DEST_PATH_IMAGE023
 表示行的位移大小和方向,表示列的位移大小和方向。本发明中使用的适应度评价函数是最小平均绝对差值函数(MAD),根据适应度评价函数更新个体极值和群体极值,通过该方法可以有效快速的在待跟踪区域的顶层金字塔中寻找到运动目标。 in,
Figure 190180DEST_PATH_IMAGE006
is the inertia weight,
Figure 266721DEST_PATH_IMAGE003
is the velocity of the particle,
Figure 538564DEST_PATH_IMAGE007
is the learning factor, and its value is
Figure 725963DEST_PATH_IMAGE008
,
Figure 835870DEST_PATH_IMAGE009
and is a random number between (0,1),
Figure 26473DEST_PATH_IMAGE001
represents the individual extremum,
Figure 17563DEST_PATH_IMAGE002
represents the global extremum. Particles continuously learn the experience of individual extremum and global extremum in space to update particle velocity and position. know to find the optimal solution. In the top-level pyramid matching, the search area of the particle is the area to be searched, and the velocity of the particle defined for it during the search process of the particle is the displacement and direction of the particle.
Figure 545758DEST_PATH_IMAGE022
said, among them
Figure 964101DEST_PATH_IMAGE023
Indicates the displacement magnitude and direction of the row, Indicates the displacement magnitude and direction of the column. The fitness evaluation function used in the present invention is the minimum mean absolute difference function (MAD), and the individual extremum and the group extremum are updated according to the fitness evaluation function. Through this method, the top pyramid of the area to be tracked can be effectively and quickly searched for to exercise goals.

根据得到的匹配区域像素位置,在待跟踪区域的中间层图像中,进行搜索匹配,所搜的区域顶层匹配定位的位置附近,搜索的过程中使用的搜索方法是钻石搜索法;接着在待跟踪区域的原始层图像中进行搜索匹配,搜索的过程中使用的方法是钻石搜索法,经过这一步,搜索到这一帧中运动目标的位置;在该帧图像上标记出目标位置,同时标记出下一帧的搜索范围。 According to the pixel position of the matching area obtained, search and match are carried out in the middle layer image of the area to be tracked, and the top layer of the searched area is located near the matching location. The search method used in the search process is the diamond search method; Search and match in the original layer image of the area. The method used in the search process is the diamond search method. After this step, the position of the moving target in this frame is searched; the target position is marked on the frame image, and at the same time the The search range for the next frame.

概括的说,所述步骤D具体步骤如下: Generally speaking, the specific steps of the step D are as follows:

D1、对目标模板和待跟踪区域的顶层金字塔进行匹配运算,在搜索的过程中结合PSO算法,通过粒子间的相互作用得到待跟踪区域顶层金字塔中运动目标的位置,本发明中使用的相关匹配函数是最小平均绝对差值函数(MAD),运用此函数可以有效地减少运算量; D1, carry out matching operation to target template and the top pyramid of area to be tracked, combine PSO algorithm in the process of searching, obtain the position of moving target in the top pyramid of area to be tracked by the interaction between particles, correlation matching used in the present invention The function is the minimum mean absolute difference function (MAD), using this function can effectively reduce the amount of calculation;

D2、根据D1得到的匹配区域像素位置,在待跟踪区域的中间层图像中,进行搜索匹配,所搜的区域为D1匹配定位的位置附近,搜索的过程中使用的搜索方法是钻石搜索法; D2, according to the pixel position of the matching area obtained by D1, search and match in the middle layer image of the area to be tracked, the searched area is near the position where D1 is matched and positioned, and the search method used in the search process is the diamond search method;

D3、根据D2确定的位置,在待跟踪区域的原始层图像中进行搜索匹配,搜索的过程中使用的方法是钻石搜索法,经过这一步,搜索到这一帧中运动目标的位置; D3, according to the position determined by D2, search and match in the original layer image of the area to be tracked, the method used in the search process is the diamond search method, through this step, search for the position of the moving target in this frame;

D4、根据D3确定的位置,在该帧图像上标记出目标位置,同时标记出下一帧的搜索范围。 D4. According to the position determined in D3, mark the target position on the image frame, and mark the search range of the next frame at the same time.

步骤:E:不断更新目标模板实现运动目标的实时跟踪(根据标记出的目标位置,更新目标模板和下一帧图像中待跟踪区域的范围,接着判断跟踪是否结束,如果没有结束,则回到第二步进行下一帧的跟踪)。 Step: E: Constantly update the target template to achieve real-time tracking of the moving target (according to the marked target position, update the target template and the range of the area to be tracked in the next frame of image, then judge whether the tracking is over, if not, return to The second step is to track the next frame).

概括的说,所述步骤E具体步骤如下: Generally speaking, the specific steps of the step E are as follows:

E1、根据D4确定的位置,更新目标模板和下一帧图像中待跟踪区域的范围; E1, according to the position determined by D4, update the scope of the target template and the area to be tracked in the next frame image;

E2、判断跟踪是否结束,如果没有结束,则回到B1进行下一帧的跟踪。 E2, judging whether the tracking is over, if not, returning to B1 to track the next frame.

Claims (8)

1. The moving target detection and tracking system based on the DSP is characterized by comprising a video acquisition module, a video processing module and a display module; the video acquisition module acquires video signals through one path of CCD camera, transmits the acquired analog video signals to the SEED VPM642 video processing module, converts the analog video signals into video signals in a BT.656 format through a high-performance video decoder TVP5150 in the VPM642 and transmits the signals to a video interface of the DSP; the video interface of the DSP combines with an EDMA channel to transmit the video signal to a buffer area of SDRAM, after the data is processed by DM642, the data is converted into an analog signal by a video encoder SAA7121H and transmitted to a display of a display module, and the foreground moving object is displayed by the display.
2. An improved background modeling method for a Y component in an acquired image, comprising the steps of:
step 1: firstly, inputting a frame image, judging whether the frame number is greater than 3, carrying out continuous three-frame difference on a Y component of the input image when the frame number is greater than 3, and carrying out binarization on the image after difference; suppose that the input three frames of images are respectively
Figure 868095DEST_PATH_IMAGE001
Their difference images are respectively notedWherein
Figure 338577DEST_PATH_IMAGE003
And the three-frame differential image is recorded as
Figure 321576DEST_PATH_IMAGE004
Here, the&Represents a logical AND operation;
step 2: will be provided withPerforming binarization processing to generate a binarized image
Figure 78628DEST_PATH_IMAGE006
And step 3: will binarize the image
Figure 789839DEST_PATH_IMAGE006
Is divided into
Figure 994555DEST_PATH_IMAGE007
Module of
Figure 114827DEST_PATH_IMAGE008
And 4, step 4: each block is divided into
Figure 409804DEST_PATH_IMAGE008
Performing morphological connected region detection and filtering to remove noise; if the number of 0 in the area exceeds 85 percent of the whole pixel number, the background of the block image is stable, and the step 5 is carried out; otherwise, go to step 6;
and 5: generating a background image model of the block image;
step 6: judging whether the number of the generated background modules is more than 90% of the number of the whole modules, if so, finishing the initialization of the background model, and generating a background image model
Figure 793381DEST_PATH_IMAGE009
Otherwise, performing step 1.
3. A moving target detection and tracking method based on DSP is characterized by comprising the following steps:
A. detecting a foreground moving target by combining interframe difference and background difference aiming at the Y component of the image;
B. establishing a target template through the foreground moving target and simultaneously determining the area to be tracked of the next frame;
C. carrying out pyramid sampling on the target template and the area to be tracked;
D. tracking a moving target by a particle swarm optimization algorithm and a diamond search algorithm;
E. and continuously updating the target template to realize real-time tracking of the moving target.
4. The moving object detecting and tracking method according to claim 3, wherein the step A specifically comprises the following steps:
a1, establishing a background model by an interframe difference and background difference modeling method aiming at the Y component of the image;
a2, subtracting the Y component of the current frame image from the Y component of the background image to obtain a difference image of the Y component of the image;
a3, performing binarization processing on the difference image of the Y component obtained by the A2;
a4, detecting and filtering a connected region of the binary image of the Y component obtained by A3, and removing noise;
and A5, projecting the binary image of the Y component obtained by the A4 to the x axis and the Y axis respectively, and finding out the foreground moving target according to a set threshold value.
5. The moving object detecting and tracking method according to claim 3, wherein the step B comprises the following steps: selecting the Y component of the current frame image by taking the centroid of the moving object as the center
Figure 219814DEST_PATH_IMAGE010
The area of the image is used as a target template, the centroid of the moving target measured by the previous frame of image in the Y component of the next frame of image is taken as the center, and the centroid of the moving target is selected
Figure 907891DEST_PATH_IMAGE011
The area of (2) is used as the area to be tracked.
6. The moving object detecting and tracking method according to claim 3, wherein the step C comprises the following steps:
c1, performing down-sampling processing on the target template to obtain a pyramid image in the middle layer of the target template; then, performing down-sampling processing on the middle pyramid of the target template to obtain a top pyramid of the target template;
and C2, performing down-sampling processing on the region to be tracked to obtain a middle-layer pyramid of the region to be tracked, and then performing down-sampling processing on the middle-layer pyramid of the region to be tracked to obtain a top-layer pyramid of the region to be tracked.
7. The moving object detecting and tracking method according to claim 3, wherein the step D comprises the following specific steps:
d1, matching the target template and the top pyramid of the region to be tracked, and combining a PSO algorithm in the searching process to obtain the position of the moving target in the top pyramid of the region to be tracked through the interaction between particles;
d2, searching and matching in the middle layer image of the region to be tracked according to the pixel position of the matching region obtained by the D1, wherein the searched region is near the position where the D1 is matched and positioned, and the searching method used in the searching process is a diamond searching method;
d3, searching and matching in the original layer image of the area to be tracked according to the position determined by D2, wherein the method used in the searching process is a diamond searching method, and the position of the moving object in the frame is searched through the step;
and D4, marking the target position on the image of the frame according to the position determined by the D3, and marking the search range of the next frame.
8. The moving object detecting and tracking method according to claim 3, wherein the step E comprises the following specific steps:
e1, updating the range of the target template and the area to be tracked in the next frame image according to the position determined by the D4;
e2, judging whether the tracking is finished or not, if not, returning to B1 to track the next frame.
CN2012102469467A 2012-07-17 2012-07-17 Method and system for detecting and tracking moving object Pending CN102831617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102469467A CN102831617A (en) 2012-07-17 2012-07-17 Method and system for detecting and tracking moving object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102469467A CN102831617A (en) 2012-07-17 2012-07-17 Method and system for detecting and tracking moving object

Publications (1)

Publication Number Publication Date
CN102831617A true CN102831617A (en) 2012-12-19

Family

ID=47334732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102469467A Pending CN102831617A (en) 2012-07-17 2012-07-17 Method and system for detecting and tracking moving object

Country Status (1)

Country Link
CN (1) CN102831617A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577812A (en) * 2013-11-22 2014-02-12 昆山视杰维光电科技有限公司 Target recognition system and method
CN105096343A (en) * 2015-08-14 2015-11-25 中国联合网络通信集团有限公司 Method and device for tracking moving target
CN106296725A (en) * 2015-06-12 2017-01-04 富泰华工业(深圳)有限公司 Moving target detects and tracking and object detecting device in real time
CN106875420A (en) * 2016-12-29 2017-06-20 北京理工雷科电子信息技术有限公司 A kind of aerial moving-target sequence image emulation mode based on remote sensing platform
CN106997598A (en) * 2017-01-06 2017-08-01 陕西科技大学 The moving target detecting method merged based on RPCA with three-frame difference
CN107295296A (en) * 2016-04-01 2017-10-24 中国科学院上海高等研究院 A kind of selectively storage and restoration methods and system of monitor video
CN107356975A (en) * 2017-07-12 2017-11-17 电子科技大学 Underwater two-dimension space active electric-field localization method based on particle swarm optimization algorithm
CN107767396A (en) * 2017-11-10 2018-03-06 广东工业大学 Motion target tracking method, system, equipment and storage medium
CN108564787A (en) * 2018-05-31 2018-09-21 北京理工大学 Traffic observation procedure, system and equipment based on Floating Car method
CN108596129A (en) * 2018-04-28 2018-09-28 武汉盛信鸿通科技有限公司 A kind of vehicle based on intelligent video analysis technology gets over line detecting method
CN108900847A (en) * 2018-06-11 2018-11-27 阿依瓦(北京)技术有限公司 A kind of long-range prediction method based on Block- matching
CN109034136A (en) * 2018-09-06 2018-12-18 湖北亿咖通科技有限公司 Image processing method, device, picture pick-up device and storage medium
CN109146918A (en) * 2018-06-11 2019-01-04 西安电子科技大学 A kind of adaptive related objective localization method based on piecemeal
CN109658437A (en) * 2018-11-01 2019-04-19 深圳神目信息技术有限公司 A kind of method and device of quick detection moving object
CN109685827A (en) * 2018-11-30 2019-04-26 南京理工大学 A kind of object detecting and tracking method based on DSP
CN110133641A (en) * 2019-04-19 2019-08-16 电子科技大学 A Scale-Adaptive Target Tracking Method for Through-Wall Imaging Radar
CN110610514A (en) * 2018-06-15 2019-12-24 株式会社日立制作所 Method, device and electronic equipment for realizing multi-target tracking
CN111294594A (en) * 2020-02-26 2020-06-16 浙江大华技术股份有限公司 Security inspection method, device, system and storage medium
CN111476065A (en) * 2019-01-23 2020-07-31 北京奇虎科技有限公司 Target tracking method and device, computer equipment and storage medium
CN111612819A (en) * 2020-05-15 2020-09-01 安徽工程大学 Moving target tracking method and system based on absolute error sum of image pyramid
CN112352137A (en) * 2018-05-25 2021-02-09 艾美创有限公司 Motion encoder

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060291695A1 (en) * 2005-06-24 2006-12-28 Objectvideo, Inc. Target detection and tracking from overhead video streams
CN101355692A (en) * 2008-07-30 2009-01-28 浙江大学 An intelligent monitoring device for real-time tracking of moving target area
CN101540892A (en) * 2009-04-23 2009-09-23 上海中安电子信息科技有限公司 Method for people counting in doorway on DSP video gathering device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060291695A1 (en) * 2005-06-24 2006-12-28 Objectvideo, Inc. Target detection and tracking from overhead video streams
CN101355692A (en) * 2008-07-30 2009-01-28 浙江大学 An intelligent monitoring device for real-time tracking of moving target area
CN101540892A (en) * 2009-04-23 2009-09-23 上海中安电子信息科技有限公司 Method for people counting in doorway on DSP video gathering device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘静: "固定场景下的运动目标检测算法与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
葛广英: "基于神经网络的智能交通信息管理系统研究", 《电视技术》 *

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577812A (en) * 2013-11-22 2014-02-12 昆山视杰维光电科技有限公司 Target recognition system and method
CN106296725A (en) * 2015-06-12 2017-01-04 富泰华工业(深圳)有限公司 Moving target detects and tracking and object detecting device in real time
TWI670684B (en) * 2015-06-12 2019-09-01 鴻海精密工業股份有限公司 A method for detecting and tracing a moving target and a target detection device
CN105096343B (en) * 2015-08-14 2018-10-30 中国联合网络通信集团有限公司 A kind of method for tracking moving target and device
CN105096343A (en) * 2015-08-14 2015-11-25 中国联合网络通信集团有限公司 Method and device for tracking moving target
CN107295296A (en) * 2016-04-01 2017-10-24 中国科学院上海高等研究院 A kind of selectively storage and restoration methods and system of monitor video
CN107295296B (en) * 2016-04-01 2020-04-14 中国科学院上海高等研究院 Method and system for selective storage and recovery of surveillance video
CN106875420A (en) * 2016-12-29 2017-06-20 北京理工雷科电子信息技术有限公司 A kind of aerial moving-target sequence image emulation mode based on remote sensing platform
CN106875420B (en) * 2016-12-29 2019-08-23 北京理工雷科电子信息技术有限公司 A kind of aerial moving-target sequence image emulation mode based on remote sensing platform
CN106997598A (en) * 2017-01-06 2017-08-01 陕西科技大学 The moving target detecting method merged based on RPCA with three-frame difference
CN107356975B (en) * 2017-07-12 2019-08-13 电子科技大学 Underwater two-dimension space active electric-field localization method based on particle swarm optimization algorithm
CN107356975A (en) * 2017-07-12 2017-11-17 电子科技大学 Underwater two-dimension space active electric-field localization method based on particle swarm optimization algorithm
CN107767396A (en) * 2017-11-10 2018-03-06 广东工业大学 Motion target tracking method, system, equipment and storage medium
CN108596129A (en) * 2018-04-28 2018-09-28 武汉盛信鸿通科技有限公司 A kind of vehicle based on intelligent video analysis technology gets over line detecting method
CN108596129B (en) * 2018-04-28 2022-05-06 武汉盛信鸿通科技有限公司 Vehicle line-crossing detection method based on intelligent video analysis technology
US11885650B2 (en) 2018-05-25 2024-01-30 Imetrum Ltd. Motion encoder
CN112352137B (en) * 2018-05-25 2023-03-14 艾美创有限公司 Motion encoder
CN112352137A (en) * 2018-05-25 2021-02-09 艾美创有限公司 Motion encoder
CN108564787A (en) * 2018-05-31 2018-09-21 北京理工大学 Traffic observation procedure, system and equipment based on Floating Car method
CN108900847A (en) * 2018-06-11 2018-11-27 阿依瓦(北京)技术有限公司 A kind of long-range prediction method based on Block- matching
CN109146918A (en) * 2018-06-11 2019-01-04 西安电子科技大学 A kind of adaptive related objective localization method based on piecemeal
CN110610514A (en) * 2018-06-15 2019-12-24 株式会社日立制作所 Method, device and electronic equipment for realizing multi-target tracking
CN110610514B (en) * 2018-06-15 2023-09-19 株式会社日立制作所 Method, device and electronic equipment for realizing multi-target tracking
CN109034136A (en) * 2018-09-06 2018-12-18 湖北亿咖通科技有限公司 Image processing method, device, picture pick-up device and storage medium
CN109658437A (en) * 2018-11-01 2019-04-19 深圳神目信息技术有限公司 A kind of method and device of quick detection moving object
CN109685827B (en) * 2018-11-30 2022-09-06 南京理工大学 Target detection and tracking method based on DSP
CN109685827A (en) * 2018-11-30 2019-04-26 南京理工大学 A kind of object detecting and tracking method based on DSP
CN111476065A (en) * 2019-01-23 2020-07-31 北京奇虎科技有限公司 Target tracking method and device, computer equipment and storage medium
CN110133641A (en) * 2019-04-19 2019-08-16 电子科技大学 A Scale-Adaptive Target Tracking Method for Through-Wall Imaging Radar
CN110133641B (en) * 2019-04-19 2023-04-25 电子科技大学 A Scale-Adaptive Target Tracking Method for Through-Wall Imaging Radar
CN111294594B (en) * 2020-02-26 2022-06-03 浙江华视智检科技有限公司 Security inspection method, device, system and storage medium
CN111294594A (en) * 2020-02-26 2020-06-16 浙江大华技术股份有限公司 Security inspection method, device, system and storage medium
CN111612819A (en) * 2020-05-15 2020-09-01 安徽工程大学 Moving target tracking method and system based on absolute error sum of image pyramid

Similar Documents

Publication Publication Date Title
CN102831617A (en) Method and system for detecting and tracking moving object
CN104463146B (en) Posture identification method and device based on near-infrared TOF camera depth information
WO2020042419A1 (en) Gait-based identity recognition method and apparatus, and electronic device
CN103941866B (en) Three-dimensional gesture recognizing method based on Kinect depth image
CN106296725B (en) Moving target real-time detection and tracking method and target detection device
CN101477631B (en) Method, device and human-computer interaction system for extracting target from image
CN107705322A (en) Motion estimate tracking and system
CN109758756B (en) Gymnastics video analysis method and system based on 3D camera
CN109766796B (en) Deep pedestrian detection method for dense crowd
CN101587591B (en) Vision Accurate Tracking Method Based on Two-parameter Threshold Segmentation
CN106127137A (en) A kind of target detection recognizer based on 3D trajectory analysis
CN108399361A (en) A kind of pedestrian detection method based on convolutional neural networks CNN and semantic segmentation
CN110321937B (en) Motion human body tracking method combining fast-RCNN with Kalman filtering
CN111104960B (en) A Sign Language Recognition Method Based on Millimeter-Wave Radar and Machine Vision
CN102497505A (en) Multi-ball machine linkage target tracking method and system based on improved Meanshift algorithm
CN101571917A (en) Front side gait cycle detecting method based on video
CN111860651B (en) Monocular vision-based semi-dense map construction method for mobile robot
WO2024093209A1 (en) Method for dynamic target tracking by legged robot
CN107610086A (en) Industrial parallel robot rapid visual detection algorithm based on bionic compound eye structure
CN114639117A (en) A method and device for cross-border specific pedestrian tracking
CN106650628A (en) Fingertip detection method based on three-dimensional K curvature
CN110794956A (en) A Kinect-based Gesture Tracking and Precise Fingertip Positioning System
CN114332942A (en) Night infrared pedestrian detection method and system based on improved YOLOv3
CN112560620B (en) Target tracking method and system based on target detection and feature fusion
CN114170686A (en) Elbow bending behavior detection method based on human body key points

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

Application publication date: 20121219