[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105469429B - Method for tracking target and device - Google Patents

Method for tracking target and device Download PDF

Info

Publication number
CN105469429B
CN105469429B CN201510847575.1A CN201510847575A CN105469429B CN 105469429 B CN105469429 B CN 105469429B CN 201510847575 A CN201510847575 A CN 201510847575A CN 105469429 B CN105469429 B CN 105469429B
Authority
CN
China
Prior art keywords
target
hyperedge
length
frame
hyperedges
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.)
Active
Application number
CN201510847575.1A
Other languages
Chinese (zh)
Other versions
CN105469429A (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CN201510847575.1A priority Critical patent/CN105469429B/en
Publication of CN105469429A publication Critical patent/CN105469429A/en
Application granted granted Critical
Publication of CN105469429B publication Critical patent/CN105469429B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • G06T2207/10044Radar image

Landscapes

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

Abstract

本发明提供一种目标跟踪方法和装置。该方法包括:获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n‑1时的位移范围;根据各目标节点所在的帧在管制视频中的位置及各目标节点在帧间间隔分别为1,2,…,n‑1时的位移范围,对n帧图像中的各目标节点进行关联,得到当前目标跟踪轨迹;在管制视频连续n帧图像中,采用相同的标记显示当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;其中n为大于3的预设帧数。本发明实施例提供的目标跟踪方法和装置,通过实现航空器目标在管制视频中的关联,将一条轨迹上的目标节点采用相同的标记显示,使得管制视频中的图像清晰明了,便于识别。

The invention provides a target tracking method and device. The method comprises: obtaining the displacement ranges of the target nodes in consecutive n frames of images in the control video when the inter-frame intervals are respectively 1, 2, ..., n-1; according to the positions and The displacement range of each target node when the inter-frame interval is 1, 2, ..., n-1, correlate each target node in n frames of images, and obtain the current target tracking trajectory; in the control video continuous n frames of images, Use the same marker to display the corresponding target nodes on the same target tracking track in the current target tracking track; where n is a preset frame number greater than 3. The target tracking method and device provided by the embodiments of the present invention realize the association of aircraft targets in the control video, and display the target nodes on a trajectory with the same mark, so that the images in the control video are clear and easy to identify.

Description

目标跟踪方法和装置Target tracking method and device

技术领域technical field

本发明涉及跟踪技术,尤其涉及一种目标跟踪方法和装置。The present invention relates to tracking technology, in particular to a target tracking method and device.

背景技术Background technique

随着航空技术的发展,航空设备的数量与速度都大幅增加。空中交通管制则是保证飞行安全的重要技术手段。目前的空中交通管制系统,主要依靠地面的空中交通管制员协调和指导空域或机场内不同航空器的航行路线和飞航模式,以防止航空器在地面或者空中发生意外,确保空中交通无阻和航空器的有序飞行,达至最大效率。With the development of aviation technology, the number and speed of aviation equipment have increased significantly. Air traffic control is an important technical means to ensure flight safety. The current air traffic control system mainly relies on the air traffic controllers on the ground to coordinate and guide the flight routes and flight modes of different aircraft in the airspace or airport, so as to prevent accidents on the ground or in the air, and ensure unimpeded air traffic and safe operation of aircraft. Sequential flight for maximum efficiency.

管制员在进行空中交通管制时,主要依赖雷达管制机提供的图像信息,雷达管制图像复杂混乱,各个标识框重叠现象严重,而管制员只能通过不停的操作标识框排除干扰,凭肉眼靠经验做出相应的处理,工作繁重,容易产生视觉疲劳导致无法及时对突发情况做出快速反应,而且雷达管制视频中的航空器目标众多,也对管制员操作造成极大的干扰从而容易产生重大安全隐患。When conducting air traffic control, the controller mainly relies on the image information provided by the radar control aircraft. The radar control image is complex and chaotic, and the overlapping phenomenon of each marking frame is serious. The controller can only eliminate interference by continuously operating the marking frame. According to experience, the work is heavy, and it is easy to cause visual fatigue, which makes it impossible to respond quickly to emergencies. Moreover, there are many aircraft targets in the radar control video, which also causes great interference to the controller's operation and is prone to major problems. Security risks.

发明内容Contents of the invention

本发明提供一种目标跟踪方法和装置,用以解决现有管制视频中图像混乱复杂,干扰较大的问题。The invention provides a target tracking method and device, which are used to solve the problems of chaotic and complex images and large interference in existing control videos.

本发明实施例一方面提供一种目标跟踪方法,包括:On the one hand, an embodiment of the present invention provides a target tracking method, including:

获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;Obtain the displacement range of the target node in the consecutive n frames of images in the control video when the inter-frame intervals are 1, 2, ..., n-1;

根据各所述目标节点所在的帧在所述管制视频中的位置及各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对所述n帧图像中的各所述目标节点进行关联,得到当前目标跟踪轨迹;According to the position of the frame where each of the target nodes is located in the control video and the displacement range of each of the target nodes when the inter-frame intervals are 1, 2, ..., n-1, for the n frames of images Each of the target nodes is associated to obtain the current target tracking trajectory;

在所述管制视频连续n帧图像中,采用相同的标记显示所述当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;In the continuous n-frame images of the control video, the same mark is used to display the corresponding target nodes on the same target tracking track in the current target tracking track;

其中n为大于3的预设帧数。Where n is a preset frame number greater than 3.

本发明实施例另一方面提供一种目标跟踪装置,包括:Another aspect of the embodiment of the present invention provides a target tracking device, including:

位移范围获取模块,用于获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;The displacement range acquisition module is used to obtain the displacement range of the target nodes in the continuous n-frame images in the control video when the inter-frame intervals are 1, 2, ..., n-1;

跟踪轨迹获取模块,用于根据各所述目标节点所在的帧在所述管制视频中的位置及各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对所述n帧图像中的各所述目标节点进行关联,得到当前目标跟踪轨迹;The tracking trajectory acquisition module is used for according to the position of the frame where each target node is located in the control video and the displacement range of each target node when the inter-frame interval is 1, 2, ..., n-1, Associating each of the target nodes in the n frames of images to obtain the current target tracking trajectory;

标记模块,用于在所述管制视频连续n帧图像中,采用相同的标记显示所述当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;A marking module, configured to use the same mark to display the corresponding target nodes on the same target tracking track in the current target tracking track in the continuous n-frame images of the control video;

其中n为大于3的预设帧数。Where n is a preset frame number greater than 3.

本发明实施例提供的目标跟踪方法和装置,通过获取管制视频中各目标节点的位移范围,将符合位移范围的目标节点进行超边生长,获得目标跟踪轨迹,实现航空器目标在管制视频中的关联,通过将一条轨迹上的目标节点采用相同的标记显示,使得管制视频中的图像清晰明了,为管制员提供了视觉辅助信息,降低了视频中众多目标及标识框对管制员的干扰,降低了管制员劳动强度,为管制员识别与操作提供便利。The target tracking method and device provided by the embodiments of the present invention obtain the displacement range of each target node in the control video, and perform hyperedge growth on the target nodes that meet the displacement range, obtain the target tracking trajectory, and realize the association of aircraft targets in the control video , by displaying the target nodes on a trajectory with the same mark, the image in the control video is clear and clear, providing visual aid information for the controller, reducing the interference of many targets and logo frames in the video to the controller, and reducing the The controller's labor intensity provides convenience for the controller's identification and operation.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.

图1为本发明目标跟踪方法实施例一的流程图;FIG. 1 is a flow chart of Embodiment 1 of the object tracking method of the present invention;

图2为本发明目标跟踪方法实施例二的流程图;FIG. 2 is a flow chart of Embodiment 2 of the target tracking method of the present invention;

图3为本发明目标跟踪方法中位移范围获取方法实施例一的流程图;FIG. 3 is a flow chart of Embodiment 1 of the displacement range acquisition method in the target tracking method of the present invention;

图4为本发明目标跟踪方法中位移范围获取方法实施例一的流程图;FIG. 4 is a flow chart of Embodiment 1 of the displacement range acquisition method in the target tracking method of the present invention;

图5为本发明目标跟踪方法中位移范围获取方法实施例二的流程图;FIG. 5 is a flow chart of Embodiment 2 of the displacement range acquisition method in the target tracking method of the present invention;

图6为本发明目标跟踪装置实施例一的示意图。FIG. 6 is a schematic diagram of Embodiment 1 of the object tracking device of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例提供一种目标跟踪方法,针对现有雷达管制机提供的管制视频中图像复杂混乱,对管制视频中的航空器目标进行区分、关联,实现管制视频中的航空器目标的轨迹追踪,使得管制视频中的图像清晰明了,便于管制员识别与操作。对于管制视频中的多个航空器目标,随着航空器目标在连续的多帧图像内移动,形成目标移动轨迹,但是未经标示区分的多个轨迹在显示时较为混乱复杂。因此,可将各航空器目标在每帧图像内的成像作为一个目标节点,通过判断各帧内的多个目标节点相互之间的距离关系,将同一目标在不同帧的目标节点进行关联,实现目标的轨迹跟踪,并对不同目标的轨迹进行区分。下面采用具体的实施例,对目标跟踪方法进行详细说明。The embodiment of the present invention provides a target tracking method, aiming at the complex and chaotic images in the control video provided by the existing radar control aircraft, distinguishing and associating the aircraft targets in the control video, and realizing the trajectory tracking of the aircraft targets in the control video, so that The image in the control video is clear and clear, which is easy for the controller to identify and operate. For multiple aircraft targets in the control video, as the aircraft targets move in continuous multi-frame images, the target movement trajectory is formed, but the multiple trajectories that are not marked and distinguished are displayed in confusion and complexity. Therefore, the imaging of each aircraft target in each frame of image can be regarded as a target node, and by judging the distance relationship between multiple target nodes in each frame, the target nodes of the same target in different frames can be associated to achieve the goal Trajectory tracking, and distinguish the trajectories of different targets. The following uses specific embodiments to describe the target tracking method in detail.

图1为本发明目标跟踪方法实施例一的流程图,本实施例的执行主体为目标跟踪装置,该目标跟踪装置可以通过硬件和/或软件实现。如图1所示,本实施例的方法可以包括:FIG. 1 is a flow chart of Embodiment 1 of the object tracking method of the present invention. The execution subject of this embodiment is an object tracking device, which can be implemented by hardware and/or software. As shown in Figure 1, the method of this embodiment may include:

步骤101、获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;Step 101, obtaining the displacement ranges of the target nodes in consecutive n frames of images in the regulated video when the inter-frame intervals are 1, 2, ..., n-1;

步骤102、根据各目标节点所在的帧在管制视频中的位置及各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对n帧图像中的各目标节点进行关联,得到当前目标跟踪轨迹;Step 102, according to the position of the frame where each target node is located in the control video and the displacement range of each target node when the inter-frame interval is respectively 1, 2, ..., n-1, carry out each target node in the n frame image Associated to get the current target tracking trajectory;

步骤103、在管制视频连续n帧图像中,采用相同的标记显示当前目标跟踪轨迹中同一条节点跟踪轨迹上对应的目标节点;Step 103, using the same marker to display the corresponding target node on the same node tracking track in the current target tracking track in the consecutive n frames of the control video;

其中n为大于3的预设帧数。Where n is a preset frame number greater than 3.

具体的,在管制视频中选取连续的n帧图像,两相邻帧的帧间间隔为1,获取该连续的n帧图像中的所有目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,目标节点的位移范围表示了前帧图像中的目标节点在后帧图像中的可能的位置范围,帧间间隔越大对应的位移范围则越大,在获取位移范围时,示例性的可根据各目标节点在帧内的坐标位置估算。其中n为大于3的预设帧数。Specifically, select n consecutive frames of images in the control video, the frame interval between two adjacent frames is 1, and the intervals between frames of all target nodes in the continuous n frames of images are 1, 2, ..., n The displacement range when -1, the displacement range of the target node indicates the possible position range of the target node in the previous frame image in the subsequent frame image, the larger the inter-frame interval, the larger the corresponding displacement range, when obtaining the displacement range , for example, can be estimated according to the coordinate position of each target node in the frame. Where n is a preset frame number greater than 3.

在步骤102中,在获取到连续n帧图像内的所有目标节点的位移范围后,依据位移范围,在后一帧中寻找与前一帧中目标节点相对应的目标节点,将连续n帧图像中的对应的目标节点关联起来,作为目标节点在连续n帧图像中的移动轨迹,完成超边生长,得到目标跟踪轨迹。一条目标跟踪轨迹代表一个航行器目标在连续n帧图像内的移动轨迹。In step 102, after obtaining the displacement ranges of all target nodes in the continuous n frames of images, according to the displacement ranges, the target nodes corresponding to the target nodes in the previous frame are searched in the next frame, and the continuous n frames of images are The corresponding target nodes in are associated as the moving track of the target node in consecutive n frames of images, and the hyperedge growth is completed to obtain the target tracking track. A target tracking track represents the moving track of an aircraft target in consecutive n frames of images.

在完成目标轨迹跟踪后,采用相同的标记显示当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点。具体的,可以采用不同的颜色对不同的目标进行区分,也可采用不同的标记大小或形状对不同的目标进行区分。通过多次重复上述的方法,对管制视频中所有的图像完成目标追踪,得到整个管制视频的目标跟踪轨迹。After the target trajectory tracking is completed, the corresponding target nodes on the same target tracking track in the current target tracking track are displayed with the same mark. Specifically, different colors can be used to distinguish different targets, and different marker sizes or shapes can also be used to distinguish different targets. By repeating the above method for many times, the target tracking is completed for all the images in the control video, and the target tracking trajectory of the entire control video is obtained.

本发明实施例提供的目标跟踪方法,通过获取管制视频中各目标节点的位移范围,将符合位移范围的目标节点进行超边生长,获得目标跟踪轨迹,实现航空器目标在管制视频中的关联,通过将一条轨迹上的目标节点采用相同的标记显示,使得管制视频中的图像清晰明了,为管制员提供了视觉辅助信息,降低了视频中众多目标及标识框对管制员的干扰,降低了管制员劳动强度,为管制员识别与操作提供便利。The target tracking method provided by the embodiment of the present invention obtains the displacement range of each target node in the control video, and performs hyperedge growth on the target nodes conforming to the displacement range, obtains the target tracking trajectory, and realizes the association of the aircraft target in the control video. The target nodes on a trajectory are displayed with the same mark, which makes the image in the control video clear and clear, provides visual aid information for the controller, reduces the interference of many targets and logo boxes in the video to the controller, and reduces the risk of the controller Labor intensity, providing convenience for the controller to identify and operate.

下面采用几个具体的实施例,对图1所示目标跟踪方法实施例的技术方案进行详细说明。The technical solution of the embodiment of the target tracking method shown in FIG. 1 will be described in detail below using several specific embodiments.

在图1所示实施例的基础上,在得到管制视频中连续n帧图像的当前跟踪轨迹时,还可与已经得到的管制视频中已经得到的连续n帧图像的当前跟踪轨迹数据相结合,以简化计算过程并提高跟踪结果的准确性。On the basis of the embodiment shown in Figure 1, when obtaining the current tracking trajectory of continuous n-frame images in the control video, it can also be combined with the current tracking trajectory data of the continuous n-frame images that have been obtained in the control video, To simplify the calculation process and improve the accuracy of tracking results.

如图2所示,图2为本发明目标跟踪方法实施例二的流程图。该方法包括:As shown in FIG. 2 , FIG. 2 is a flow chart of Embodiment 2 of the object tracking method of the present invention. The method includes:

步骤201、确定存在初始目标跟踪轨迹;Step 201, determine that there is an initial target tracking track;

步骤202、获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;Step 202, obtaining the displacement ranges of the target nodes in consecutive n frames of images in the controlled video when the inter-frame intervals are 1, 2, ..., n-1;

步骤203、根据各目标节点所在的帧在管制视频中的位置及各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对n帧图像中的各目标节点进行关联,得到当前目标跟踪轨迹;Step 203, according to the position of the frame where each target node is located in the control video and the displacement range of each target node when the inter-frame interval is respectively 1, 2, ..., n-1, carry out a process for each target node in n frames of images Associated to get the current target tracking trajectory;

步骤204、将当前目标跟踪轨迹与初始目标跟踪轨迹进行超边融合,得到融合轨迹,并将融合轨迹作为新的初始目标跟踪轨迹;Step 204, performing hyperedge fusion on the current target tracking trajectory and the initial target tracking trajectory to obtain the fusion trajectory, and using the fusion trajectory as a new initial target tracking trajectory;

步骤205、在管制视频的连续n帧图像中,采用相同的标记显示新的初始目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点。Step 205 , in the n consecutive frames of the surveillance video, use the same marker to display the corresponding target nodes on the same target tracking track in the new initial target tracking track.

本实施例在图1所示实施例的基础上,先确定存在初始目标跟踪轨迹;当存在初始目标跟踪轨迹时,可在执行步骤203之后,即在得到当前目标跟踪轨迹时,将当前目标跟踪轨迹与初始目标跟踪轨迹进行超边融合,得到融合轨迹,并将融合轨迹作为新的初始目标跟踪轨迹,以供下次计算管制视频中新的连续n帧图像的轨迹时使用。具体的,初始目标跟踪轨迹为上一次执行本实施例时得到的目标跟踪轨迹。In this embodiment, on the basis of the embodiment shown in FIG. 1 , it is first determined that there is an initial target tracking track; The trajectory and the initial target tracking trajectory are hyperedge-fused to obtain the fusion trajectory, and the fusion trajectory is used as a new initial target tracking trajectory for the next calculation of the trajectory of the new continuous n-frame images in the control video. Specifically, the initial target tracking trajectory is the target tracking trajectory obtained when this embodiment was executed last time.

可选的,步骤204具体包括:Optionally, step 204 specifically includes:

对于当前目标跟踪轨迹中的任一当前目标跟踪轨迹与初始目标跟踪轨迹中的任一初始目标跟踪轨迹中,若确定任一当前目标跟踪轨迹与任一初始目标跟踪轨迹在相同帧内的目标相同,则对任一当前目标跟踪轨迹与任一初始目标跟踪轨迹进行融合处理,得到融合轨迹。For any current target tracking track in the current target tracking track and any initial target tracking track in the initial target tracking track, if it is determined that any current target tracking track and any initial target tracking track have the same target in the same frame , then perform fusion processing on any current target tracking trajectory and any initial target tracking trajectory to obtain the fusion trajectory.

下面详细说明该融合方法:The fusion method is described in detail below:

对于当前目标跟踪轨迹中的任一当前目标跟踪轨迹与初始目标跟踪轨迹中的任一初始目标跟踪轨迹中,若确定任一当前目标跟踪轨迹与任一初始目标跟踪轨迹在相同帧内的目标节点相同,则对任一当前目标跟踪轨迹与任一初始目标跟踪轨迹进行融合处理,得到融合轨迹。For any current target tracking track in the current target tracking track and any initial target tracking track in the initial target tracking track, if it is determined that any current target tracking track and any initial target tracking track are in the same frame target node If they are the same, fusion processing is performed on any current target tracking trajectory and any initial target tracking trajectory to obtain a fusion trajectory.

具体的,首先确定是否存在初始目标跟踪轨迹,若否,则执行步骤101至103得到当前目标跟踪轨迹,可选择多次执行步骤101至103得到管制视频的目标跟踪轨迹;也可将当前目标跟踪轨迹作为下次执行步骤101至103时的初始目标跟踪轨迹,然后按照本实施例所提出的方法生成管制视频的目标跟踪轨迹。Specifically, first determine whether there is an initial target tracking track, if not, then perform steps 101 to 103 to obtain the current target tracking track, and can choose to execute steps 101 to 103 multiple times to obtain the target tracking track of the control video; The trajectory is used as the initial target tracking trajectory when steps 101 to 103 are executed next time, and then the target tracking trajectory of the control video is generated according to the method proposed in this embodiment.

若确定存在初始目标跟踪轨迹,则表明在步骤201之前已经根据管制视频中的连续n帧图像获取过目标跟踪轨迹,可假设该初始目标跟踪轨迹对应的连续n帧图像记为第1至n帧。执行步骤202至203,得到当前连续n帧图像的当前目标跟踪轨迹,可假设该当前目标跟踪轨迹对应的连续n帧图像为第c至n+c帧。对于当前目标跟踪轨迹与初始目标跟踪轨迹,由于两个连续n帧图像间存在n-c帧的重叠帧,因而可在当前目标跟踪轨迹和初始目标跟踪轨迹中各取一条轨迹,确定这两条轨迹在相同帧内的目标节点相同后,将这两条轨迹融合扩展,形成一条更长的轨迹。示例性的,c可以为任意小于n的正整数。If it is determined that there is an initial target tracking track, it means that the target tracking track has been obtained according to the continuous n frames of images in the control video before step 201, and it can be assumed that the continuous n frames of images corresponding to the initial target tracking track are recorded as the first to n frames . Steps 202 to 203 are executed to obtain the current target tracking track of the current n consecutive frames of images, and it can be assumed that the n consecutive frames of images corresponding to the current target tracking track are the cth to n+c frames. For the current target tracking trajectory and the initial target tracking trajectory, since there are n-c frames of overlapping frames between two consecutive n-frame images, one trajectory can be taken from each of the current target tracking trajectory and the initial target tracking trajectory, and the two trajectories can be determined at After the target nodes in the same frame are the same, the two trajectories are fused and expanded to form a longer trajectory. Exemplarily, c may be any positive integer smaller than n.

本实施例中,对于管制视频中的连续图像,首先为连续的n帧图像进行目标跟踪,得到初始目标跟踪轨迹;然后利用该初始跟踪轨迹,对实时更新的管制视频中的新的连续的n帧图像进行目标跟踪,得到当前目标跟踪轨迹;其中,两次连续的n帧图像具有一定的重合帧,一般为n-1帧,然后将初始目标跟踪轨迹与当前目标跟踪轨迹相融合,得到融合轨迹,作为新的初始跟踪轨迹。当实时更新的管制视频中更新了新的图像时,再取与上一次目标跟踪时的连续n帧图像具有重叠帧的连续n帧图像,并根据最新的初始跟踪轨迹进行目标跟踪。In this embodiment, for the continuous images in the control video, firstly carry out target tracking for the continuous n frames of images to obtain the initial target tracking trajectory; then use the initial tracking trajectory to track the new continuous n Frame images are used for target tracking to obtain the current target tracking trajectory; among them, two consecutive n-frame images have certain overlapping frames, generally n-1 frames, and then the initial target tracking trajectory is fused with the current target tracking trajectory to obtain fusion trajectory, as the new initial tracking trajectory. When a new image is updated in the real-time updated control video, take consecutive n frames of images that have overlapping frames with the consecutive n frames of images in the last target tracking, and perform target tracking according to the latest initial tracking trajectory.

本实施例中的步骤202、203、205与图1所示实施例中的步骤101、102、103的实现方法相同,本发明不再赘述。Steps 202 , 203 , and 205 in this embodiment are implemented in the same way as steps 101 , 102 , and 103 in the embodiment shown in FIG. 1 , and will not be repeated in the present invention.

在上述实施例的基础上,对图1和图2所示实施例中的获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围的具体实现方式进行详细说明。On the basis of the above-mentioned embodiments, the displacement of the target nodes in the consecutive n frames of images in the acquisition control video in the embodiments shown in Fig. 1 and Fig. 2 when the inter-frame intervals are 1, 2, ..., n-1 The specific implementation of the scope will be described in detail.

一种可行的实现方式,如图3所示,图3为本发明目标跟踪方法中位移范围获取方法实施例一的流程图。该方法包括:A feasible implementation manner is shown in FIG. 3 , which is a flow chart of Embodiment 1 of the displacement range acquisition method in the target tracking method of the present invention. The method includes:

步骤301、通过模板匹配获得管制视频中连续n帧图像内各目标节点的坐标位置;Step 301, obtaining the coordinate positions of each target node in consecutive n frames of images in the controlled video through template matching;

步骤302、根据各目标节点的坐标位置获取连续n帧图像内的各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Step 302 , according to the coordinate position of each target node, obtain the displacement range of each target node in consecutive n frames of images when the inter-frame intervals are 1, 2, . . . , n-1.

在管制视频中,先采用模板匹配的方法,逐帧匹配出各目标节点,并记录各目标节点在帧内的坐标位置,根据连续n帧图像内各目标节点的坐标位置,计算得到各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。In the control video, first use the template matching method to match each target node frame by frame, and record the coordinate position of each target node in the frame, and calculate each target node according to the coordinate position of each target node in consecutive n frames of images The displacement range when the interframe interval is 1, 2, ..., n-1 respectively.

进一步的,在本实现方式的基础上,图4为本发明目标跟踪方法中位移范围获取方法实施例一的流程图。步骤302,如图4所示,具体包括:Further, on the basis of this implementation, FIG. 4 is a flow chart of Embodiment 1 of a method for acquiring a displacement range in the object tracking method of the present invention. Step 302, as shown in Figure 4, specifically includes:

步骤31、根据连续n帧图像中第i帧图像与第i+j帧图像中的所有目标节点的坐标位置,对于第i帧中的每一个目标节点,在第i+j帧中确定距离第i帧中的每一个目标节点最近的目标节点及对应的最近距离、次近的目标节点及对应的次近距离;其中,i的取值范围为从1至n-j的正整数,j的取值范围为从1至n-1的正整数;Step 31. According to the coordinate positions of all target nodes in the i-th frame image and the i+j-th frame image in the consecutive n-frame images, for each target node in the i-th frame, determine the distance between the i+j-th frame and the i+j-th frame The nearest target node of each target node in the i frame and the corresponding closest distance, the second closest target node and the corresponding second closest distance; wherein, the value range of i is a positive integer from 1 to n-j, and the value of j A positive integer ranging from 1 to n-1;

步骤32、计算第i帧中的每一个目标节点对应的次近距离与最近距离d的比值,获取最大比值;Step 32, calculate the ratio of the next closest distance to the closest distance d corresponding to each target node in the i-th frame, and obtain the maximum ratio;

步骤33、判断最大比值是否大于预设门限,若是,执行步骤34,若否,执行步骤35;Step 33, judging whether the maximum ratio is greater than the preset threshold, if so, go to step 34, if not, go to step 35;

步骤34、将位移范围[d-2j,d+2j]作为连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围;Step 34, using the displacement range [d-2j, d+2j] as the displacement range of each target node in consecutive n frames of images when the inter-frame interval is j;

步骤35、对i递增1,重复执行步骤31至步骤35;Step 35, increment i by 1, and repeatedly execute steps 31 to 35;

步骤36、确定步骤34执行完毕后,重复执行步骤31至步骤35,直至遍历j的所有取值之后,得到管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Step 36, after step 34 is determined, repeat step 31 to step 35, until after traversing all the values of j, it is obtained that the inter-frame intervals of the target nodes in n consecutive frames of images in the regulated video are 1, 2, ... , the displacement range at n-1.

下面取管制视频中连续n帧图像中的第i帧图像与第i+j帧图像,以计算第i帧图像中的目标节点在帧间间隔为j时的位移范围为例,详细说明本实施例。Next, take the i-th frame image and the i+j-th frame image in the consecutive n frames of images in the control video, and take the calculation of the displacement range of the target node in the i-th frame image when the inter-frame interval is j as an example, and describe this implementation in detail example.

首先,对于第i帧图像中的每一个目标节点,在第i+j帧中确定距离第i帧中的每一个目标节点最近的目标节点及对应的最近距离、次近的目标节点及对应的次近距离。具体的,对于第i帧图像中的一个目标节点(x0,y0),在第i+j帧中确定距离该目标节点(x0,y0)最近的目标节点(x1,y1),和次近的目标节点(x2,y2),并得到对应的最近距离d和次近距离dd。其中,对于任意两个目标节点(x,y)和(xx,yy),距离的计算公式为 First, for each target node in the i-th frame image, determine the target node closest to each target node in the i-th frame in the i+j-th frame and the corresponding closest distance, the next closest target node and the corresponding second close range. Specifically, for a target node (x 0 , y 0 ) in the i-th frame image, determine the target node (x 1 , y 1 ) closest to the target node (x 0 , y 0 ) in the i+j-th frame ), and the next closest target node (x 2 , y 2 ), and get the corresponding closest distance d and second closest distance dd. Among them, for any two target nodes (x, y) and (xx, yy), the formula for calculating the distance is

