CN114283174A - Moving target tracking method and device and electronic equipment - Google Patents
Moving target tracking method and device and electronic equipment Download PDFInfo
- Publication number
- CN114283174A CN114283174A CN202111600617.3A CN202111600617A CN114283174A CN 114283174 A CN114283174 A CN 114283174A CN 202111600617 A CN202111600617 A CN 202111600617A CN 114283174 A CN114283174 A CN 114283174A
- Authority
- CN
- China
- Prior art keywords
- edge
- image
- processing
- enhanced image
- moving target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 107
- 238000012545 processing Methods 0.000 claims abstract description 106
- 238000001514 detection method Methods 0.000 claims abstract description 46
- 238000001914 filtration Methods 0.000 claims abstract description 35
- 238000007781 pre-processing Methods 0.000 claims abstract description 34
- 230000008569 process Effects 0.000 claims abstract description 33
- 238000005070 sampling Methods 0.000 claims abstract description 32
- 230000033001 locomotion Effects 0.000 claims description 21
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 10
- 238000003708 edge detection Methods 0.000 claims description 9
- 239000012530 fluid Substances 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 10
- 230000006399 behavior Effects 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 230000009466 transformation Effects 0.000 description 5
- 238000006073 displacement reaction Methods 0.000 description 4
- 230000001788 irregular Effects 0.000 description 4
- 238000010276 construction Methods 0.000 description 3
- 238000000354 decomposition reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 239000006260 foam Substances 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000001131 transforming effect Effects 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
本发明提供了一种运动目标追踪方法、装置和电子设备。其中,该方法应用于高空抛物检测系统,该方法包括:获取原始图像;对原始图像进行预处理,得到边缘增强的图像;其中,预处理包括降采样处理和滤波处理;对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。通过滤波处理可以尽可能地保证抛物的完整性并且减少背景的影响,通过帧间差分处理可以根据相邻帧图像有效检测出正在下落的物体是否发生形变或解体,对于发生形变或解体的目标能够继续准确的进行追踪检测,从而提高高空抛物过程中流体抛物的检测精准度,使得高空抛物检测系统能够有效准确的工作。
The present invention provides a moving target tracking method, device and electronic device. Wherein, the method is applied to a high-altitude parabolic detection system, and the method includes: acquiring an original image; preprocessing the original image to obtain an edge-enhanced image; wherein, the preprocessing includes down-sampling processing and filtering processing; The target tracking processing obtains the moving target in the edge-enhanced image; wherein, the target tracking processing includes inter-frame difference processing and KLT feature point tracking processing. Through the filtering process, the integrity of the parabola can be guaranteed as much as possible and the influence of the background can be reduced. Through the inter-frame difference processing, it can effectively detect whether the falling object is deformed or disintegrated according to the adjacent frame images. Continue to track and detect accurately, thereby improving the detection accuracy of fluid parabola in the process of high-altitude parabola, so that the high-altitude parabola detection system can work effectively and accurately.
Description
技术领域technical field
本发明涉及图像处理的技术领域,尤其是涉及一种运动目标追踪方法、装置和电子设备。The present invention relates to the technical field of image processing, and in particular, to a moving target tracking method, device and electronic device.
背景技术Background technique
随着城市化进程的加快,一座座高楼大厦拔地而起,随着带来的高空抛物问题十分严峻。高空抛物作为城市不文明行为的同时,它所带来的社会危害也十分巨大。由于高空抛物不文明行为的实施场所多为高空楼层,抛物的下降速度极快,抛物的时间极短,抛物者更是善于隐匿抛物行为,导致相关部分难以实现有效取证及准确定责,因此需要高空抛物监测预警系统。With the acceleration of the urbanization process, high-rise buildings are rising from the ground, and the problem of high-altitude parabola is very serious. As an urban uncivilized behavior, the high-altitude parabola also brings great social harm. Since most of the uncivilized behaviors of high-altitude parabolic behavior are carried out on high-altitude floors, the descending speed of the parabola is extremely fast, and the time of the parabola is extremely short. High-altitude parabolic monitoring and early warning system.
目前,现有的高空抛物监测预警系统大多利用基于视频监控的图像捕捉技术,通过在高层建筑的楼顶或者建筑周围安装摄像头来识别高空抛物的发生位置和时间,然而,上述高空抛物监测预警系统主要追踪的物体是刚体,而实际抛下的物体有可能不是刚体,自由下落的过程还会伴随着运动变形、解体、分解等,例如:抛下装在垃圾袋的果皮或装在泡沫袋里的建筑垃圾等,这些抛物的降落会伴随着外表不规则的形变,影响抛物检测系统的检测。At present, most of the existing high-altitude parabolic monitoring and early warning systems use image capture technology based on video surveillance to identify the location and time of high-altitude parabolas by installing cameras on the roof of high-rise buildings or around buildings. However, the above-mentioned high-altitude parabolic monitoring and early warning systems The main tracked object is a rigid body, and the object actually thrown may not be a rigid body. The process of free fall will also be accompanied by motion deformation, disintegration, decomposition, etc. The landing of these parabolas will be accompanied by irregular surface deformation, which will affect the detection of the parabolic detection system.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明的目的在于提供一种运动目标追踪方法、装置和电子设备,以提高高空抛物过程中流体抛物的检测精准度。In view of this, the purpose of the present invention is to provide a moving target tracking method, device and electronic device, so as to improve the detection accuracy of fluid parabola in the process of high-altitude parabola.
第一方面,本发明实施例提供了一种运动目标追踪方法,应用于高空抛物检测系统,方法包括:获取原始图像;对原始图像进行预处理,得到边缘增强的图像;其中,预处理包括降采样处理和滤波处理;对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。In a first aspect, an embodiment of the present invention provides a moving target tracking method, which is applied to a high-altitude parabolic detection system. The method includes: acquiring an original image; preprocessing the original image to obtain an edge-enhanced image; wherein the preprocessing includes reducing Sampling processing and filtering processing; target tracking processing is performed on the edge-enhanced image to obtain a moving target in the edge-enhanced image; wherein, the target tracking processing includes inter-frame difference processing and KLT feature point tracking processing.
在本发明较佳的实施例中,上述对原始图像进行预处理,得到边缘增强的图像的步骤,包括:对原始图像进行降采样处理,降低原始图像的采样率为目标采样率;对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。In a preferred embodiment of the present invention, the above-mentioned steps of preprocessing the original image to obtain an edge-enhanced image include: performing down-sampling processing on the original image to reduce the sampling rate of the original image to the target sampling rate; down-sampling The processed original image is filtered to obtain an edge-enhanced image.
在本发明较佳的实施例中,上述对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像的步骤,包括:依次通过预设的Lee滤波器、Kuwahara滤波器和高斯滤波器对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。In a preferred embodiment of the present invention, the above-mentioned steps of performing filtering processing on the original image after downsampling processing to obtain an edge-enhanced image include: sequentially passing the preset Lee filter, Kuwahara filter and Gaussian filter to The original image after the down-sampling process is filtered to obtain an edge-enhanced image.
在本发明较佳的实施例中,上述Lee滤波器的模板为15×15,Lee滤波器的噪声方差为155;上述Kuwahara滤波器的模板为13×13;上述高斯滤波器为零均值滤波器。In a preferred embodiment of the present invention, the template of the above-mentioned Lee filter is 15×15, the noise variance of the Lee filter is 155; the template of the above-mentioned Kuwahara filter is 13×13; the above-mentioned Gaussian filter is a zero mean filter .
在本发明较佳的实施例中,上述依次通过预设的Lee滤波器、Kuwahara滤波器和高斯滤波器对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像的步骤之后,方法还包括:通过预设的Canny边缘检测算子采集边缘增强的图像的边缘信息。In a preferred embodiment of the present invention, after the above-mentioned steps of filtering the original image after downsampling processing through the preset Lee filter, Kuwahara filter and Gaussian filter to obtain the edge-enhanced image, the method also further Including: collecting the edge information of the edge-enhanced image through the preset Canny edge detection operator.
在本发明较佳的实施例中,上述对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标的步骤,包括:确定边缘增强的图像的原始帧图像;对原始帧图像进行帧间差分处理,检测运动目标的特征点;对运动目标的征点进行KLT特征点追踪处理,得到边缘增强的图像中的运动目标。In a preferred embodiment of the present invention, the above-mentioned steps of performing target tracking processing on the edge-enhanced image to obtain the moving object in the edge-enhanced image include: determining the original frame image of the edge-enhanced image; Inter-frame difference processing detects the feature points of moving objects; KLT feature point tracking processing is performed on the feature points of moving objects to obtain moving objects in edge-enhanced images.
在本发明较佳的实施例中,上述对原始帧图像进行帧间差分处理,得到运动目标的征点的步骤,包括:计算原始帧图像中的相邻帧图像的对应位置的各个像素点的灰度值的差的绝对值;将绝对值大于预设阈值的像素点作为运动目标的特征点。In a preferred embodiment of the present invention, the above-mentioned step of performing inter-frame difference processing on the original frame image to obtain the feature points of the moving target includes: calculating the pixel points of the corresponding positions of adjacent frame images in the original frame image. The absolute value of the difference between the grayscale values; the pixel points whose absolute value is greater than the preset threshold are used as the feature points of the moving target.
在本发明较佳的实施例中,上述对运动目标的特征点进行KLT特征点追踪处理,得到边缘增强的图像中的运动目标的步骤之后,方法还包括:构造边缘增强的图像中的相邻帧图像的变换仿射模型;基于变换仿射模型确定边缘增强的图像的各个帧图像中的运动目标的特征点位置;基于运动目标的特征点位置确定运动目标的运动区域。In a preferred embodiment of the present invention, after the above-mentioned step of performing KLT feature point tracking processing on the feature points of the moving target to obtain the moving target in the edge-enhanced image, the method further includes: constructing adjacent edges in the edge-enhanced image. Transforming affine model of frame images; determining feature point positions of moving objects in each frame image of the edge-enhanced image based on the transforming affine model; determining moving regions of moving objects based on the feature point positions of moving objects.
第二方面,本发明实施例还提供一种运动目标追踪装置,应用于高空抛物检测系统,装置包括:图像获取模块,用于获取原始图像;预处理模块,用于对原始图像进行预处理,得到边缘增强的图像;其中,预处理包括降采样处理和滤波处理;追踪检测模块,用于对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。In a second aspect, an embodiment of the present invention further provides a moving target tracking device, which is applied to a high-altitude parabolic detection system. The device includes: an image acquisition module for acquiring an original image; a preprocessing module for preprocessing the original image, obtaining an edge-enhanced image; wherein, the preprocessing includes down-sampling processing and filtering processing; a tracking detection module is used to perform target tracking processing on the edge-enhanced image to obtain a moving target in the edge-enhanced image; wherein, the target tracking processing includes Inter-frame difference processing and KLT feature point tracking processing.
第三方面,本发明实施例还提供一种电子设备,包括处理器和存储器,存储器存储有能够被处理器执行的计算机可执行指令,处理器执行计算机可执行指令以实现上述的运动目标追踪方法的步骤。In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-mentioned moving target tracking method A step of.
第四方面,本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有计算机可执行指令,计算机可执行指令在被处理器调用和执行时,计算机可执行指令促使处理器实现上述的运动目标追踪方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are invoked and executed by the processor, the computer-executable instructions cause the processor to Implement the steps of the above-mentioned moving target tracking method.
本发明实施例带来了以下有益效果:The embodiments of the present invention have brought the following beneficial effects:
本发明实施例提供的一种运动目标追踪方法、装置和电子设备,可以通过降采样处理和滤波处理对原始图像进行预处理,得到边缘增强的图像;通过帧间差分处理和KLT特征点追踪处理对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标。该方式中,通过滤波处理可以尽可能地保证抛物的完整性并且减少背景的影响,通过帧间差分处理可以根据相邻帧图像有效检测出正在下落的物体是否发生形变或解体,对于发生形变或解体的目标能够继续准确的进行追踪检测,从而提高高空抛物过程中流体抛物的检测精准度,使得高空抛物检测系统能够有效准确的工作。A moving target tracking method, device, and electronic device provided by the embodiments of the present invention can preprocess an original image through downsampling processing and filtering processing to obtain an edge-enhanced image; through frame difference processing and KLT feature point tracking processing The object tracking process is performed on the edge-enhanced image to obtain the moving object in the edge-enhanced image. In this method, the integrity of the parabola can be ensured as much as possible and the influence of the background can be reduced as much as possible through the filtering process, and whether the falling object is deformed or disintegrated can be effectively detected according to the adjacent frame images through the inter-frame difference processing. The disintegrated target can continue to be accurately tracked and detected, thereby improving the detection accuracy of the fluid parabola in the process of high-altitude parabola, so that the high-altitude parabola detection system can work effectively and accurately.
本公开的其他特征和优点将在随后的说明书中阐述,或者,部分特征和优点可以从说明书推知或毫无疑义地确定,或者通过实施本公开的上述技术即可得知。Additional features and advantages of the present disclosure will be set forth in the description that follows, or some may be inferred or unambiguously determined from the description, or may be learned by practicing the above-described techniques of the present disclosure.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the specific embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
图1为本发明实施例提供的一种高空抛物检测系统的示意图;1 is a schematic diagram of a high-altitude parabolic detection system according to an embodiment of the present invention;
图2为本发明实施例提供的一种运动目标追踪方法的流程图;2 is a flowchart of a method for tracking a moving target according to an embodiment of the present invention;
图3为本发明实施例提供的另一种运动目标追踪方法的流程图;3 is a flowchart of another moving target tracking method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种对原始图像进行预处理的方式的示意图;4 is a schematic diagram of a method for preprocessing an original image according to an embodiment of the present invention;
图5为本发明实施例提供的一种对边缘增强的图像进行目标追踪处理的方式的示意图;5 is a schematic diagram of a method for performing target tracking processing on an edge-enhanced image according to an embodiment of the present invention;
图6为本发明实施例提供的一种帧间差分处理的方式的示意图;6 is a schematic diagram of a method for inter-frame difference processing provided by an embodiment of the present invention;
图7为本发明实施例提供的一种运动目标追踪装置的结构示意图;7 is a schematic structural diagram of a moving target tracking device according to an embodiment of the present invention;
图8为本发明实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. example. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
目前,随着城市化进程的加快,一座座高楼大厦拔地而起,随着带来的高空抛物问题十分严峻。高空抛物作为城市不文明行为的同时,它所带来的社会危害也十分巨大。由于高空抛物不文明行为的实施场所多为高空楼层,抛物的下降速度极快,抛物的时间极短,抛物者更是善于隐匿抛物行为,导致相关部分难以实现有效取证及准确定责,因此需要高空抛物监测预警系统。At present, with the acceleration of urbanization, high-rise buildings are rising, and the problem of high-altitude parabola is very serious. As an urban uncivilized behavior, the high-altitude parabola also brings great social harm. Since most of the uncivilized behaviors of high-altitude parabolic behavior are carried out on high-altitude floors, the descending speed of the parabola is extremely fast, and the time of the parabola is extremely short. High-altitude parabolic monitoring and early warning system.
现有的高空抛物监测预警系统大多利用基于视频监控的图像捕捉技术,通过在高层建筑的楼顶或者建筑周围安装摄像头来识别高空抛物的发生位置和时间,这种技术受摄像头监控角度和楼宇高度限制,以及雨雾、光线等天气环境因素的影响,在不良环境因素情况下,无法快速准确的锁定高空抛物发生的具体位置。Most of the existing high-altitude parabolic monitoring and early warning systems use video surveillance-based image capture technology to identify the location and time of high-altitude parabolas by installing cameras on the roof of high-rise buildings or around buildings. This technology is monitored by the camera angle and building height. Restrictions, as well as the influence of weather and environmental factors such as rain, fog and light, in the case of adverse environmental factors, it is impossible to quickly and accurately lock the specific location of the high-altitude parabola.
复杂环境条件下的运动目标状态估计问题是准确目标跟踪的一个重要难点,是有效进行高空抛物检测的一个重要难点。The estimation of the state of a moving target under complex environmental conditions is an important difficulty in accurate target tracking and an important difficulty in effectively detecting high-altitude paraboloids.
现有的不少研究中,主要追踪的物体是刚体,而实际抛下的物体有可能不是刚体,自由下落的过程还会伴随着运动变形、解体、分解等,例如抛下装在垃圾袋的果皮、装在泡沫袋里的建筑垃圾等,这些抛物的降落会伴随着外表不规则的形变,影响抛物检测系统的检测。In many existing studies, the main tracked object is a rigid body, and the object actually thrown may not be a rigid body. The process of free fall will also be accompanied by motion deformation, disintegration, decomposition, etc., such as throwing objects in garbage bags. Fruit peels, construction waste packed in foam bags, etc. The landing of these parabolas will be accompanied by irregular deformation of the appearance, which will affect the detection of the parabola detection system.
基于此,本发明实施例提供的一种运动目标追踪方法、装置和电子设备,具体涉及一种抛物检测算法,可以提高高空抛物过程中流体抛物的检测精准度。Based on this, the embodiments of the present invention provide a method, device and electronic device for tracking a moving target, in particular to a parabola detection algorithm, which can improve the detection accuracy of fluid parabola in the process of high-altitude parabola.
为便于对本实施例进行理解,首先对本发明实施例所公开的一种运动目标追踪方法进行详细介绍。In order to facilitate the understanding of this embodiment, a moving target tracking method disclosed in the embodiment of the present invention is first introduced in detail.
本实施例提供了一种运动目标追踪方法,该运动目标追踪方法应用于高空抛物检测系统。参见图1所示的一种高空抛物检测系统的示意图,如图1所示,高空抛物检测系统一般由数据采集模块、运动目标检测模块、运动目标追踪模块、抛物判断模块和结果显示报警模块组成。This embodiment provides a moving target tracking method, and the moving target tracking method is applied to a high-altitude parabolic detection system. Referring to the schematic diagram of a high-altitude parabolic detection system shown in Figure 1, the high-altitude parabolic detection system is generally composed of a data acquisition module, a moving target detection module, a moving target tracking module, a parabolic judgment module and a result display alarm module. .
其中,数据采集模块主要用于获取视频帧序列、视频流解码等。运动目检测模块主要用于视频图像预处理、运动目标检测、目标特征提取等,获取视频图像中的抛物特征信息。运动目标追踪模块主要用于运动轨迹获取,具体来说有运动轨迹预测、跟踪模块更新、运动轨迹匹配等,获取视频图像中的抛物运动轨迹。抛物判断模块用于抛物判定。结果显示报警模块用于高空抛物行为报警、高空抛物结果显示、高空抛物视频保存等,根据判断结果做出处理,若判断为高空抛物行为,则保存抛物视频,并及时报警提醒,供事后追责用;若判断为其他的东西,则不作处理。Among them, the data acquisition module is mainly used to obtain video frame sequence, video stream decoding and so on. The moving eye detection module is mainly used for video image preprocessing, moving target detection, target feature extraction, etc., to obtain parabolic feature information in video images. The moving target tracking module is mainly used for motion trajectory acquisition, specifically, motion trajectory prediction, tracking module update, motion trajectory matching, etc., to obtain the parabolic motion trajectory in the video image. The parabolic judgment module is used for parabolic judgment. The result display alarm module is used for high-altitude parabolic behavior alarm, high-altitude parabolic result display, high-altitude parabolic video storage, etc., and the processing is made according to the judgment result. If it is judged to be high-altitude parabolic behavior, the parabolic video will be saved, and the alarm will be reminded in time for later accountability. Use; if it is judged to be something else, it will not be dealt with.
对于高空抛物检测系统来说,运动目标追踪通过对目标的位置、速度、形状、纹理等相关特征进行处理和反馈,进而实现对运动目标在视频图像序列中实时位置和运动路径的识别和预测,是高空抛物检测系统中的重要组成部分。运动目标追踪算法一般包括三个部分,目标的特征提取、相似性度量计算和目标位置匹配。For the high-altitude parabola detection system, the moving target tracking process and feedback the relevant features of the target, such as the position, speed, shape, texture, etc., to realize the recognition and prediction of the real-time position and movement path of the moving target in the video image sequence. It is an important part of the high-altitude parabolic detection system. The moving target tracking algorithm generally includes three parts: target feature extraction, similarity metric calculation and target position matching.
现有的不少研究中,主要追踪的物体是刚体,而实际抛下的物体有可能不是刚体,自由下落的过程还会伴随着运动变形、解体、分解等,例如抛下装在垃圾袋的果皮、装在泡沫袋里的建筑垃圾等,这些抛物的降落会伴随着外表不规则的形变,影响抛物检测系统的检测。In many existing studies, the main tracked object is a rigid body, and the object actually thrown may not be a rigid body. The process of free fall will also be accompanied by motion deformation, disintegration, decomposition, etc., such as throwing objects in garbage bags. Fruit peels, construction waste packed in foam bags, etc. The landing of these parabolas will be accompanied by irregular deformation of the appearance, which will affect the detection of the parabola detection system.
基于上述描述,参见图2所示的一种运动目标追踪方法的流程图,该运动目标追踪方法包括如下步骤:Based on the above description, referring to the flowchart of a method for tracking a moving target shown in FIG. 2 , the method for tracking a moving target includes the following steps:
步骤S200,获取原始图像。Step S200, acquiring the original image.
本发明实施例中的原始图案可以为视频帧序列或者解码后的视频流,包括多个视频帧或者图像帧。The original pattern in this embodiment of the present invention may be a video frame sequence or a decoded video stream, including multiple video frames or image frames.
步骤S202,对原始图像进行预处理,得到边缘增强的图像;其中,预处理包括降采样处理和滤波处理。Step S202 , preprocessing the original image to obtain an edge-enhanced image; wherein, the preprocessing includes downsampling processing and filtering processing.
本发明实施例中的高空抛物检测系统可以包括预处理模块和追踪检测模块,其中,预处理模块用于对原始图像进行预处理,追踪检测模块用于对边缘增强的图像进行目标追踪处理。The high-altitude parabolic detection system in the embodiment of the present invention may include a preprocessing module and a tracking detection module, wherein the preprocessing module is used to preprocess the original image, and the tracking detection module is used to perform target tracking processing on the edge-enhanced image.
具体地,将采样处理是指降低原始图像的各个图像帧的采样率,例如:可以降低原始图像的各个图像帧的采样率为800×800。本发明实施例中的预处理模块可以包含多个滤波器,通过滤波器对将采样处理之后的图像的进行边缘增强处理,得到边缘增强的图像,并且还可以采集边缘增强的图像的边缘信息。Specifically, the sampling process refers to reducing the sampling rate of each image frame of the original image, for example, the sampling rate of each image frame of the original image may be reduced to 800×800. The preprocessing module in the embodiment of the present invention may include a plurality of filters, and the edge enhancement processing of the sampled image is performed through the filters to obtain an edge enhanced image, and edge information of the edge enhanced image may also be collected.
步骤S204,对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。Step S204, performing target tracking processing on the edge-enhanced image to obtain a moving target in the edge-enhanced image; wherein, the target tracking processing includes inter-frame difference processing and KLT feature point tracking processing.
本发明实施例可以通过帧间差分处理的方式来提升流体的追踪效果。其中,帧间差分处理是一种通过对视频图像序列中相邻两帧作差分运算来获得运动目标轮廓的方法,它可以很好地适用于存在多个运动目标和摄像机移动的情况。当监控场景中出现异常物体运动时,帧与帧之间会出现较为明显的差别,两帧相减,得到两帧图像亮度差的绝对值,判断它是否大于阈值来分析视频或图像序列的运动特性,确定图像序列中有无物体运动。图像序列逐帧的差分,相当于对图像序列进行了时域下的高通滤波。In the embodiment of the present invention, the tracking effect of the fluid can be improved by means of difference processing between frames. Among them, inter-frame difference processing is a method to obtain the outline of moving objects by performing difference operations on two adjacent frames in a video image sequence, which can be well applied to the situation where there are multiple moving objects and cameras moving. When there is abnormal object motion in the monitoring scene, there will be a more obvious difference between the frames. Subtract the two frames to obtain the absolute value of the brightness difference between the two frames, and determine whether it is greater than the threshold to analyze the motion of the video or image sequence. feature to determine whether there is object motion in the image sequence. The frame-by-frame difference of the image sequence is equivalent to performing high-pass filtering on the image sequence in the time domain.
KLT(Kanade Lucas Tomasi)特征点追踪处理是一种光流追踪方法,可以通过先在前后两帧图像里分别建立一个固定大小窗口,然后找到让两个窗口间像素强度差的平方和最小的位移,将窗口内像素的移动近似为这样的位移向量,从而进行目标追踪。KLT (Kanade Lucas Tomasi) feature point tracking processing is an optical flow tracking method. It can first establish a fixed-size window in the two frames of images before and after, and then find the displacement that minimizes the sum of the squares of the pixel intensity differences between the two windows. , the movement of pixels in the window is approximated as such a displacement vector, so as to perform target tracking.
本发明实施例提供的一种运动目标追踪方法,可以通过降采样处理和滤波处理对原始图像进行预处理,得到边缘增强的图像;通过帧间差分处理和KLT特征点追踪处理对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标。该方式中,通过滤波处理可以尽可能地保证抛物的完整性并且减少背景的影响,通过帧间差分处理可以根据相邻帧图像有效检测出正在下落的物体是否发生形变或解体,对于发生形变或解体的目标能够继续准确的进行追踪检测,从而提高高空抛物过程中流体抛物的检测精准度,使得高空抛物检测系统能够有效准确的工作。In a moving target tracking method provided by an embodiment of the present invention, an original image can be preprocessed through downsampling processing and filtering processing to obtain an edge-enhanced image; an edge-enhanced image can be obtained through inter-frame difference processing and KLT feature point tracking processing. The target tracking process is performed to obtain the moving target in the edge-enhanced image. In this method, the integrity of the parabola can be ensured as much as possible and the influence of the background can be reduced as much as possible through the filtering process, and whether the falling object is deformed or disintegrated can be effectively detected according to the adjacent frame images through the inter-frame difference processing. The disintegrated target can continue to be accurately tracked and detected, thereby improving the detection accuracy of the fluid parabola in the process of high-altitude parabola, so that the high-altitude parabola detection system can work effectively and accurately.
本实施例提供了另一种运动目标追踪方法,该方法在上述实施例的基础上实现;本实施例重点描述预处理的具体实施方式。参见图3所示的另一种运动目标追踪方法的流程图,本实施例中的运动目标追踪方法包括如下步骤:This embodiment provides another moving target tracking method, which is implemented on the basis of the foregoing embodiment; this embodiment focuses on describing the specific implementation of preprocessing. Referring to the flowchart of another moving target tracking method shown in FIG. 3 , the moving target tracking method in this embodiment includes the following steps:
步骤S300,获取原始图像。Step S300, acquiring the original image.
步骤S302,对原始图像进行降采样处理,降低原始图像的采样率为目标采样率。Step S302, performing down-sampling processing on the original image to reduce the sampling rate of the original image to the target sampling rate.
参见图4所示的一种对原始图像进行预处理的方式的示意图,预处理可以首先将原始图像降采样到每帧图像的采样率为目标采样率,例如:600pixel×1000pixel。Referring to the schematic diagram of a method for preprocessing the original image shown in FIG. 4 , the preprocessing may first downsample the original image to the target sampling rate of each frame of image, for example: 600pixel×1000pixel.
步骤S304,对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。Step S304 , filtering the original image after the down-sampling process to obtain an edge-enhanced image.
具体地,可以通过下述步骤对降采样处理之后的原始图像进行滤波处理:依次通过预设的Lee滤波器、Kuwahara滤波器和高斯滤波器对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。Specifically, the original image after the down-sampling process can be filtered through the following steps: the original image after the down-sampling process is filtered through the preset Lee filter, the Kuwahara filter and the Gaussian filter in turn to obtain the edge Enhanced image.
如图4所示,可以对降采样处理之后的原始图像进行两个阶段的预处理:边缘增强和边缘检测。其中,首先可以选用模板为15×15,噪声方差为155的Lee滤波器进行滤波处理,之后可以选用模板为13×13的Kuwahara滤波器进行滤波处理,最后可以选用零均值的高斯滤波器进行滤波处理,得到边缘增强的图像。As shown in Figure 4, two stages of preprocessing can be performed on the original image after downsampling: edge enhancement and edge detection. Among them, the Lee filter with a template of 15×15 and a noise variance of 155 can be used for filtering first, then the Kuwahara filter with a template of 13×13 can be used for filtering, and finally a Gaussian filter with zero mean value can be used for filtering. processing to obtain an edge-enhanced image.
其中,Lee滤波器是一种图像去噪滤波器,具有很好的去噪效果。Lee滤波器可以结合各种小波有效去除图像噪声。Lee滤波是利用图像局部统计特性进行图像斑点滤波的典型方法之一,其是基于完全发育的斑点噪声模型,选择一定长度的窗口作为局部区域,假定先验均值和方差可以通过计算局域的均值和方差得到。Among them, the Lee filter is an image denoising filter with good denoising effect. The Lee filter can effectively remove image noise by combining various wavelets. Lee filtering is one of the typical methods for image speckle filtering using the local statistical properties of images. It is based on a fully developed speckle noise model and selects a window of a certain length as a local area. It is assumed that the prior mean and variance can be calculated by calculating the local mean and variance is obtained.
Kuwahara滤波器的基本原理是:计算图像模板中邻域内的均值和方差,选择图像灰度值较为均匀的区域的均值替代模板中心像素灰度值,从而实现滤波效果。The basic principle of the Kuwahara filter is to calculate the mean and variance in the neighborhood of the image template, and select the mean value of the area with relatively uniform gray value of the image to replace the gray value of the central pixel of the template, so as to achieve the filtering effect.
高斯滤波是一种线性平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程。高斯滤波就是对整幅图像进行加权平均的过程,每一个像素点的值,都由其本身和邻域内的其他像素值经过加权平均后得到。高斯滤波的具体操作是:用一个模板(或称卷积、掩模)扫描图像中的每一个像素,用模板确定的邻域内像素的加权平均灰度值去替代模板中心像素点的值。Gaussian filtering is a linear smoothing filter, suitable for removing Gaussian noise, and is widely used in the noise reduction process of image processing. Gaussian filtering is a process of weighted averaging of the entire image. The value of each pixel is obtained by weighted averaging of itself and other pixel values in its neighborhood. The specific operation of Gaussian filtering is: use a template (or convolution, mask) to scan each pixel in the image, and replace the value of the center pixel of the template with the weighted average gray value of the pixels in the neighborhood determined by the template.
另外,如图4所示,本实施例还可以采用Canny边缘检测算子检测边缘增强的图像的边缘信息,例如:通过预设的Canny边缘检测算子采集边缘增强的图像的边缘信息。In addition, as shown in FIG. 4 , in this embodiment, the Canny edge detection operator may also be used to detect the edge information of the edge-enhanced image. For example, the edge information of the edge-enhanced image is collected through a preset Canny edge detection operator.
其中,Canny边缘检测算子可以首先使用高斯滤波器,以平滑图像,滤除噪声。之后计算图像中每个像素点的梯度强度和方向,应用非极大值(Non-Maximum Suppression)抑制,以消除边缘检测带来的杂散响应,应用双阈值(Double-Threshold)检测来确定真实的和潜在的边缘。最后通过抑制孤立的弱边缘最终完成边缘检测,采集图像的边缘信息。Among them, the Canny edge detection operator can first use a Gaussian filter to smooth the image and filter out noise. Then calculate the gradient strength and direction of each pixel in the image, apply Non-Maximum Suppression to eliminate spurious responses caused by edge detection, and apply Double-Threshold detection to determine the real and potential edges. Finally, the edge detection is finally completed by suppressing the isolated weak edge, and the edge information of the image is collected.
该方式中,可以通过包含滤波处理的预处理,能够尽可能保证抛物的完整性以及减少背景的影响,预处理效果较好,经过上述包含滤波处理的预处理能够为后续的特征检测和追踪提供一个特征明显、误差小的输入图像。In this method, the preprocessing including filtering processing can ensure the integrity of the parabola and reduce the influence of the background as much as possible, and the preprocessing effect is good. An input image with obvious features and small errors.
步骤S306,对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。Step S306 , perform target tracking processing on the edge-enhanced image to obtain a moving target in the edge-enhanced image; wherein, the target tracking processing includes inter-frame difference processing and KLT feature point tracking processing.
具体地,本发明实施例可以通过下述步骤实现括帧间差分处理和KLT特征点追踪处理:确定边缘增强的图像的原始帧图像;对原始帧图像进行帧间差分处理,检测运动目标的特征点;对运动目标的征点进行KLT特征点追踪处理,得到边缘增强的图像中的运动目标。Specifically, in this embodiment of the present invention, frame-to-frame difference processing and KLT feature point tracking processing can be implemented through the following steps: determining the original frame image of the edge-enhanced image; performing frame-to-frame difference processing on the original frame image to detect the characteristics of the moving target point; KLT feature point tracking processing is performed on the feature points of the moving target to obtain the moving target in the edge-enhanced image.
参见图5所示的一种对边缘增强的图像进行目标追踪处理的方式的示意图,对于通过预处理得到的原始帧图像,可以首先通过帧间差分法得到抛物目标的检测特征点,例如:计算原始帧图像中的相邻帧图像的对应位置的各个像素点的灰度值的差的绝对值;将绝对值大于预设阈值的像素点作为运动目标的特征点。Referring to the schematic diagram of a method of performing target tracking processing on edge-enhanced images shown in FIG. 5, for the original frame images obtained through preprocessing, the detection feature points of the parabolic target can be obtained first through the inter-frame difference method, for example: calculating The absolute value of the difference between the grayscale values of each pixel point at the corresponding position of the adjacent frame image in the original frame image; the pixel point whose absolute value is greater than the preset threshold is used as the feature point of the moving target.
参见图6所示的一种帧间差分处理的方式的示意图,首先确定当前帧以及当前帧的上一帧作为相邻帧图像,确定当前帧和上一帧的对应位置的各个像素点的灰度值,对于每一个像素点,分别计算当前帧和上一帧的灰度值的差,然后取绝对值,基于绝对值进行图像二值化,即将绝对值大于预设阈值的像素点作为运动目标的特征点。Referring to the schematic diagram of an inter-frame difference processing method shown in FIG. 6, first determine the current frame and the previous frame of the current frame as adjacent frame images, and determine the gray level of each pixel at the corresponding position of the current frame and the previous frame. For each pixel, calculate the difference between the gray value of the current frame and the previous frame, and then take the absolute value, and perform image binarization based on the absolute value, that is, pixels whose absolute value is greater than the preset threshold are used as motion. feature points of the target.
举例来说,对于坐标(200,300),当前帧的坐标(200,300)的像素点的灰度值为200,上一帧的坐标(200,300)的像素点的灰度值为100,上述两个灰度值的差的绝对值为|100-200|=100,如果预设阈值为80,由于绝对值100大于预设阈值80,则坐标(200,300)的像素点可以作为运动目标的特征点。For example, for the coordinates (200, 300), the gray value of the pixel at the coordinates (200, 300) of the current frame is 200, and the gray value of the pixel at the coordinates (200, 300) of the previous frame is 100. , the absolute value of the difference between the above two grayscale values is |100-200|=100. If the preset threshold is 80, since the absolute value of 100 is greater than the preset threshold of 80, the pixel at the coordinates (200, 300) can be used as Feature points of moving targets.
又例如,对于坐标(100,200),当前帧的坐标(100,200)的像素点的灰度值为120,上一帧的坐标(100,200)的像素点的灰度值为160,上述两个灰度值的差的绝对值为|120-160|=40,如果预设阈值为80,由于绝对值40小于预设阈值80,则坐标(100,200)的像素点不可以作为运动目标的特征点。For another example, for the coordinates (100, 200), the gray value of the pixel at the coordinates (100, 200) of the current frame is 120, and the gray value of the pixel at the coordinates (100, 200) of the previous frame is 160. The absolute value of the difference between the above two grayscale values is |120-160|=40. If the preset threshold is 80, since the absolute value of 40 is less than the preset threshold of 80, the pixel at the coordinates (100, 200) cannot be used as Feature points of moving targets.
该方式中,由于场景中的目标在运动,目标的影像在不同图像帧中的位置不同。对连续两帧的图像进行差分运算,不同帧对应的像素点相减,判断灰度差的绝对值,当绝对值超过一定的阈值时,即可判断为运动目标。In this method, since the object in the scene is moving, the position of the image of the object in different image frames is different. The difference operation is performed on the images of two consecutive frames, the pixels corresponding to different frames are subtracted, and the absolute value of the grayscale difference is judged. When the absolute value exceeds a certain threshold, it can be judged as a moving target.
如图5所示,帧间差分处理之后,可以接着使用KLT算法进行特征点追踪。KLT算法是一种基于特征点的目标追踪算法,是光流法的一种。KLT算法具有3个前提假设:亮度恒定,保证不受亮度的影响;时间连续或者运动位移小,可以保证KLT算法能够找到点;空间一致性,邻近点有相似运动,保持相邻,可以在同一个窗口中,所有点的偏移量都相等。KLT算法的主要步骤可以为:As shown in Fig. 5, after the inter-frame difference processing, the KLT algorithm can be used for feature point tracking. KLT algorithm is a target tracking algorithm based on feature points, which is a kind of optical flow method. The KLT algorithm has three assumptions: the brightness is constant, and it is guaranteed not to be affected by the brightness; the time is continuous or the movement displacement is small, which can ensure that the KLT algorithm can find the point; the spatial consistency, the adjacent points have similar motions, remain adjacent, and can be in the same Within a window, all points are offset by the same amount. The main steps of the KLT algorithm can be:
(1)在第一帧检测Harris角点;(2)在连续帧之间每一个角点通过平移或仿射进行运动估计;(3)连接连续帧中的运动向量,得到每一个角点的轨迹;(4)对于各特征点,在各帧中判断其跟踪的好坏。有些特征可以移除(比如去除掉那些被遮挡的或者无法准确跟踪的),可以周期性(如每隔5帧)加入一些新的特征;(5)使用步骤(1)-(3)追踪新和旧的角点。(1) Detect Harris corners in the first frame; (2) Perform motion estimation for each corner by translation or affine between consecutive frames; (3) Connect the motion vectors in consecutive frames to obtain the motion of each corner (4) For each feature point, judge the quality of its tracking in each frame. Some features can be removed (such as those that are occluded or cannot be tracked accurately), and some new features can be added periodically (such as every 5 frames); (5) Use steps (1)-(3) to track new features and old corners.
在对运动目标的特征点进行KLT特征点追踪处理的步骤之后,还可以确定运动目标的特征点位置和运动区域,例如:构造边缘增强的图像中的相邻帧图像的变换仿射模型;基于变换仿射模型确定边缘增强的图像的各个帧图像中的运动目标的特征点位置;基于运动目标的特征点位置确定运动目标的运动区域。After the KLT feature point tracking process is performed on the feature points of the moving target, the position of the feature points and the moving area of the moving target can also be determined, for example: constructing a transformation affine model of the adjacent frame images in the edge-enhanced image; based on The transformation affine model determines the position of the feature point of the moving object in each frame image of the edge-enhanced image; and determines the moving area of the moving object based on the position of the feature point of the moving object.
如图5所示,首先可以通过帧间差分法获得追踪目标的特征点,然后可以使用KLT算法进行特征点追踪,最后可以采用Ransac算法构造相邻帧图像间的变换仿射模型,估计出图像的特征点位置和抛物区域(即运动目标的运动区域)。计算被追踪标记物的位移信息、翻转角度变化等相关参,最后循环计算,直到最后一帧结束。通过上述流程得到抛物的运动轨迹,可以方便高空抛物系统后续判断使用。As shown in Figure 5, first, the feature points of the tracking target can be obtained by the inter-frame difference method, and then the KLT algorithm can be used to track the feature points. Finally, the Ransac algorithm can be used to construct the transformation affine model between adjacent frame images, and the estimated image The feature point position and parabolic area (that is, the motion area of the moving target). Calculate the displacement information of the tracked marker, the change of the flip angle and other related parameters, and finally loop the calculation until the end of the last frame. The motion trajectory of the parabola is obtained through the above process, which can facilitate the subsequent judgment and use of the high-altitude parabolic system.
因为随着抛物的降落,运动目标会伴随着外表不规则的形变,如果采用时延较长的特征点检测,会漏掉分解小物体的特征。该方式中采用的帧间差分处理能根据当前帧和上一帧的细小的变化来保证不遗漏分解的小物件特征。Because as the parabola falls, the moving target will be accompanied by irregular deformation of the appearance. If the feature point detection with a long delay is used, the features of decomposing small objects will be missed. The inter-frame difference processing adopted in this method can ensure that the features of the decomposed small objects are not missed according to the small changes between the current frame and the previous frame.
本发明实施例提供的上述方法,可以通过滤波处理可以尽可能地保证抛物的完整性并且减少背景的影响,通过帧间差分处理可以根据相邻帧图像有效检测出正在下落的物体是否发生形变或解体,对于发生形变或解体的目标能够继续准确的进行追踪检测,从而提高高空抛物过程中流体抛物的检测精准度,使得高空抛物检测系统能够有效准确的工作。The above method provided by the embodiment of the present invention can ensure the integrity of the parabola as much as possible and reduce the influence of the background through filtering processing, and can effectively detect whether the falling object is deformed or not according to the adjacent frame images through the inter-frame difference processing. Disintegration, can continue to accurately track and detect the deformed or disintegrated target, thereby improving the detection accuracy of fluid parabola in the process of high-altitude parabola, so that the high-altitude parabola detection system can work effectively and accurately.
对应于上述方法实施例,本发明实施例提供了一种运动目标追踪装置,应用于高空抛物检测系统;参见图7所示的一种运动目标追踪装置的结构示意图,该运动目标追踪装置包括:Corresponding to the above method embodiments, an embodiment of the present invention provides a moving target tracking device, which is applied to a high-altitude parabola detection system; referring to a schematic structural diagram of a moving target tracking device shown in FIG. 7 , the moving target tracking device includes:
图像获取模块71,用于获取原始图像;an
预处理模块72,用于对原始图像进行预处理,得到边缘增强的图像;其中,预处理包括降采样处理和滤波处理;The
追踪检测模块73,用于对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标;其中,目标追踪处理包括帧间差分处理和KLT特征点追踪处理。The tracking
本发明实施例提供的一种运动目标追踪装置,可以通过降采样处理和滤波处理对原始图像进行预处理,得到边缘增强的图像;通过帧间差分处理和KLT特征点追踪处理对边缘增强的图像进行目标追踪处理,得到边缘增强的图像中的运动目标。该方式中,通过滤波处理可以尽可能地保证抛物的完整性并且减少背景的影响,通过帧间差分处理可以根据相邻帧图像有效检测出正在下落的物体是否发生形变或解体,对于发生形变或解体的目标能够继续准确的进行追踪检测,从而提高高空抛物过程中流体抛物的检测精准度,使得高空抛物检测系统能够有效准确的工作。A moving target tracking device provided by an embodiment of the present invention can preprocess an original image through downsampling processing and filtering processing to obtain an edge-enhanced image; and an edge-enhanced image can be processed through frame difference processing and KLT feature point tracking processing The target tracking process is performed to obtain the moving target in the edge-enhanced image. In this method, the integrity of the parabola can be ensured as much as possible and the influence of the background can be reduced as much as possible through the filtering process, and whether the falling object is deformed or disintegrated can be effectively detected according to the adjacent frame images through the inter-frame difference processing. The disintegrated target can continue to be accurately tracked and detected, thereby improving the detection accuracy of the fluid parabola in the process of high-altitude parabola, so that the high-altitude parabola detection system can work effectively and accurately.
上述预处理模块,用于对原始图像进行降采样处理,降低原始图像的采样率为目标采样率;对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。The above-mentioned preprocessing module is used for down-sampling the original image, reducing the sampling rate of the original image to the target sampling rate; filtering the original image after the down-sampling processing to obtain an edge-enhanced image.
上述预处理模块,用于依次通过预设的Lee滤波器、Kuwahara滤波器和高斯滤波器对降采样处理之后的原始图像进行滤波处理,得到边缘增强的图像。The above-mentioned preprocessing module is used to perform filtering processing on the original image after down-sampling processing through the preset Lee filter, Kuwahara filter and Gaussian filter in sequence to obtain an edge-enhanced image.
上述Lee滤波器的模板为15×15,Lee滤波器的噪声方差为155;上述Kuwahara滤波器的模板为13×13;上述高斯滤波器为零均值滤波器。The template of the above-mentioned Lee filter is 15×15, and the noise variance of the Lee filter is 155; the template of the above-mentioned Kuwahara filter is 13×13; the above-mentioned Gaussian filter is a zero-mean filter.
上述预处理模块,还用于通过预设的Canny边缘检测算子采集边缘增强的图像的边缘信息。The above-mentioned preprocessing module is further configured to collect edge information of the edge-enhanced image through a preset Canny edge detection operator.
上述追踪检测模块,用于确定边缘增强的图像的原始帧图像;对原始帧图像进行帧间差分处理,检测运动目标的特征点;对运动目标的征点进行KLT特征点追踪处理,得到边缘增强的图像中的运动目标。The above tracking detection module is used to determine the original frame image of the edge-enhanced image; perform inter-frame difference processing on the original frame image to detect the feature points of the moving target; perform KLT feature point tracking processing on the feature points of the moving target to obtain edge enhancement moving objects in the image.
上述追踪检测模块,用于计算原始帧图像中的相邻帧图像的对应位置的各个像素点的灰度值的差的绝对值;将绝对值大于预设阈值的像素点作为运动目标的特征点。The above-mentioned tracking detection module is used to calculate the absolute value of the difference between the grayscale values of each pixel point at the corresponding position of the adjacent frame image in the original frame image; the pixel point whose absolute value is greater than the preset threshold is used as the feature point of the moving target .
上述追踪检测模块,还用于构造边缘增强的图像中的相邻帧图像的变换仿射模型;基于变换仿射模型确定边缘增强的图像的各个帧图像中的运动目标的特征点位置;基于运动目标的特征点位置确定运动目标的运动区域。The above-mentioned tracking detection module is also used to construct a transformation affine model of adjacent frame images in the edge-enhanced image; determine the feature point position of the moving target in each frame image of the edge-enhanced image based on the transformation affine model; The position of the feature point of the target determines the moving area of the moving target.
本发明实施例所提供的运动目标追踪装置,其实现原理及产生的技术效果和前述运动目标追踪方法实施例相同,为简要描述,运动目标追踪装置实施例部分未提及之处,可参考前述运动目标追踪方法实施例中相应内容。The implementation principle and technical effects of the moving target tracking device provided by the embodiments of the present invention are the same as the aforementioned embodiments of the moving target tracking method. For a brief description, for the parts not mentioned in the embodiments of the moving target tracking device, reference may be made to the aforementioned embodiments. Corresponding content in the embodiment of the moving target tracking method.
本发明实施例还提供了一种电子设备,用于运行上述运动目标追踪方法;参见图8所示的一种电子设备的结构示意图,该电子设备包括存储器100和处理器101,其中,存储器100用于存储一条或多条计算机指令,一条或多条计算机指令被处理器101执行,以实现上述运动目标追踪方法。An embodiment of the present invention also provides an electronic device for running the above-mentioned moving target tracking method; refer to a schematic structural diagram of an electronic device shown in FIG. 8 , the electronic device includes a
进一步地,图8所示的电子设备还包括总线102和通信接口103,处理器101、通信接口103和存储器100通过总线102连接。Further, the electronic device shown in FIG. 8 further includes a bus 102 and a
其中,存储器100可能包含高速随机存取存储器(RAM,Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口103(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。总线102可以是ISA总线、PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。The
处理器101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器101中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器101可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DigitalSignal Processor,简称DSP)、专用集成电路(Application Specific IntegratedCircuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器100,处理器101读取存储器100中的信息,结合其硬件完成前述实施例的方法的步骤。The
本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令在被处理器调用和执行时,计算机可执行指令促使处理器实现上述运动目标追踪方法,具体实现可参见方法实施例,在此不再赘述。Embodiments of the present invention further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to realize For the specific implementation of the above-mentioned moving target tracking method, reference may be made to the method embodiments, which will not be repeated here.
本发明实施例所提供的运动目标追踪方法、装置和电子设备的计算机程序产品,包括存储了程序代码的计算机可读存储介质,程序代码包括的指令可用于执行前面方法实施例中的方法,具体实现可参见方法实施例,在此不再赘述。The moving target tracking method, device, and computer program product of the electronic device provided by the embodiments of the present invention include a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the methods in the foregoing method embodiments. For implementation, reference may be made to the method embodiments, which will not be repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和/或装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the system and/or device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.
另外,在本发明实施例的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection , or integrally connected; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or the internal communication between the two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood in specific situations.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,电子设备,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the indicated device or element must have a specific orientation or a specific orientation. construction and operation, and therefore should not be construed as limiting the invention. Furthermore, the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed to indicate or imply relative importance.
最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of the present invention, and are used to illustrate the technical solutions of the present invention, but not to limit them. The protection scope of the present invention is not limited thereto, although referring to the foregoing The embodiment has been described in detail the present invention, and those of ordinary skill in the art should understand that: any person skilled in the art is within the technical scope disclosed by the present invention, and he can still modify the technical solutions described in the foregoing embodiments. Or can easily think of changes, or equivalently replace some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered in the present invention. within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111600617.3A CN114283174A (en) | 2021-12-24 | 2021-12-24 | Moving target tracking method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111600617.3A CN114283174A (en) | 2021-12-24 | 2021-12-24 | Moving target tracking method and device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114283174A true CN114283174A (en) | 2022-04-05 |
Family
ID=80875139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111600617.3A Pending CN114283174A (en) | 2021-12-24 | 2021-12-24 | Moving target tracking method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114283174A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117152204A (en) * | 2023-08-02 | 2023-12-01 | 北京沃东天骏信息技术有限公司 | Target tracking methods, devices, equipment and storage media |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103149939A (en) * | 2013-02-26 | 2013-06-12 | 北京航空航天大学 | Dynamic target tracking and positioning method of unmanned plane based on vision |
CN103262121A (en) * | 2010-12-20 | 2013-08-21 | 国际商业机器公司 | Detection and tracking of moving objects |
CN103729857A (en) * | 2013-12-09 | 2014-04-16 | 南京理工大学 | Moving target detection method under movable camera based on secondary compensation |
CN110652660A (en) * | 2019-09-03 | 2020-01-07 | 华侨大学 | Method and system for detecting patient placement |
-
2021
- 2021-12-24 CN CN202111600617.3A patent/CN114283174A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103262121A (en) * | 2010-12-20 | 2013-08-21 | 国际商业机器公司 | Detection and tracking of moving objects |
CN103149939A (en) * | 2013-02-26 | 2013-06-12 | 北京航空航天大学 | Dynamic target tracking and positioning method of unmanned plane based on vision |
CN103729857A (en) * | 2013-12-09 | 2014-04-16 | 南京理工大学 | Moving target detection method under movable camera based on secondary compensation |
CN110652660A (en) * | 2019-09-03 | 2020-01-07 | 华侨大学 | Method and system for detecting patient placement |
Non-Patent Citations (1)
Title |
---|
李占利: "智能视频分析与步态识别", vol. 2020, 31 July 2020, 西安电子科技大学出版社, pages: 61 - 63 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117152204A (en) * | 2023-08-02 | 2023-12-01 | 北京沃东天骏信息技术有限公司 | Target tracking methods, devices, equipment and storage media |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4668921B2 (en) | Object detection in images | |
CN101739550B (en) | Method and system for detecting moving objects | |
CN106851049B (en) | A method and device for scene change detection based on video analysis | |
CN101882217B (en) | Target classification method of video image and device | |
CN111741186B (en) | Video jitter detection method, device and system | |
CN108198208B (en) | Movement detection method based on target tracking | |
JP7449507B2 (en) | Method of generating a mask for a camera stream, computer program product and computer readable medium | |
WO2023273010A1 (en) | High-rise littering detection method, apparatus, and device, and computer storage medium | |
CN110689555B (en) | KCF tracking target loss detection method and system based on foreground detection | |
Gangodkar et al. | Robust segmentation of moving vehicles under complex outdoor conditions | |
CN105447890A (en) | Motion vehicle detection method resisting light effect | |
JP2013101419A (en) | Image signal processor | |
KR100659781B1 (en) | Smoke detection method and device in CD image | |
CN108038869A (en) | Passenger falls down to the ground behavioral value method in a kind of lift car | |
CN103077533B (en) | A kind of based on frogeye visual characteristic setting movement order calibration method | |
CN111898518B (en) | Tumble detection method, electronic equipment and storage medium | |
CN114283174A (en) | Moving target tracking method and device and electronic equipment | |
CN103489201B (en) | Method for tracking target based on motion blur information | |
CN112084957B (en) | Mobile target retention detection method and system | |
CN102129692A (en) | Method and system for detecting motion target in double threshold scene | |
Zheng et al. | An automatic moving object detection algorithm for video surveillance applications | |
CN118317073A (en) | Imaging state detection method and device, electronic equipment and readable storage medium | |
CN113936242B (en) | Video image interference detection method, system, device and medium | |
CN115546764A (en) | Obstacle detection method, device, equipment and storage medium | |
CN109670419B (en) | Pedestrian detection method based on perimeter security video monitoring system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240531 Address after: No.006, 6th floor, building 4, No.33 yard, middle Xierqi Road, Haidian District, Beijing 100085 Applicant after: BEIJING KINGSOFT CLOUD NETWORK TECHNOLOGY Co.,Ltd. Country or region after: China Applicant after: Wuxi Jinyun Zhilian Technology Co.,Ltd. Address before: No.006, 6th floor, building 4, No.33 yard, middle Xierqi Road, Haidian District, Beijing 100085 Applicant before: BEIJING KINGSOFT CLOUD NETWORK TECHNOLOGY Co.,Ltd. Country or region before: China |