其次,计算第i帧图像中的每一个目标节点对应的次近距离dd与最近距离d的比值,并比较获得最大比值k。当目标较少时,由于各帧间的时间间隔较少,可直接认为后一帧图像中距离前一帧图像中目标节点最近的目标节点即为同一目标在不同帧内的目标节点,但是随着目标数量的增多,目标间距离减少,多个目标之间的速度差别较大,可能在某帧的一小块区域内出现多个目标节点,此时则不能简单认为最近的目标节点与前帧中对应目标节点为同一目标。次近距离dd与最近距离d的比值则代表了目标在运动到后一帧时,受到其他目标干扰的程度。当比值较大时,可认为在最近目标的一定范围内,都不存在其他干扰目标,当比值较小时,可认为在最近目标的一定范围内,至少存在次近目标这一干扰目标。然后,比较最大比值k是否大于预设门限k0Second, calculate the ratio of the next closest distance dd to the closest distance d corresponding to each target node in the i-th frame image, and compare to obtain the maximum ratio k. When there are few targets, since the time interval between frames is small, it can be directly considered that the target node in the next frame image that is closest to the target node in the previous frame image is the target node of the same target in different frames. As the number of targets increases, the distance between targets decreases, and the speed difference between multiple targets is large. There may be multiple target nodes in a small area of a frame. At this time, it cannot be simply considered that the nearest target node is the same as the previous The corresponding target nodes in the frame are the same target. The ratio of the next closest distance dd to the shortest distance d represents the degree of interference of other targets when the target moves to the next frame. When the ratio is large, it can be considered that within a certain range of the nearest target, there are no other interference targets. When the ratio is small, it can be considered that there is at least a second-closest interference target within a certain range of the nearest target. Then, compare whether the maximum ratio k is greater than a preset threshold k 0 .

其次,当最大比值k大于预设门限k0时,可将位移范围[d-2j,d+2j]作为连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围,该位移范围表示以目标节点所在的位置为圆心,以位移范围为半径所覆盖的区域,表明前一帧中的目标节点在间隔了j帧后的后帧图像中可能的位置。当最大比值k小于预设门限k0时,表明所选则的两帧图像中,后一帧中的目标节点分布较为集中,干扰较大,此时,将i的取值增加1,重新选取两张图像,例如,原本选取连续n帧图像中第1帧图像与第1+j帧图像,现改为选用连续n帧图像中第2帧图像与第2+j帧图像,重新计算在帧间间隔为j时的位移范围。若对于连续n帧图像中所有的第i帧图像与第i+j帧图像都不存在最大比值大于预设门限k0,则重新选取连续n帧图像。可选的,预设门限k0可以为12/j。Secondly, when the maximum ratio k is greater than the preset threshold k 0 , the displacement range [d-2j,d+2j] can be used as the displacement range of each target node in consecutive n frames of images when the inter-frame interval is j, the The displacement range represents the area covered by the position of the target node as the center of the circle and the displacement range as the radius, indicating the possible position of the target node in the previous frame in the subsequent frame image after j frames are separated. When the maximum ratio k is less than the preset threshold k 0 , it indicates that among the selected two frames of images, the distribution of target nodes in the next frame is relatively concentrated and the interference is relatively large. At this time, increase the value of i by 1 and reselect Two images, for example, the first frame image and the 1+j frame image in the consecutive n frames of images were originally selected, and now the second frame image and the 2+j frame image in the consecutive n frames of images are selected, and the frame size is recalculated The displacement range when the interval is j. If there is no maximum ratio between the image in the i-th frame and the image in the i+j-th frame in the n consecutive frames of images that is greater than the preset threshold k 0 , reselect the images in the n consecutive frames. Optionally, the preset threshold k 0 may be 12/j.

最后,当获取到连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围后,计算连续n帧图像中的每一个目标节点在帧间间隔为j+1时的位移范围,直至遍历了j的所有取值。以n为5为例,需计算连续5帧图像中的每一个目标节点在帧间间隔为1、2、3、4时的位移范围。Finally, after obtaining the displacement range of each target node in consecutive n frames of images when the inter-frame interval is j, calculate the displacement range of each target node in consecutive n frames of images when the inter-frame interval is j+1 , until all values of j have been traversed. Taking n as 5 as an example, it is necessary to calculate the displacement range of each target node in 5 consecutive frames of images when the inter-frame intervals are 1, 2, 3, and 4.

另一种可行的实现方式,在如图2所示实施例的基础上,如图5所示,图5为本发明目标跟踪方法中位移范围获取方法实施例二的流程图。该方法包括:Another feasible implementation is based on the embodiment shown in FIG. 2 , as shown in FIG. 5 . FIG. 5 is a flowchart of Embodiment 2 of the displacement range acquisition method in the target tracking method of the present invention. The method includes:

步骤501、根据初始目标跟踪轨迹中的所有目标节点的坐标位置,计算初始目标跟踪轨迹中的目标节点在帧间间隔分别为1,2,…,n-1时的目标位移;Step 501, according to the coordinate positions of all target nodes in the initial target tracking track, calculate the target displacements of the target nodes in the initial target tracking track when the inter-frame intervals are 1, 2, ..., n-1;

步骤502、根据初始目标跟踪轨迹中的所有目标节点在帧间间隔分别为1,2,…,n-1时的目标位移的平均值,获得连续n帧图像中的每一个目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Step 502, according to the average value of the target displacements of all target nodes in the initial target tracking trajectory when the inter-frame intervals are 1, 2, ..., n-1, obtain the inter-frame distance of each target node in consecutive n frames of images The range of displacement when the intervals are 1, 2, ..., n-1.

具体的,在确定存在初始目标跟踪轨迹后,由于初始目标跟踪轨迹是已经确定的具有关联关系的目标节点,该些目标节点在连续n帧图像中具有准确的位置关系,因此,可以采用初始目标跟踪轨迹中的所有目标节点的坐标位置,分布计算每一条轨迹上的目标节点在帧间间隔分别为1,2,…,n-1时的目标位移,将所有轨迹计算得到的目标位移按帧间间隔不同计算得到平均值Aj,将[Aj-2j,Aj+2j]作为连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围。Specifically, after it is determined that there is an initial target tracking track, since the initial target tracking track is an already determined target node with an associated relationship, and these target nodes have accurate positional relationships in consecutive n frames of images, the initial target tracking track can be used Track the coordinate positions of all target nodes in the trajectory, distribute and calculate the target displacements of the target nodes on each trajectory when the inter-frame intervals are 1, 2, ..., n-1, and calculate the target displacements obtained by all trajectories by frame The average value A j is calculated at different intervals, and [A j -2j, A j +2j] is used as the displacement range of each target node in the continuous n frames of images when the inter-frame interval is j.

在上述任一实施例的基础上,对本方法中的根据各目标节点所在的帧在管制视频中的位置及各目标在帧间间隔分别为1,2,…,n-1时的位移范围,对n帧图像中的各目标节点进行关联,得到当前目标跟踪轨迹的具体实现方式进行详细说明。On the basis of any of the above-mentioned embodiments, according to the position of the frame where each target node is located in the control video in the method and the displacement range of each target when the interval between frames is 1, 2, ..., n-1, The specific implementation of associating each target node in n frames of images to obtain the current target tracking trajectory will be described in detail.

具体的,关联可采用超边生长的方式,上述步骤具体包括:Specifically, the association can adopt the method of hyperedge growth, and the above steps specifically include:

在管制视频连续n帧图像中,确定满足两两不在同一帧内且坐标距离满足位移范围的任意三个目标节点,则对任意三个目标节点进行超边连接,得到所有长度为3的超边组成的集合P;In the continuous n-frame images of the controlled video, if any three target nodes are determined to satisfy that no two are in the same frame and the coordinate distance satisfies the displacement range, then perform hyperedge connection on any three target nodes to obtain all hyperedges with a length of 3 The set P composed of;

在集合P中,进行超边生长流程,得到所有长度为4的超边组成的集合Q;In the set P, perform the hyperedge growth process to obtain the set Q composed of all hyperedges with a length of 4;

多次进行超边生长流程,直至得到所有长度为n的超边,并将所有超边作为当前目标跟踪轨迹,其中n大于3;Perform the hyperedge growth process multiple times until all hyperedges with a length of n are obtained, and use all hyperedges as the current target tracking trajectory, where n is greater than 3;

其中,超边生长流程为,在长度为x的超边组成的集合中,确定满足每两条超边之间的公共目标节点个数均为x-1的x+1条超边,且x+1条超边共包括x+1个不同的目标节点,则将x+1条超边进行超边连接得到长度为x+1的超边;x为3至n-1的正整数。Among them, the process of hyperedge growth is, in the set of hyperedges with a length of x, determine x+1 hyperedges that satisfy the number of common target nodes between each two hyperedges is x-1, and x The +1 hyperedges include x+1 different target nodes in total, then hyperedge connection is performed on the x+1 hyperedges to obtain a hyperedge with a length of x+1; x is a positive integer from 3 to n-1.

在对管制视频的连续n帧图像的所有目标节点进行关联时,采用超边生长的方法,先进行超边连接得到长度为3的超边,然后从长度为3的超边集合中生长出长度为4的超边,再由长度为4的超边集合中生长出长度为5的超边,最终得到长度为n的超边。采用超边生长得到的轨迹其准确率较高。When associating all target nodes of consecutive n-frame images of the regulated video, the method of hyperedge growth is adopted, first hyperedge connection is performed to obtain a hyperedge with a length of 3, and then the length is grown from the hyperedge set with a length of 3 A hyperedge of length 4, and then a hyperedge of length 5 is grown from the set of hyperedges of length 4, and finally a hyperedge of length n is obtained. The trajectory obtained by hyperedge growing has a higher accuracy.

进一步的,在超边生长的基础上,关联还可采用超边合并的方式,在得到所有长度为4的超边组成的集合Q之后,上述步骤还包括:Furthermore, on the basis of hyperedge growth, the association can also adopt the method of hyperedge merging. After obtaining the set Q composed of all hyperedges with a length of 4, the above steps also include:

在集合Q中,进行超边生长流程,得到所有长度为5的超边组成的集合和无法超边生长为长度为5的长度为4的超边组成的集合Q*;将集合P中无法超边生长为长度为4的长度为3的超边组成集合P*In the set Q, carry out the hyperedge growth process to obtain the set composed of all hyperedges with a length of 5 and the set Q * composed of hyperedges with a length of 4 that cannot be grown into a hyperedge with a length of 5; The edge grows into a hyperedge of length 4 and length 3 to form a set P * ;

在集合P*中任取长度为3的超边,在集合Q*中任取长度为4的超边,若任取的长度为3的超边与任取的长度为4的超边包含两个公共目标节点,则将任取的长度为3的超边与任取的长度为4的超边合并为长度为5的超边;A hyperedge of length 3 is randomly selected in the set P * , and a hyperedge of length 4 is randomly selected in the set Q * . If the hyperedge of length 3 and the hyperedge of length 4 contain two common target node, the hyperedge with a length of 3 and any hyperedge with a length of 4 are merged into a hyperedge with a length of 5;

在每次对长度为y-1的超边组成的集合X进行超边生长流程,得到长度为y的超边组成的集合Y和无法超边生长为长度为y的长度为y-1的超边组成的集合X*之后,执行超边合并流程,得到长度为y的超边;Each time the hyperedge growth process is performed on the set X composed of hyperedges of length y-1, the set Y composed of hyperedges of length y and the hyperedges of length y-1 that cannot be grown into hyperedges of length y are obtained. After the set X * composed of edges, execute the hyperedge merging process to obtain a hyperedge with a length of y;

其中,超边合并流程为:在集合X*中任取长度为y-1的超边,在无法超边生长为长度为y-1的长度为y-2的超边组成的集合T*中任取长度为y-2的超边,若任取的长度为y-1的超边与任取的长度为y-2的超边包含y-3个公共目标节点,则将任取的长度为y-1的超边与任取的长度为y-2的超边合并为长度为y的超边;y的取值范围为5至n-1的正整数。Among them, the process of merging hyperedges is: in the set X * , any hyperedge with a length of y-1 is selected, and in the set T * composed of hyperedges with a length of y-2 that cannot grow into a hyperedge with a length of y-1 Take any hyperedge with a length of y-2, if any hyperedge with a length of y-1 and any hyperedge with a length of y-2 contain y-3 common target nodes, then the arbitrary length A hyperedge of y-1 and an arbitrary hyperedge of length y-2 are merged into a hyperedge of length y; the value of y is a positive integer ranging from 5 to n-1.

可选的,在超边合并的过程中,还可采用集合X中任取的长度为y-1的超边和无法超边生长为长度为y-1的长度为y-2的超边组成的集合T*中任取的长度为y-2的超边。Optionally, in the process of merging hyperedges, it can also be composed of hyperedges of length y-1 randomly selected in the set X and hyperedges of length y-2 that cannot be grown into hyperedges of length y-1 Any hyperedge of length y-2 in the set T * of .

具体的,对于连续n帧图像,每帧图像中的目标节点都可根据位移范围,在后j帧中寻找可能对应的目标节点,为得到长度较长且较为准确的轨迹,可先生成长度为3的超边,然后逐渐将超边的长度进行增长,最终得到长度满足需求的超边。下面以n为6为例,进行详细说明。Specifically, for n consecutive frames of images, the target nodes in each frame of images can be searched for the possible corresponding target nodes in the next j frames according to the displacement range. In order to obtain a longer and more accurate trajectory, the length of 3, and then gradually increase the length of the hyperedge, and finally obtain a hyperedge whose length meets the requirements. The following takes n as 6 as an example to describe in detail.

首先,对于连续6帧图像中的所有目标节点,确定不在同一帧上的两两目标之间的距离满足对应的位移范围的三个目标,将该三个目标进行关联,将所有符合上述条件的三个目标关联后,得到长度为3的超边组成的集合P。示例性的,在具体计算时,当三个目标分别来自第1帧,第3帧和第4帧时,这三个目标应满足的位移范围是,来自第1帧和第3帧的目标满足帧间间隔为2时的位移范围,来自第1帧和第4帧的目标满足帧间间隔为3时的位移范围,来自第3帧和第4帧的目标满足帧间间隔为1时的位移范围。First, for all target nodes in 6 consecutive frames of images, determine three targets whose distances between two targets that are not on the same frame meet the corresponding displacement range, associate the three targets, and combine all targets that meet the above conditions After the three targets are associated, a set P consisting of hyperedges with a length of 3 is obtained. Exemplarily, in the specific calculation, when the three targets come from the first frame, the third frame and the fourth frame respectively, the displacement ranges that these three targets should satisfy are that the targets from the first frame and the third frame meet The displacement range when the interframe interval is 2, the targets from the first frame and the fourth frame meet the displacement range when the interframe interval is 3, and the objects from the third and fourth frames meet the displacement when the interframe interval is 1 scope.

其次,若集合P中存在4条长度为3的超边,这4条超边中共包含4个不同的目标节点,且每两条超边之间的公共目标节点个数均为2,则认为这4条超边可以融合在一起,形成一条长度为4的超边,这个超边由这4个不同的目标节点组成。所有长度为4的超边组成集合Q,集合P中无法生长为长度为4的长度为3的超边组成集合P*Secondly, if there are 4 hyperedges with a length of 3 in the set P, these 4 hyperedges contain 4 different target nodes, and the number of common target nodes between each two hyperedges is 2, then it is considered These 4 hyperedges can be fused together to form a hyperedge of length 4, which consists of these 4 different target nodes. All hyperedges of length 4 form set Q, and hyperedges of length 3 that cannot grow to length 4 in set P form set P * .

再次,在集合Q中,再进行超边生长流程,得到所有长度为5的超边组成的集合和无法超边生长为长度为5的长度为4的超边组成的集合Q*;将集合Q*与集合P*中的超边再次进行融合,当任取的长度为3的超边与任取的长度为4的超边包含两个公共目标节点,则将任取的长度为3的超边与任取的长度为4的超边合并为长度为5的超边。Again, in the set Q, the process of hyperedge growth is carried out again, and the set Q * composed of all hyperedges with a length of 5 and the hyperedges with a length of 4 that cannot be grown into a hyperedge with a length of 5 is obtained; the set Q * is fused again with the hyperedges in the set P * , when the arbitrary length 3 hyperedge and the arbitrary length 4 hyperedge contain two common target nodes, then the arbitrary length 3 hyperedge An edge is merged with an arbitrary hyperedge of length 4 into a hyperedge of length 5.

再次,在所有长度为5的超边组成的集合中,进行超边生长得到长度为6的超边并得到无法超边生长为长度为6的长度为5的超边组成的集合,将无法生长为长度为6的长度为5的超边与无法超边生长为长度为5的长度为4的超边集合进行超边合并,以得到长度为6的超边。Again, in the set of all hyperedges with a length of 5, perform hyperedge growth to obtain a hyperedge with a length of 6 and obtain a set of hyperedges with a length of 5 that cannot be grown to a length of 6, and will not be able to grow Perform hyperedge merging for a hyperedge of length 5 with length 6 and a hyperedge set of length 4 that cannot be grown into a hyperedge of length 5 to obtain a hyperedge of length 6.

最后将所有的长度分别为3、4、5、6的超边作为当前目标跟踪轨迹。Finally, all hyperedges with lengths of 3, 4, 5, and 6 are used as the current target tracking trajectory.

进一步的,在上述任一实施例的基础上,本发明还包括:Further, on the basis of any of the above-mentioned embodiments, the present invention also includes:

删除所有超边中具有包含关系的超边中长度较短的超边。Delete the shorter hyperedge among the hyperedges with containment relationship among all hyperedges.

示例性的,对于长度分别为3、4、5、6的超边中,可能存在两条具有包含关系的超边,长度较长的超边除所包含长度较短的超边所包含的所有目标节点外,还包含有其他目标节点,此时,在当前目标跟踪轨迹中删除长度较短的超边。Exemplarily, for hyperedges with lengths of 3, 4, 5, and 6, there may be two hyperedges with containment relations, and the hyperedge with a longer length excludes all In addition to the target node, there are other target nodes. At this time, the hyperedge with a shorter length is deleted in the current target tracking track.

进一步的,在上述任一实施例的基础上,本发明还包括:Further, on the basis of any of the above-mentioned embodiments, the present invention also includes:

获取连续n帧图像中的目标的移动速度。Obtain the moving speed of the target in n consecutive frames of images.

具体的,目标的移动速度可根据融合轨迹或当期目标跟踪轨迹迹获得。Specifically, the moving speed of the target can be obtained according to the fusion trajectory or the current target tracking trajectory.

下面以n等于5为例,即以取管制视频中的连续5帧图像为例,对本发明上述实施例中涉及到的步骤进行详细说明:Next, take n equal to 5 as an example, that is, take the continuous 5 frames of images in the control video as an example, and describe the steps involved in the above-mentioned embodiments of the present invention in detail:

步骤一,利用模板匹配的检测方法检测连续5帧图像的第1帧到第5帧图像,得到各帧内的所有目标节点的坐标位置。Step 1: Use the template matching detection method to detect the first frame to the fifth frame image of five consecutive frames of images, and obtain the coordinate positions of all target nodes in each frame.

步骤二,对于连续的5帧图像,取第i帧图像和第i+j帧图像,记录两幅图像中检测到的目标节点的坐标位置,假设第i帧图像一共检测到ni个目标节点,目标节点的坐标分别是第i+j帧图像一共检测到ni+j个目标节点,目标节点的坐标分别是对每一个在第i帧内检测到的目标节点,在第i+j帧图像中的所有检测到的目标节点中,确定距离该目标节点的坐标最近的目标节点和次近的目标节点;假设第i帧的某个目标节点的位置坐标为t∈{1,2,…ni},在第i+j帧图像中检测到的所有目标节点的坐标位置中,距离目标节点的最近距离,可由下述计算公式计算获得:对应的索引号为次近距离为二者之间的比值为在第i帧图像中的所有目标节点的中,取出次近距离与最近距离比值最大时对应的目标节点。Step 2. For 5 consecutive frames of images, take the i-th frame image and the i+j-th frame image, and record the coordinate positions of the target nodes detected in the two images, assuming that a total of n i target nodes are detected in the i-th frame image , the coordinates of the target node are A total of ni+j target nodes are detected in the i+j frame image, and the coordinates of the target nodes are For each target node detected in the i-th frame, among all the detected target nodes in the i+j-th frame image, determine the target node closest to the coordinates of the target node and the next closest target node; assuming The position coordinates of a certain target node in the i-th frame are t ∈ {1, 2, ... n i }, the coordinate positions of all target nodes detected in the i+jth frame image , the distance from the target node The shortest distance of can be calculated by the following formula: The corresponding index number is next closest to The ratio between the two is of all target nodes in the i-th frame image In , take out the corresponding target node when the ratio of the next closest distance to the closest distance is the largest.

步骤三,判断比值最大的是否成立,若成立则执行步骤四;若不成立则执行步骤五。Step 3, determine the largest ratio Whether it is true, if true, go to step 4; if not, go to step 5.

步骤四,取次近距离与最近距离比值最大的目标节点对应的最近距离d,将Sj=[d-2j,d+2j]作为帧间间隔为j时的目标节点对应的目标位移范围;将j的取值加1,重新执行步骤二至步骤三,直至将j的取值从1至4都遍历1遍。Step 4, take the shortest distance d corresponding to the target node with the largest ratio of the next closest distance to the shortest distance, and use S j = [d-2j, d+2j] as the target displacement range corresponding to the target node when the inter-frame interval is j; set Add 1 to the value of j, and re-execute steps 2 to 3 until the value of j is traversed from 1 to 4 once.

步骤五,将i的取值增加1,重新执行步骤二至步骤三。Step five, increase the value of i by 1, and re-execute steps two to three.

在步骤六之前,通过多次执行步骤二和步骤三,可得到帧间间隔分别为1、2、3、4时的目标节点的位移范围。Before step six, by performing steps two and three multiple times, the displacement ranges of the target nodes can be obtained when the inter-frame intervals are 1, 2, 3, and 4, respectively.

步骤六,连续的5帧图像中共检测到有个检测结果,表示为其中将连续的5帧图像命名为第0帧,第1帧,第2帧,第3帧及第4帧,表示第0帧内的所有检测结果,表示第1帧内的所有检测结果。将检测结果作为进行轨迹跟踪的目标节点vi,其中i的取值范围为{1,2,…nt};对任意3个节点满足t1≠t2≠t3,且 则建立一条长度为3的超边e={v1,v2,v3}其中,以为例,表示帧间间隔为|t1-t2|时的位移范围,重复执行该过程,确定所有检测结果中符合条件的超边,用集合Etri={ei}表示,ei表示长度为3的超边集合中的任一条超边,i为正整数,i的取值范围不超过集合Etri的大小。Step 6, a total of 5 consecutive frames of images are detected with detection results, expressed as The five consecutive frames of images are named frame 0, frame 1, frame 2, frame 3 and frame 4, which represent all detection results in frame 0 and all detection results in frame 1. test results As the target node v i for trajectory tracking, the value range of i is {1, 2, ... n t }; for any 3 nodes satisfy t 1 ≠t 2 ≠t 3 , and and Then establish a hyperedge e={v 1 , v 2 , v 3 } whose length is 3, where As an example, it represents the displacement range when the interval between frames is |t 1 -t 2 |, and repeats this process to determine the qualified hyperedges in all detection results, expressed by the set E tri ={e i }, and e i represents For any hyperedge in the hyperedge set with length 3, i is a positive integer, and the value range of i does not exceed the size of the set E tri .

步骤七,对集合Etri进行超边生长。若超边集合Etri={ei}中,存在4条超边e1,e2,e3,e4满足Card(ei∩ej)=2,且Card(e1∪e2∪e3∪e4)=4;则超边e1,e2,e3,e4可合并成一条新的长度为4的超边,且这四条超边称为可生长超边。该步骤将集合Etri分成两互不相交的两部分,一部分可以合并生长为长度为4的超边,另一部分则不能。合并后长度为4的超边集合记为Equad,另一部分剩余的无法进行超边生长的长度为3的超边集合则记为进一步的,对长度为4的超边集合Equad中进行超边生长,以得到长度为5的超边集合Equin和剩余的无法进行超边生长的长度为4的超边集合进一步,进行超边合并,若对中的每条超边ei,在超边集合中寻找与之对应的子集子集中所有元素的并用表示,如果则将ei合并成为长度为5的超边与超边生长得到的长度为5的超边集合共同用Equin表示。若存在超边集合中任意一条超边均不满足Card(ei∩ej)=2,此时为空集,于是有同时亦可能存在的情况,将此两种情况下的中的ei无法通过合并成为长度为5的超边,对于该类ei记为超边合并后超边长度为3的集合中剩余的长度为3的超边集合记为其中,Card表示求有限集合中元素的个数。Step seven, perform hyperedge growth on the set E tri . If in the hyperedge set E tri ={e i }, there are 4 hyperedges e 1 , e 2 , e 3 , and e 4 satisfying Card(e i ∩e j )=2, And Card(e 1 ∪e 2 ∪e 3 ∪e 4 )=4; then hyperedges e 1 , e 2 , e 3 , e 4 can be merged into a new hyperedge with length 4, and these four hyperedges called growable hyperedges. This step divides the set E tri into two disjoint parts, one part can be merged to grow into a hyperedge with length 4, and the other part cannot. The merged hyperedge set of length 4 is denoted as E quad , and the remaining hyperedge set of length 3 that cannot be hyperedge grown is denoted as Further, perform hyperedge growth on the hyperedge set E quad with a length of 4 to obtain a hyperedge set E quin with a length of 5 and the remaining hyperedge sets with a length of 4 that cannot be hyperedge grown Further, perform hyperedge merge, if Each hyperedge e i in the hyperedge set Find the corresponding subset in Subset The combination of all elements in means that if Then compare e i with merge into hyperedges of length 5 Together with the hyperedge set of length 5 obtained by hyperedge growth, it is expressed by E quin . If there is a hyperedge set Any one of the hyperedges does not satisfy Card(e i ∩e j )=2, at this time is an empty set, so we have There may also be case, the two cases of e i in cannot be merged into a hyperedge with a length of 5, and for this type e i is recorded as The set of hyperedge length 3 after hyperedge merging The remaining hyperedge set of length 3 in is denoted as Among them, Card means to find the number of elements in the finite set.

步骤八,校验三个不同长度的超边集合Equin中,是否存在长度较短的超边被长度较长的超边覆盖的情况,若存在,则删除较短的超边。对于集合若存在两条超边ei,ej∈Eall,i≠j,满足则去掉ei保留ej。三个长度不同的超边集合即为连续的5帧图像的当前目标跟踪轨迹,并将其作为初始目标跟踪轨迹。Step 8, verify three hyperedge sets of different lengths In Equin , whether there is a situation where a hyperedge with a shorter length is covered by a hyperedge with a longer length, and if so, delete the hyperedge with a shorter length. for collections If there are two hyperedges e i , e j ∈ E all , i≠j, satisfy Then remove e i and keep e j . Three sets of hyperedges with different lengths are the current target tracking trajectory of five consecutive frames of images, which are used as the initial target tracking trajectory.

步骤九,对于实时更新的第6帧图像,取第2帧至第6帧图像,进行轨迹追踪,在追踪轨迹时,可仍采用步骤二至步骤八所示的方法,也可采用如下所述的方式:Step 9: For the 6th frame image that is updated in real time, take the 2nd to 6th frame images, and track the trajectory. When tracking the trajectory, you can still use the methods shown in steps 2 to 8, or you can use the following The way:

根据第1帧至第5帧图像得到的初始目标跟踪轨迹,对每一条轨迹用目标节点的位置坐标表示:其中ni表示轨迹ei中的目标节点的个数。对每一条轨迹ei计算帧间隔分别为1、2、3、4时的目标位移其中t=|p-q|,p≠q,p,q∈{1,2,…ni}。根据所有轨迹得到的计算均值作为第2帧至第6帧图像的帧间间隔为t时的最近距离dt,将St=[dt-2t,dt+2t]作为帧间间隔为t时的目标节点对应的目标位移范围。根据新的目标位移范围,再次执行步骤六至步骤八,得到当前目标跟踪轨迹。According to the initial target tracking trajectory obtained from the first frame to the fifth frame image, each trajectory is represented by the position coordinates of the target node: Among them, n i represents the number of target nodes in trajectory e i . Calculate the target displacement when the frame interval is 1, 2, 3, 4 for each trajectory e i where t=|pq|, p≠q, p, q∈{1, 2, . . . n i }. Calculated mean from all trajectories As the shortest distance d t when the inter-frame interval of the second to sixth frame images is t, S t = [d t -2t, d t +2t] as the target corresponding to the target node when the inter-frame interval is t displacement range. According to the new target displacement range, perform steps 6 to 8 again to obtain the current target tracking trajectory.

步骤十,将当前目标跟踪轨迹与初始目标跟踪轨迹进行超边融合。初始目标跟踪轨迹用符号T1表示,从第2帧到第6帧得到的跟踪轨迹即当前目标跟踪轨迹用T2表示,将二者融合得到更长的轨迹结果,即从第1帧到第6帧的跟踪结果,用符号T6表示。具体融合方法如下:In step ten, the current target tracking trajectory and the initial target tracking trajectory are hyper-edge fused. The initial target tracking trajectory is represented by the symbol T 1 , and the tracking trajectory obtained from the second frame to the sixth frame, that is, the current target tracking trajectory is represented by T 2 , and the two are fused to obtain a longer trajectory result, that is, from the first frame to the first frame The tracking result of 6 frames is denoted by symbol T 6 . The specific fusion method is as follows:

对于任意一条轨迹若能找到一条轨迹满足其中,kj表示轨迹出现在第6帧中的个数,包括1或0两种情况。则融合成为一条新的轨迹将初始目标跟踪轨迹T1中的所有轨迹进行融合处理,得到融合轨迹T6。将融合轨迹作为新的初始目标跟踪轨迹,重复执行步骤九和步骤十,即可得到实时更新的管制视频的所有跟踪轨迹。for any track If a track can be found Satisfy where kj represents the trajectory The number that appears in the sixth frame, including 1 or 0. but and Merging into a new trajectory All trajectories in the initial target tracking trajectory T 1 are fused to obtain a fused trajectory T 6 . Using the fusion trajectory as the new initial target tracking trajectory, repeat steps 9 and 10 to obtain all tracking trajectories of the control video updated in real time.

可选的,在每次得到当前目标跟踪轨迹时,可根据轨迹估算目标的当前速度。Optionally, the current speed of the target may be estimated according to the track each time the current target tracking track is obtained.

本发明实施例另一面还提供一种目标跟踪装置。图6为本发明目标跟踪装置实施例一的示意图,如图6所示,该目标跟踪装置包括:Another aspect of the embodiments of the present invention also provides a target tracking device. Fig. 6 is a schematic diagram of Embodiment 1 of the target tracking device of the present invention. As shown in Fig. 6, the target tracking device includes:

位移范围获取模块601,用于获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;The displacement range acquisition module 601 is used to obtain the displacement range of the target nodes in the continuous n frames of images in the control video when the inter-frame intervals are 1, 2, ..., n-1;

跟踪轨迹获取模块602,用于根据各目标节点所在的帧在管制视频中的位置及各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对n帧图像中的各目标节点进行关联,得到当前目标跟踪轨迹;Tracking track acquisition module 602, for according to the position of the frame where each target node is located in the control video and the displacement range of each target node when the inter-frame interval is 1, 2, ..., n-1, for n frames of image Each target node is associated to obtain the current target tracking trajectory;

标记模块603,用于在管制视频连续n帧图像中,采用相同的标记显示当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;The marking module 603 is used to display the corresponding target nodes on the same target tracking track in the current target tracking track using the same mark in the continuous n-frame images of the control video;

其中n为大于3的预设帧数。Where n is a preset frame number greater than 3.

可选的,在上述实施例的基础上,目标跟踪装置还包括:初始目标跟踪轨迹存储模块,用于存储初始目标跟踪轨迹;Optionally, on the basis of the above embodiments, the target tracking device further includes: an initial target tracking track storage module, configured to store the initial target tracking track;

融合模块,用于将当前目标跟踪轨迹与初始目标跟踪轨迹进行超边融合,得到融合轨迹,并将融合轨迹作为新的初始目标跟踪轨迹,更新初始目标跟踪轨迹存储模块中的初始目标跟踪轨迹;The fusion module is used to carry out hyperedge fusion between the current target tracking track and the initial target tracking track to obtain the fusion track, and use the fusion track as a new initial target tracking track to update the initial target tracking track in the initial target tracking track storage module;

标记模块603,用于在管制视频的连续n帧图像中,采用相同的标记显示新的初始目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点。The marking module 603 is configured to use the same mark to display the corresponding target nodes on the same target tracking track in the new initial target tracking track in the consecutive n frames of images of the control video.

可选的,位移范围获取模块601,用于通过模板匹配获得管制视频中连续n帧图像内各目标节点的坐标位置;根据各目标节点的坐标位置获取连续n帧图像内的各目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Optionally, the displacement range acquisition module 601 is used to obtain the coordinate position of each target node in consecutive n frames of images in the controlled video through template matching; obtain the coordinate position of each target node in consecutive n frames of images according to the coordinate position of each target node The displacement ranges when the intervals are 1, 2, ..., n-1.

可选的,位移范围获取模块601,具体用于执行下述步骤:Optionally, the displacement range acquisition module 601 is specifically configured to perform the following steps:

步骤31、根据连续n帧图像中第i帧图像与第i+j帧图像中的所有目标节点的坐标位置,对于第i帧中的每一个目标节点,在第i+j帧中确定距离第i帧中的每一个目标节点最近的目标节点及对应的最近距离、次近的目标节点及对应的次近距离;其中,i的取值范围为从1至n-j的正整数,j的取值范围为从1至n-1的正整数;Step 31. According to the coordinate positions of all target nodes in the i-th frame image and the i+j-th frame image in the consecutive n-frame images, for each target node in the i-th frame, determine the distance between the i+j-th frame and the i+j-th frame The nearest target node of each target node in the i frame and the corresponding closest distance, the second closest target node and the corresponding second closest distance; wherein, the value range of i is a positive integer from 1 to n-j, and the value of j A positive integer ranging from 1 to n-1;

步骤32、计算第i帧中的每一个目标节点对应的次近距离与最近距离d的比值,获取最大比值;Step 32, calculate the ratio of the next closest distance to the closest distance d corresponding to each target node in the i-th frame, and obtain the maximum ratio;

步骤33、判断最大比值是否大于预设门限,若是,执行步骤34,若否,执行步骤35;Step 33, judging whether the maximum ratio is greater than the preset threshold, if so, go to step 34, if not, go to step 35;

步骤34、将位移范围[d-2j,d+2j]作为连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围;Step 34, using the displacement range [d-2j, d+2j] as the displacement range of each target node in consecutive n frames of images when the inter-frame interval is j;

步骤35、对i递增1,重复执行步骤31至步骤35;Step 35, increment i by 1, and repeatedly execute steps 31 to 35;

步骤36、确定步骤34执行完毕后,重复执行步骤31至步骤35,直至遍历j的所有取值之后,得到管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Step 36, after step 34 is determined, repeat step 31 to step 35, until after traversing all the values of j, it is obtained that the inter-frame intervals of the target nodes in n consecutive frames of images in the regulated video are 1, 2, ... , the displacement range at n-1.

可选的,位移范围获取模块601,可用于根据初始目标跟踪轨迹中的所有目标节点的坐标位置,计算初始目标跟踪轨迹中的目标节点在帧间间隔分别为1,2,…,n-1时的目标位移;Optionally, the displacement range acquisition module 601 can be used to calculate the inter-frame intervals of the target nodes in the initial target tracking track as 1, 2, ..., n-1 according to the coordinate positions of all target nodes in the initial target tracking track target displacement when

根据初始目标跟踪轨迹中的所有目标节点在帧间间隔分别为1,2,…,n-1时的目标位移的平均值,获得连续n帧图像中的每一个目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。According to the average value of the target displacements of all target nodes in the initial target tracking trajectory when the inter-frame intervals are 1, 2, ..., n-1, the inter-frame intervals of each target node in consecutive n frames of images are respectively 1, 2, ..., the displacement range at n-1.

可选的,融合模块,具体用于对于当前目标跟踪轨迹中的任一当前目标跟踪轨迹与初始目标跟踪轨迹中的任一初始目标跟踪轨迹中,若确定任一当前目标跟踪轨迹与任一初始目标跟踪轨迹在相同帧内的目标节点相同,则对任一当前目标跟踪轨迹与任一初始目标跟踪轨迹进行融合处理,得到融合轨迹。Optionally, the fusion module is specifically used for any current target tracking trajectory in the current target tracking trajectory and any initial target tracking trajectory in the initial target tracking trajectory, if it is determined that any current target tracking trajectory and any initial target tracking trajectory If the target nodes in the same frame of the target tracking track are the same, any current target tracking track and any initial target tracking track are fused to obtain a fusion track.

进一步的,目标跟踪装置还包括:速度估计模块,用于根据融合轨迹获取连续n帧图像中的各融合轨迹的目标的移动速度。Further, the target tracking device further includes: a speed estimation module, configured to acquire the moving speed of the target of each fusion track in consecutive n frames of images according to the fusion track.

可选的,在上述任一装置实施例的基础上,跟踪轨迹获取模块602,具体用于:Optionally, on the basis of any of the above-mentioned device embodiments, the tracking trajectory acquisition module 602 is specifically used for:

在管制视频连续n帧图像中,确定满足两两不在同一帧内且坐标距离满足位移范围的任意三个目标节点,则对任意三个目标节点进行超边连接,得到所有长度为3的超边组成的集合P;In the continuous n-frame images of the controlled video, if any three target nodes are determined to satisfy that no two are in the same frame and the coordinate distance satisfies the displacement range, then perform hyperedge connection on any three target nodes to obtain all hyperedges with a length of 3 The set P composed of;

在集合P中,进行超边生长流程,得到所有长度为4的超边组成的集合Q;In the set P, perform the hyperedge growth process to obtain the set Q composed of all hyperedges with a length of 4;

多次进行超边生长流程,直至得到所有长度为n的超边,并将所有超边作为当前目标跟踪轨迹,n大于3;Perform the hyperedge growth process multiple times until all hyperedges with a length of n are obtained, and all hyperedges are used as the current target tracking trajectory, and n is greater than 3;

其中,超边生长流程为,在长度为x的超边组成的集合中,确定满足每两条超边之间的公共目标节点个数均为x-1的x+1条超边,且x+1条超边共包括x+1个不同的目标节点,则将x+1条超边进行超边连接得到长度为x+1的超边;Among them, the process of hyperedge growth is, in the set of hyperedges with a length of x, determine x+1 hyperedges satisfying that the number of common target nodes between each two hyperedges is x-1, and x +1 hyperedges include x+1 different target nodes in total, then connect x+1 hyperedges to obtain a hyperedge with length x+1;

x为3至n-1的正整数。x is a positive integer from 3 to n-1.

可选的,跟踪轨迹获取模块602,还用于:Optionally, the track acquisition module 602 is also used for:

在集合Q中,进行超边生长流程,得到所有长度为5的超边组成的集合和无法超边生长为长度为5的长度为4的超边组成的集合Q*;将集合P中无法超边生长为长度为4的长度为3的超边组成集合P*In the set Q, carry out the hyperedge growth process to obtain the set composed of all hyperedges with a length of 5 and the set Q * composed of hyperedges with a length of 4 that cannot be grown into a hyperedge with a length of 5; The edge grows into a hyperedge of length 4 and length 3 to form a set P * ;

在集合P*中任取长度为3的超边,在集合Q*中任取长度为4的超边,若任取的长度为3的超边与任取的长度为4的超边包含两个公共目标节点,则将任取的长度为3的超边与任取的长度为4的超边合并为长度为5的超边;A hyperedge of length 3 is randomly selected in the set P * , and a hyperedge of length 4 is randomly selected in the set Q * . If the hyperedge of length 3 and the hyperedge of length 4 contain two common target node, the hyperedge with a length of 3 and any hyperedge with a length of 4 are merged into a hyperedge with a length of 5;

在每次对长度为y-1的超边组成的集合X进行超边生长流程,得到长度为y的超边组成的集合Y和无法超边生长为长度为y的长度为y-1的超边组成的集合X*之后,执行超边合并流程,得到长度为y的超边;Each time the hyperedge growth process is performed on the set X composed of hyperedges of length y-1, the set Y composed of hyperedges of length y and the hyperedges of length y-1 that cannot be grown into hyperedges of length y are obtained. After the set X * composed of edges, execute the hyperedge merging process to obtain a hyperedge with a length of y;

其中,超边合并流程为:在集合X*中任取长度为y-1的超边,在无法超边生长为长度为y-1的长度为y-2的超边组成的集合T*中任取长度为y-2的超边,若任取的长度为y-1的超边与任取的长度为y-2的超边包含y-3个公共目标节点,则将任取的长度为y-1的超边与任取的长度为y-2的超边合并为长度为y的超边;y的取值范围为5至n-1的正整数。Among them, the process of merging hyperedges is: in the set X * , any hyperedge with a length of y-1 is selected, and in the set T * composed of hyperedges with a length of y-2 that cannot grow into a hyperedge with a length of y-1 Take any hyperedge with a length of y-2, if any hyperedge with a length of y-1 and any hyperedge with a length of y-2 contain y-3 common target nodes, then the arbitrary length A hyperedge of y-1 and an arbitrary hyperedge of length y-2 are merged into a hyperedge of length y; the value of y is a positive integer ranging from 5 to n-1.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (9)

1.一种目标跟踪方法,其特征在于,包括:1. A target tracking method, characterized in that, comprising: 获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;Obtain the displacement range of the target node in the consecutive n frames of images in the control video when the inter-frame intervals are 1, 2, ..., n-1; 根据各所述目标节点所在的帧在所述管制视频中的位置及各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对所述n帧图像中的各所述目标节点进行关联,得到当前目标跟踪轨迹;According to the position of the frame where each of the target nodes is located in the control video and the displacement range of each of the target nodes when the inter-frame intervals are 1, 2, ..., n-1, for the n frames of images Each of the target nodes is associated to obtain the current target tracking trajectory; 在所述管制视频连续n帧图像中,采用相同的标记显示所述当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;In the continuous n-frame images of the control video, the same mark is used to display the corresponding target nodes on the same target tracking track in the current target tracking track; 其中n为大于3的预设帧数;Where n is a preset number of frames greater than 3; 所述根据各所述目标节点所在的帧在所述管制视频中的位置及各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对所述n帧图像中的各所述目标节点进行关联,得到当前目标跟踪轨迹,包括:According to the position of the frame where each of the target nodes is located in the control video and the displacement range of each of the target nodes when the inter-frame intervals are 1, 2, ..., n-1, for the n frames Each of the target nodes in the image is associated to obtain the current target tracking track, including: 在所述管制视频连续n帧图像中,确定满足两两不在同一帧内且坐标距离满足所述位移范围的任意三个目标节点,则对所述任意三个目标节点进行超边连接,得到所有长度为3的超边组成的集合P;In the continuous n frames of images of the control video, it is determined that any two of the three target nodes that are not in the same frame and whose coordinate distance satisfies the displacement range, then perform hyperedge connection on the any three target nodes to obtain all A set P of hyperedges of length 3; 在所述集合P中,进行超边生长流程,得到所有长度为4的超边组成的集合Q;In the set P, perform a hyperedge growing process to obtain a set Q composed of all hyperedges with a length of 4; 多次进行超边生长流程,直至得到所有长度为n的超边,并将所有超边作为当前目标跟踪轨迹,所述n大于3;Perform the hyperedge growth process multiple times until all hyperedges with a length of n are obtained, and all hyperedges are used as the current target tracking trajectory, and the n is greater than 3; 其中,所述超边生长流程为,在长度为x的超边组成的集合中,确定满足每两条超边之间的公共目标节点个数均为x-1的x+1条超边,且所述x+1条超边共包括x+1个不同的目标节点,则将所述x+1条超边进行超边连接得到长度为x+1的超边;Wherein, the hyperedge growth process is, in the set of hyperedges with a length of x, determine x+1 hyperedges satisfying that the number of common target nodes between each two hyperedges is x-1, And the x+1 hyperedges include x+1 different target nodes in total, then performing hyperedge connection on the x+1 hyperedges to obtain a hyperedge with a length of x+1; x为3至n-1的正整数。x is a positive integer from 3 to n-1. 2.根据权利要求1所述的方法,其特征在于,所述获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围之前,还包括:2. method according to claim 1, is characterized in that, before the displacement range when inter-frame interval is respectively 1, 2, ..., n-1 time, Also includes: 确定存在初始目标跟踪轨迹;Determining that there is an initial target tracking trajectory; 所述得到当前目标跟踪轨迹之后,还包括:After obtaining the current target tracking trajectory, it also includes: 将所述当前目标跟踪轨迹与所述初始目标跟踪轨迹进行超边融合,得到融合轨迹,并将所述融合轨迹作为新的初始目标跟踪轨迹;Perform hyperedge fusion on the current target tracking trajectory and the initial target tracking trajectory to obtain a fusion trajectory, and use the fusion trajectory as a new initial target tracking trajectory; 所述在所述管制视频的连续n帧图像中,采用相同的标记显示所述当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点,包括:In the continuous n-frame images of the control video, the same mark is used to display the corresponding target nodes on the same target tracking track in the current target tracking track, including: 在所述管制视频的连续n帧图像中,采用相同的标记显示所述新的初始目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点。In the consecutive n frames of images of the control video, the corresponding target nodes on the same target tracking track in the new initial target tracking track are displayed with the same marker. 3.根据权利要求1所述的方法,其特征在于,所述获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,包括:3. The method according to claim 1, wherein the displacement ranges of the target nodes in the consecutive n frames of images in the acquired control video are respectively 1, 2, ..., n-1 when the inter-frame intervals include : 通过模板匹配获得所述管制视频中连续n帧图像内各所述目标节点的坐标位置;Obtaining the coordinate positions of each of the target nodes in consecutive n frames of images in the control video by template matching; 根据各所述目标节点的坐标位置获取所述连续n帧图像内的各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。The displacement ranges of each of the target nodes in the continuous n frames of images when the inter-frame intervals are 1, 2, . . . , n−1 are acquired according to the coordinate positions of each of the target nodes. 4.根据权利要求3所述的方法,其特征在于,所述根据各所述目标节点的坐标位置获取所述连续n帧图像内的各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,包括:4. method according to claim 3, is characterized in that, described according to the coordinate position of each described target node, obtains each described target node in described continuous n frame image at inter-frame interval respectively 1,2, ..., the displacement range at n-1, including: 步骤31、根据所述连续n帧图像中第i帧图像与第i+j帧图像中的所有目标节点的坐标位置,对于第i帧中的每一个目标节点,在第i+j帧中确定距离所述第i帧中的每一个目标节点最近的目标节点及对应的最近距离、次近的目标节点及对应的次近距离;其中,i的取值范围为从1至n-j的正整数,j的取值范围为从1至n-1的正整数;Step 31, according to the coordinate positions of all target nodes in the i-th frame image and the i+j-th frame image in the continuous n-frame images, for each target node in the i-th frame, determine in the i+j-th frame The target node closest to each target node in the i-th frame and the corresponding closest distance, the second closest target node and the corresponding second closest distance; wherein, the value range of i is a positive integer from 1 to n-j, The value range of j is a positive integer from 1 to n-1; 步骤32、计算第i帧中的每一个目标节点对应的次近距离与最近距离d的比值,获取最大比值;Step 32, calculate the ratio of the next closest distance to the closest distance d corresponding to each target node in the i-th frame, and obtain the maximum ratio; 步骤33、判断所述最大比值是否大于预设门限,若是,执行步骤34,若否,执行步骤35;Step 33, judging whether the maximum ratio is greater than a preset threshold, if yes, execute step 34, if not, execute step 35; 步骤34、将位移范围[d-2j,d+2j]作为所述连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围;Step 34, using the displacement range [d-2j, d+2j] as the displacement range of each target node in the continuous n frames of images when the inter-frame interval is j; 步骤35、对所述i递增1,重复执行步骤31至步骤35;Step 35, incrementing the i by 1, and repeatedly executing steps 31 to 35; 步骤36、确定所述步骤34执行完毕后,重复执行步骤31至步骤35,直至遍历所述j的所有取值之后,得到所述管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围。Step 36, after confirming that step 34 is executed, repeat step 31 to step 35, until after traversing all the values of j, obtain the inter-frame intervals of the target nodes in consecutive n frames of images in the controlled video, respectively The displacement range when it is 1, 2, ..., n-1. 5.根据权利要求2所述的方法,其特征在于,所述获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,包括:5. The method according to claim 2, wherein the displacement ranges of the target nodes in the consecutive n frames of images in the acquisition control video are respectively 1, 2, ..., n-1 when the inter-frame intervals include : 根据所述初始目标跟踪轨迹中的所有目标节点的坐标位置,计算所述初始目标跟踪轨迹中的目标节点在帧间间隔分别为1,2,…,n-1时的目标位移;According to the coordinate positions of all target nodes in the initial target tracking track, calculate the target displacements of the target nodes in the initial target tracking track when the inter-frame intervals are 1, 2, ..., n-1; 根据所述初始目标跟踪轨迹中的所有目标节点在帧间间隔分别为1,2,…,n-1时的目标位移的平均值,获得所述连续n帧图像中的每一个目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;According to the average value of the target displacements of all target nodes in the initial target tracking trajectory when the inter-frame intervals are 1, 2, ..., n-1, obtain the frame of each target node in the continuous n frame images The displacement range when the intervals are 1, 2, ..., n-1 respectively; 所述根据所述初始目标跟踪轨迹中的所有目标节点在帧间间隔分别为1,2,…,n-1时的目标位移的平均值,获得所述连续n帧图像中的每一个目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,包括:According to the average value of the target displacements of all target nodes in the initial target tracking trajectory when the inter-frame intervals are 1, 2, ..., n-1, each target node in the continuous n frames of images is obtained The displacement range when the inter-frame interval is 1, 2, ..., n-1, including: 根据所述初始目标跟踪轨迹中的所有目标节点在帧间间隔分别为1,2,…,n-1时的目标位移的平均值Aj,将[Aj-2j,Aj+2j]作为连续n帧图像中的每一个目标节点在帧间间隔为j时的位移范围。According to the average value A j of the target displacement of all target nodes in the initial target tracking trajectory when the inter-frame intervals are 1, 2, ..., n-1, [A j -2j, A j +2j] is used as The displacement range of each target node in consecutive n frames of images when the inter-frame interval is j. 6.根据权利要求2所述的方法,其特征在于,所述将所述当前目标跟踪轨迹与所述初始目标跟踪轨迹进行超边融合,得到融合轨迹,包括:6. The method according to claim 2, wherein said performing hyperedge fusion on said current target tracking track and said initial target tracking track to obtain a fusion track, comprising: 对于所述当前目标跟踪轨迹中的任一当前目标跟踪轨迹与所述初始目标跟踪轨迹中的任一初始目标跟踪轨迹中,若确定所述任一当前目标跟踪轨迹与所述任一初始目标跟踪轨迹在相同帧内的目标节点相同,则对所述任一当前目标跟踪轨迹与所述任一初始目标跟踪轨迹进行融合处理,得到融合轨迹。For any current target tracking track in the current target tracking track and any initial target tracking track in the initial target tracking track, if it is determined that any current target tracking track and any initial target tracking track If the trajectories have the same target node in the same frame, fusion processing is performed on any current target tracking trajectory and any initial target tracking trajectory to obtain a fusion trajectory. 7.根据权利要求6所述的方法,其特征在于,所述得到融合轨迹之后,还包括:7. method according to claim 6, is characterized in that, after described obtaining fusion trajectory, also comprises: 根据所述融合轨迹获取所述连续n帧图像中的各所述融合轨迹的目标的移动速度。Acquiring the moving speed of the target of each of the fusion trajectories in the consecutive n frames of images according to the fusion trajectories. 8.根据权利要求1所述的方法,其特征在于,所述得到所有长度为4的超边组成的集合Q之后,所述方法还包括:8. The method according to claim 1, characterized in that, after the set Q formed by all hyperedges with a length of 4 is obtained, the method further comprises: 在所述集合Q中,进行超边生长流程,得到所有长度为5的超边组成的集合和无法超边生长为长度为5的长度为4的超边组成的集合Q*;将所述集合P中无法超边生长为长度为4的长度为3的超边组成集合P*In the set Q, carry out the hyperedge growing process, obtain the set Q * that all lengths are composed of hyperedges with a length of 5 and the hyperedges with a length of 4 that cannot be grown into a length of 5; In P, hyperedges that cannot be grown into hyperedges with a length of 4 and a length of 3 form a set P * ; 在所述集合P*中任取长度为3的超边,在所述集合Q*中任取长度为4的超边,若任取的长度为3的超边与任取的长度为4的超边包含两个公共目标节点,则将任取的长度为3的超边与任取的长度为4的超边合并为长度为5的超边;A hyperedge with a length of 3 is randomly selected in the set P * , and a hyperedge with a length of 4 is randomly selected in the set Q * . If the hyperedge with a length of 3 and the hyperedge with a length of 4 If the hyperedge contains two common target nodes, the hyperedge with a length of 3 and the hyperedge with a length of 4 are merged into a hyperedge with a length of 5; 在每次对长度为y-1的超边组成的集合X进行超边生长流程,得到长度为y的超边组成的集合Y和无法超边生长为长度为y的长度为y-1的超边组成的集合X*之后,执行超边合并流程,得到长度为y的超边;Each time the hyperedge growth process is performed on the set X composed of hyperedges of length y-1, the set Y composed of hyperedges of length y and the hyperedges of length y-1 that cannot be grown into hyperedges of length y are obtained. After the set X * composed of edges, execute the hyperedge merging process to obtain a hyperedge with a length of y; 其中,所述超边合并流程为:在集合X*中任取长度为y-1的超边,在无法超边生长为长度为y-1的长度为y-2的超边组成的集合T*中任取长度为y-2的超边,若任取的长度为y-1的超边与任取的长度为y-2的超边包含y-3个公共目标节点,则将任取的长度为y-1的超边与任取的长度为y-2的超边合并为长度为y的超边;y的取值范围为5至n-1的正整数。Wherein, the hyperedge merging process is as follows: in the set X * , any hyperedge with a length of y-1 is randomly selected, and if no hyperedge can be grown into a set T composed of hyperedges with a length of y-1 and a length of y-2 * Arbitrarily select a hyperedge with length y-2, if any hyperedge with length y-1 and any hyperedge with length y-2 contain y-3 common target nodes, then any A hyperedge of length y-1 and an arbitrary hyperedge of length y-2 are merged into a hyperedge of length y; the value of y is a positive integer ranging from 5 to n-1. 9.一种目标跟踪装置,其特征在于,包括:9. A target tracking device, characterized in that it comprises: 位移范围获取模块,用于获取管制视频中连续n帧图像内的目标节点在帧间间隔分别为1,2,…,n-1时的位移范围;The displacement range acquisition module is used to obtain the displacement range of the target nodes in the continuous n-frame images in the control video when the inter-frame intervals are 1, 2, ..., n-1; 跟踪轨迹获取模块,用于根据各所述目标节点所在的帧在所述管制视频中的位置及各所述目标节点在帧间间隔分别为1,2,…,n-1时的位移范围,对所述n帧图像中的各所述目标节点进行关联,得到当前目标跟踪轨迹;The tracking trajectory acquisition module is used for according to the position of the frame where each target node is located in the control video and the displacement range of each target node when the inter-frame interval is 1, 2, ..., n-1, Associating each of the target nodes in the n frames of images to obtain the current target tracking trajectory; 标记模块,用于在所述管制视频连续n帧图像中,采用相同的标记显示所述当前目标跟踪轨迹中同一条目标跟踪轨迹上对应的目标节点;A marking module, configured to use the same mark to display the corresponding target nodes on the same target tracking track in the current target tracking track in the continuous n-frame images of the control video; 其中n为大于3的预设帧数;Where n is a preset number of frames greater than 3; 所述跟踪轨迹获取模块,具体用于:The tracking trajectory acquisition module is specifically used for: 在管制视频连续n帧图像中,确定满足两两不在同一帧内且坐标距离满足位移范围的任意三个目标节点,则对任意三个目标节点进行超边连接,得到所有长度为3的超边组成的集合P;In the continuous n-frame images of the controlled video, if any three target nodes are determined to satisfy that no two are in the same frame and the coordinate distance satisfies the displacement range, then perform hyperedge connection on any three target nodes to obtain all hyperedges with a length of 3 The set P composed of; 在集合P中,进行超边生长流程,得到所有长度为4的超边组成的集合Q;In the set P, perform the hyperedge growth process to obtain the set Q composed of all hyperedges with a length of 4; 多次进行超边生长流程,直至得到所有长度为n的超边,并将所有超边作为当前目标跟踪轨迹,n大于3;Perform the hyperedge growth process multiple times until all hyperedges with a length of n are obtained, and all hyperedges are used as the current target tracking trajectory, and n is greater than 3; 其中,超边生长流程为,在长度为x的超边组成的集合中,确定满足每两条超边之间的公共目标节点个数均为x-1的x+1条超边,且x+1条超边共包括x+1个不同的目标节点,则将x+1条超边进行超边连接得到长度为x+1的超边;Among them, the process of hyperedge growth is, in the set of hyperedges with a length of x, determine x+1 hyperedges that satisfy the number of common target nodes between each two hyperedges is x-1, and x The +1 hyperedges include x+1 different target nodes in total, then the x+1 hyperedges are hyperedge-connected to obtain a hyperedge with a length of x+1; x为3至n-1的正整数。x is a positive integer from 3 to n-1.
CN201510847575.1A 2015-11-27 2015-11-27 Method for tracking target and device Active CN105469429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510847575.1A CN105469429B (en) 2015-11-27 2015-11-27 Method for tracking target and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510847575.1A CN105469429B (en) 2015-11-27 2015-11-27 Method for tracking target and device

Publications (2)

Publication Number Publication Date
CN105469429A CN105469429A (en) 2016-04-06
CN105469429B true CN105469429B (en) 2018-06-01

Family

ID=55607088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510847575.1A Active CN105469429B (en) 2015-11-27 2015-11-27 Method for tracking target and device

Country Status (1)

Country Link
CN (1) CN105469429B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875465B (en) * 2017-05-26 2020-12-11 北京旷视科技有限公司 Multi-target tracking method, multi-target tracking device and non-volatile storage medium
CN107741231B (en) * 2017-10-11 2020-11-27 福州大学 A fast ranging method for multi-moving targets based on machine vision
CN108509576B (en) * 2018-03-28 2021-04-20 浙江知水信息技术有限公司 Electronic map-based filtering optimization method for wrong point positions of patrol track

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8320613B2 (en) * 2008-06-04 2012-11-27 Lockheed Martin Corporation Detecting and tracking targets in images based on estimated target geometry
CN101751679A (en) * 2009-12-24 2010-06-23 北京中星微电子有限公司 Sorting method, detecting method and device of moving object
CN103778647A (en) * 2014-02-14 2014-05-07 中国科学院自动化研究所 Multi-target tracking method based on layered hypergraph optimization
CN103914685B (en) * 2014-03-07 2018-06-22 北京邮电大学 A kind of multi-object tracking method cliqued graph based on broad sense minimum with TABU search
CN103914854B (en) * 2014-03-24 2016-08-17 河海大学 A kind of image sequence target association and orbit generation method
CN103927763B (en) * 2014-03-24 2016-08-17 河海大学 A kind of image sequence multiple target tracking track identification processing method
CN104915970B (en) * 2015-06-12 2019-03-29 南京邮电大学 A kind of multi-object tracking method based on Track association

Also Published As

Publication number Publication date
CN105469429A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN103824070B (en) A kind of rapid pedestrian detection method based on computer vision
CN103530874B (en) People stream counting method based on Kinect
US20170344855A1 (en) Method of predicting traffic collisions and system thereof
CN110472467A (en) The detection method for transport hub critical object based on YOLO v3
CN109509210A (en) Barrier tracking and device
CN113112526B (en) Target tracking method, device, equipment and medium
CN104794733A (en) Object tracking method and device
CN104331873A (en) Method for detecting road from single image
CN105469429B (en) Method for tracking target and device
CN105893621B (en) Goal behavior law mining method based on multidimensional track cluster
CN109828267A (en) The Intelligent Mobile Robot detection of obstacles and distance measuring method of Case-based Reasoning segmentation and depth camera
CN104794435A (en) Unmanned aerial vehicle to ground moving target detection method based on vision
CN103778645A (en) Circular target real-time tracking method based on images
CN104134078A (en) Automatic selection method for classifiers in people flow counting system
CN112748451B (en) Track processing method and device, electronic equipment and medium
WO2023273344A1 (en) Vehicle line crossing recognition method and apparatus, electronic device, and storage medium
EP3238173B1 (en) Method and device for detecting an overhead cable from an aerial vessel
WO2015184768A1 (en) Method and device for generating video abstract
CN106780539A (en) Robot vision tracking
CN112711255A (en) Mobile robot obstacle avoidance method, control device and storage medium
EP4080479A2 (en) Method for identifying traffic light, device, cloud control platform and vehicle-road coordination system
Pandilwar et al. Moving Vehicle Detection with Real Time Speed Estimation Using Deep Learning Techniques
CN106355605A (en) Method for filtering group motion consistency
CN118053322A (en) Engineering vehicle collision detection early warning system and method based on computer vision
TW202121332A (en) Method of acquiring detection zone in image and method of determining zone usage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant