[go: up one dir, main page]

CN105069813A - Stable moving target detection method and device - Google Patents

Stable moving target detection method and device Download PDF

Info

Publication number
CN105069813A
CN105069813A CN201510427264.XA CN201510427264A CN105069813A CN 105069813 A CN105069813 A CN 105069813A CN 201510427264 A CN201510427264 A CN 201510427264A CN 105069813 A CN105069813 A CN 105069813A
Authority
CN
China
Prior art keywords
frame image
moving
moving target
current frame
rectangular frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510427264.XA
Other languages
Chinese (zh)
Other versions
CN105069813B (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.)
Codyy Education Technology Co Ltd
Original Assignee
Codyy Education Technology Co Ltd
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 Codyy Education Technology Co Ltd filed Critical Codyy Education Technology Co Ltd
Priority to CN201510427264.XA priority Critical patent/CN105069813B/en
Publication of CN105069813A publication Critical patent/CN105069813A/en
Application granted granted Critical
Publication of CN105069813B publication Critical patent/CN105069813B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Image Analysis (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

本发明提供一种稳定检测运动目标的方法及装置。该稳定检测运动目标的方法包括以下步骤:检测当前帧图像中的运动目标;将所述当前帧图像中的各运动目标与前一帧图像中的各运动目标进行匹配;根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;选取出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。通过本发明的技术方案,不会因为运动目标的大小变化或忽隐忽现而导致运动目标的误检或切换跟踪,解决了跟踪画面不平稳的问题,算法简单有效。

This invention provides a method and apparatus for stable detection of moving targets. The method includes the following steps: detecting moving targets in the current frame image; matching each moving target in the current frame image with each moving target in the previous frame image; adjusting the number of frames in which the moving target appears in the current frame image in historical consecutive image frames based on the matching results; selecting moving targets with a number of appearances greater than a first preset value, and tracking the selected moving targets. Through the technical solution of this invention, false detection or tracking switching of moving targets will not occur due to changes in the size or sudden appearance of the moving targets, thus solving the problem of unstable tracking. The algorithm is simple and effective.

Description

一种稳定检测运动目标的方法及装置A method and device for stably detecting a moving target

技术领域technical field

本发明属于图像处理领域,尤其涉及一种稳定检测运动目标的方法及装置。The invention belongs to the field of image processing, in particular to a method and device for stably detecting a moving target.

背景技术Background technique

基于运动检测的背景差分检测,运动目标大小变化随机不定,并且有些运动目标忽隐忽现,影响了主要运动目标的跟踪,从而造成摄像机跟踪画面不稳定且切换频繁。Based on the background difference detection of motion detection, the size of the moving target changes randomly, and some moving targets flicker, which affects the tracking of the main moving target, resulting in unstable and frequent switching of the camera tracking screen.

因此,需要一种稳定检测运动目标的方法,使得云台摄像机在跟踪时画面平滑。Therefore, there is a need for a method for stably detecting a moving target, so that the picture of the pan-tilt camera is smooth when tracking.

发明内容Contents of the invention

本发明提供一种稳定检测运动目标的方法及装置,以解决上述问题。The present invention provides a method and device for stably detecting moving objects to solve the above problems.

本发明提供一种稳定检测运动目标的方法。上述方法包括以下步骤:检测当前帧图像中的运动目标;将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配;根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。The invention provides a method for stably detecting a moving target. The above method includes the following steps: detecting moving objects in the current frame image; matching each moving object in the current frame image with each moving object processed up to the previous frame image; The number of occurrence frames of the moving target in the frame image in the historical continuous image frames is increased or decreased; the moving target whose number of occurrence frames obtained by processing the current frame image is greater than the first preset value is selected, and the selected moving target to track.

本明还提供一种稳定检测运动目标的装置,其特征在于,包括:检测单元,用于检测当前帧图像中的运动目标;匹配单元,连接至所述检测单元,用于将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配;处理单元,连接至所述匹配单元,用于根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;控制单元,用于选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。The present invention also provides a device for stably detecting a moving object, which is characterized in that it includes: a detection unit for detecting a moving object in the current frame image; a matching unit connected to the detection unit for converting the current frame Each moving object in the image is matched with each moving object processed up to the previous frame of image; the processing unit is connected to the matching unit, and is used to compare the history of the moving object in the current frame image according to the matching result The number of appearing frames in the continuous image frames is increased or decreased; the control unit is used to select a moving target whose number of appearing frames obtained through the processing of the current frame image is greater than the first preset value, and track the selected moving target.

本发明提供了一种稳定检测运动目标的方式,不会因为运动目标的大小变化或忽隐忽现而导致运动目标的误检或切换跟踪,解决了跟踪画面不平稳的问题,算法简单有效。The invention provides a method for stably detecting a moving target, which does not cause false detection or switching tracking of the moving target due to size changes or flickering of the moving target, solves the problem of unsteady tracking pictures, and has a simple and effective algorithm.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:

图1所示为根据本发明的一较佳实施例提供的稳定检测运动目标的方法的流程图;Fig. 1 is a flowchart of a method for stably detecting a moving target according to a preferred embodiment of the present invention;

图2所示为根据本发明的另一较佳实施例提供的稳定检测运动目标的方法的流程图;FIG. 2 is a flowchart of a method for stably detecting a moving target according to another preferred embodiment of the present invention;

图3所示为根据本发明的较佳实施例提供的稳定检测运动目标的装置的示意图。Fig. 3 is a schematic diagram of a device for stably detecting a moving target provided according to a preferred embodiment of the present invention.

具体实施方式Detailed ways

下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

图1所示为根据本发明的较佳实施例提供的稳定检测运动目标的方法的流程图,该图1所示为根据本发明的较佳实施例提供的稳定检测运动目标的方法的流程图可以包括以下步骤:Figure 1 shows a flow chart of a method for stably detecting a moving target according to a preferred embodiment of the present invention, and this Figure 1 shows a flow chart of a method for stably detecting a moving target according to a preferred embodiment of the present invention Can include the following steps:

步骤102,检测当前帧图像中的运动目标。Step 102, detecting a moving object in the current frame image.

步骤104,将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配。Step 104, matching each moving object in the current frame image with each moving object processed up to the previous frame image.

步骤106,根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理。Step 106: Increase or decrease the number of frames in which the moving object in the current frame image appears in the historical consecutive image frames according to the matching result.

步骤108,选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。Step 108 , selecting a moving object whose number of frames obtained by processing the current frame image is greater than a first preset value, and tracking the selected moving object.

截止到前一帧图像所处理得到的各运动目标包括出现帧数符合预定要求例如大于第一预设值的运动目标以及在前一帧图像中出现的新运动目标,是经过处理之后最终筛选出的,需要保存筛选出的这些运动目标的信息,以便于后续图像帧的匹配处理。如果一个运动目标在连续三帧图像中均出现,那么该运动目标的出现帧数是3,以此类推。如果该运动目标在第四帧图像中未出现,则将该运动目标的出现帧数减一,变成2。The moving objects processed up to the previous frame image include the moving objects with the number of frames that meet the predetermined requirements, for example, the moving objects that are greater than the first preset value, and the new moving objects that appear in the previous frame image, which are finally screened out after processing Therefore, it is necessary to save the information of the selected moving objects, so as to facilitate the matching processing of subsequent image frames. If a moving target appears in three consecutive frames of images, then the number of frames in which the moving target appears is 3, and so on. If the moving object does not appear in the fourth frame image, the number of frames in which the moving object appears is reduced by one to become 2.

在跟踪时,对出现帧数大于一定值的运动目标进行跟踪,这样每次跟踪的运动目标都是准确的,可以避免干扰目标对跟踪画面的影响。When tracking, track the moving target whose frame number is greater than a certain value, so that the moving target tracked every time is accurate, and the influence of the interfering target on the tracking picture can be avoided.

在上述步骤104中,将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配的过程包括:In the above step 104, the process of matching the moving objects in the current frame image with the moving objects processed up to the previous frame image includes:

计算所述当前帧图像中的各运动目标与所述截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度以及面积重合度;Calculating the length-width similarity, distance similarity, and area coincidence between each moving object in the current frame image and the moving objects processed up to the previous frame image;

根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像和截止到前一帧图像所处理得到的各运动目标中的相匹配的运动目标。According to the length-width similarity, distance similarity and the area coincidence degree, the current frame image and the matching moving object among the moving objects processed up to the previous frame image are determined.

其中,长宽相似度、距离相似度和所述面积重合度的具体计算方法参考如下:Among them, the specific calculation methods of length and width similarity, distance similarity and the area coincidence degree are as follows:

在检测出运动目标后,采用矩形框表示运动目标,第一矩形框表示当前帧图像中的运动目标,第二矩形框表示截止到前一帧图像所处理得到的各运动目标中的运动目标;After the moving target is detected, the moving target is represented by a rectangular frame, the first rectangular frame represents the moving target in the current frame image, and the second rectangular frame represents the moving target among the moving targets obtained by processing the previous frame image;

计算第一矩形框与第二矩形框的宽度差,计算所述宽度差与两者中宽度最大的宽度之间的第一比值,以及计算第一矩形框与第二矩形框的长度差,计算所述长度差与两者中长度最大的长度之间的第二比值,将所述第一比值与所述第二比值中最小的比值作为所述长宽相似度;Calculate the width difference between the first rectangular frame and the second rectangular frame, calculate the first ratio between the width difference and the width with the largest width among them, and calculate the length difference between the first rectangular frame and the second rectangular frame, and calculate The second ratio between the length difference and the length with the largest length among the two, the smallest ratio between the first ratio and the second ratio is used as the length-width similarity;

所述距离相似度=(D-d)/D,其中,d是第一矩形框与第二矩形框之间的距离,D是预设最大相似距离;The distance similarity=(D-d)/D, wherein, d is the distance between the first rectangular frame and the second rectangular frame, and D is the preset maximum similarity distance;

所述面积重合度=S/C,S表示第一矩形框与第二矩形的重合面积,C表示第一矩形框与第二矩形框的总面积与所述重合面积之间的差值。The area overlapping degree=S/C, S represents the overlapping area of the first rectangular frame and the second rectangular frame, and C represents the difference between the total area of the first rectangular frame and the second rectangular frame and the overlapping area.

其中,根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像和前一帧图像中的相匹配的运动目标的过程具体包括:Wherein, the process of determining the matching moving target in the current frame image and the previous frame image according to the length-width similarity, distance similarity and the area overlap specifically includes:

根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像和截止到前一帧图像所处理得到的各运动目标中的相匹配的运动目标包括:According to the length and width similarity, distance similarity and the area coincidence, determining the current frame image and the matching moving objects among the moving objects processed up to the previous frame image include:

对所述当前帧图像中每一个运动目标与截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度和所述面积重合度进行加权求和,并且选取最大的加权求和值;若最大的加权求和值大于第二预设值,则确定两个运动目标是相匹配的运动目标。Carry out weighted summation for each moving object in the current frame image and the length and width similarity, distance similarity and the area coincidence degree of each moving object processed up to the previous frame image, and select the largest weighted summation value; if the largest weighted summation value is greater than the second preset value, it is determined that the two moving objects are matching moving objects.

其中,所述对选取出的运动目标进行跟踪,包括:Wherein, the tracking of the selected moving target includes:

在选取出的运动目标为多个时,计算出一个跟踪框,以将该多个运动目标限定在所述跟踪框内,对所述跟踪框进行跟踪处理。When there are multiple moving objects selected, a tracking frame is calculated to limit the multiple moving objects within the tracking frame, and the tracking process is performed on the tracking frame.

根据本发明的稳定检测运动目标的方法还可以包括:The method for stably detecting a moving target according to the present invention may also include:

删除截止到当前帧图像所处理得到的出现帧数小于等于所述第一预设值的运动目标,并保留所述当前帧图像中新出现的运动目标。Deleting the moving objects whose appearance frames obtained through the processing of the current frame image is less than or equal to the first preset value, and retaining the newly appearing moving objects in the current frame image.

其中,根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理,包括:Wherein, according to the matching result, the number of occurrence frames of the moving target in the current frame image in the historical continuous image frames is increased or decreased, including:

对于在所述当前帧图像中未找到与所述前一帧图像的运动目标相匹配的运动目标,将其对应的出现帧数减一;If no moving object matching the moving object in the previous frame image is found in the current frame image, the corresponding number of occurrence frames is reduced by one;

对于在所述当前帧图像中找到与所述前一帧图像的运动目标相匹配的运动目标,将其对应的出现帧数增一。For a moving object found in the current frame image that matches the moving object in the previous frame image, its corresponding appearance frame number is increased by one.

下面结合图2进一步说明根据本发明稳定检测运动目标的方法。The method for stably detecting a moving target according to the present invention will be further described below with reference to FIG. 2 .

在本实施例中,基于运动背景差分检测出所有运动目标,用矩形框标记出检测出的运动目标。保存这些运动目标的矩形框信息,矩形框信息包括状态(是否是新出现的运动目标)、生命周期(即出现帧数,运动目标每出现在一帧图像中就增加1,数值越大说明该运动目标一直存在),矩形框标识(坐标位置、长度、宽度)。在检测出运动目标之后,取当前帧图像和前一帧图像来说明本发明的稳定检测过程:In this embodiment, all moving objects are detected based on the moving background difference, and the detected moving objects are marked with a rectangular frame. Save the rectangular frame information of these moving objects. The rectangular frame information includes status (whether it is a new moving object), life cycle (that is, the number of frames that appear, and increases by 1 every time a moving object appears in a frame of image. The larger the value, the The moving target exists all the time), and the rectangular frame mark (coordinate position, length, width). After detecting the moving target, get the current frame image and the previous frame image to illustrate the stable detection process of the present invention:

假设前一帧图像之前有至少一帧历史图像,那么到前一帧图像为止,已经保存了历史帧图像中一直出现的运动目标信息以及在前一帧图像中新出现的运动目标信息。Assuming that there is at least one frame of historical image before the previous frame of image, the moving object information that has always appeared in the historical frame image and the new moving object information that appeared in the previous frame image have been saved up to the previous frame image.

在当前帧图像中找出与保存的运动目标信息中最相似的运动目标,如图2所示,步骤202,在已保存的运动目标信息中取一个矩形框A。步骤204,从当前帧图像中取出一个矩形框B。步骤206,计算AB两个矩形框的相似度Score。遍历当前矩形框链表,计算出A与当前帧图像中的每一个运动目标的相似度。Find the moving object most similar to the saved moving object information in the current frame image, as shown in FIG. 2 , step 202, take a rectangular frame A in the saved moving object information. Step 204, extract a rectangular frame B from the current frame image. Step 206, calculating the similarity Score of the two rectangular boxes AB. Traverse the current rectangular box linked list, and calculate the similarity between A and each moving object in the current frame image.

步骤208,选取出最大的相似度maxscore。步骤210,判断该最大的相似度maxscore是否大于设定的阈值(即第二预设值),假设B与A的相似度最大。In step 208, the maximum similarity maxscore is selected. Step 210, judging whether the maximum similarity maxscore is greater than a set threshold (ie, the second preset value), assuming that the similarity between B and A is the largest.

步骤212,若大于设定的阈值,则用B更新A,并且使其生命周期加一,否则,进入步骤214,使A的生命周期减一。Step 212, if it is greater than the set threshold, update A with B, and increase its life cycle by one, otherwise, go to step 214, and decrease A's life cycle by one.

按照上面所述的流程,遍历保存的运动目标,逐一进行匹配,最后,根据匹配结果更新之前保存的运动目标信息,例如对匹配的运动目标,其相应的出现帧数增加一,否则减少一,如果是当前帧图像中新出现的运动目标,则同样保存该新出现的运动目标的信息。最后,为了减少后续的匹配算法计算量,根据统计结果,对于出现帧数小于一定值的运动目标需要进行删除,该运动目标被认为是不稳定的干扰运动目标,例如人的手臂摆动。这样,最终保存的运动目标的信息都是最准确的。According to the process described above, traverse the saved moving objects and perform matching one by one. Finally, update the previously saved moving object information according to the matching results. If it is a newly appearing moving object in the current frame image, the information of the newly appearing moving object is also saved. Finally, in order to reduce the calculation amount of the subsequent matching algorithm, according to the statistical results, the moving objects whose frame number is less than a certain value need to be deleted, and the moving objects are considered to be unstable interfering moving objects, such as human arm swings. In this way, the finally saved information of the moving target is the most accurate.

两个运动目标是否相似,在本实施例中可以从以下三个方面中的至少两个方面来评判:长宽相似度、距离相似度、面积重合度。它们的具体算法参看第一实施例,在此不再赘述。根据实际需要可分别设置这三个维度的权重,最终进行加权求和得到一个计算值,该计算值越大,表明两个运动目标越相似,可以设置一个阈值,大于该阈值的则认为两个运动目标是相匹配的运动目标。Whether two moving targets are similar can be judged in this embodiment from at least two of the following three aspects: similarity in length and width, similarity in distance, and overlap in area. For their specific algorithms, refer to the first embodiment, which will not be repeated here. According to actual needs, the weights of these three dimensions can be set separately, and finally a weighted summation is performed to obtain a calculated value. The larger the calculated value, the more similar the two moving targets are. You can set a threshold, and if it is greater than the threshold, it is considered two. A sport target is a matched sport target.

图3所示为根据本发明的较佳实施例提供的稳定检测运动目标的装置的示意图。Fig. 3 is a schematic diagram of a device for stably detecting a moving target provided according to a preferred embodiment of the present invention.

如图3所示,根据本发明的实施例的稳定检测运动目标的装置300包括:As shown in FIG. 3 , an apparatus 300 for stably detecting a moving object according to an embodiment of the present invention includes:

检测单元302,用于检测当前帧图像中的运动目标;匹配单元304,连接至所述检测单元302,用于将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配;处理单元306,连接至所述匹配单元304,用于根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;控制单元308,用于选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。The detection unit 302 is used to detect the moving object in the current frame image; the matching unit 304 is connected to the detection unit 302, and is used to process each moving object in the current frame image with the previous frame image Each moving target is matched; the processing unit 306 is connected to the matching unit 304, and is used to increase or decrease the number of occurrence frames of the moving target in the historical continuous image frame in the current frame image according to the matching result; control The unit 308 is configured to select a moving target whose number of frames obtained by processing the current frame image is greater than a first preset value, and track the selected moving target.

其中,所述匹配单元304可以包括:Wherein, the matching unit 304 may include:

计算子单元,用于计算所述当前帧图像中的各运动目标与所述截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度以及面积重合度;A calculation subunit, configured to calculate the length-width similarity, distance similarity, and area coincidence between each moving object in the current frame image and each moving object processed by the previous frame image;

判断子单元,用于根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像和前一帧图像中的相匹配的运动目标。The judging subunit is configured to determine the matching moving target in the current frame image and the previous frame image according to the length-width similarity, distance similarity and the area overlap.

所述计算子单元还用于在所述检测单元302检测出运动目标后,采用矩形框表示运动目标,第一矩形框表示当前帧图像中的运动目标,第二矩形框表示截止到前一帧图像所处理得到的各运动目标中的运动目标;计算第一矩形框与第二矩形框的宽度差,计算所述宽度差与两者中宽度最大的宽度之间的第一比值,以及计算第一矩形框与第二矩形框的长度差,计算所述长度差与两者中长度最大的长度之间的第二比值,将所述第一比值与所述第二比值中最小的比值作为所述长宽相似度;所述距离相似度=(D-d)/D,其中,d是第一矩形框与第二矩形框之间的距离,D是预设最大相似距离;所述面积重合度=S/C,S表示第一矩形框与第二矩形的重合面积,C表示第一矩形框与第二矩形框的总面积与所述重合面积之间的差值。The calculation subunit is also used to use a rectangular frame to represent the moving target after the detection unit 302 detects the moving target, the first rectangular frame represents the moving target in the current frame image, and the second rectangular frame represents the moving target up to the previous frame. The moving target among the moving targets obtained by image processing; calculate the width difference between the first rectangular frame and the second rectangular frame, calculate the first ratio between the width difference and the width of the two with the largest width, and calculate the second A length difference between a rectangular frame and a second rectangular frame, calculate the second ratio between the length difference and the length with the largest length among the two, and use the smallest ratio between the first ratio and the second ratio as the Described length-width similarity; Described distance similarity=(D-d)/D, wherein, d is the distance between the first rectangular frame and the second rectangular frame, and D is the preset maximum similarity distance; Described area coincidence degree= S/C, S represents the overlapping area of the first rectangular frame and the second rectangular frame, and C represents the difference between the total area of the first rectangular frame and the second rectangular frame and the overlapping area.

所述处理单元306用于对于在当前帧图像中未找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数减一,对于在所述当前帧图像中找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数增一。The processing unit 306 is configured to subtract one from its corresponding number of occurrence frames if no moving object is found in the current frame image that matches the moving object obtained through the processing of the previous frame image. Find a moving object in the current frame image that matches the moving object obtained by processing the image up to the previous frame, and increase its corresponding number of appearing frames by one.

根据本发明的稳定检测运动目标的方法及装置,不会因为运动目标的大小变化或忽隐忽现而导致运动目标的误检或切换跟踪,解决了跟踪画面不平稳的问题,且算法简单有效。According to the method and device for stably detecting a moving target of the present invention, it will not cause false detection or switch tracking of the moving target due to size changes or flickering of the moving target, and solves the problem of unsteady tracking pictures, and the algorithm is simple and effective .

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种稳定检测运动目标的方法,其特征在于,包括以下步骤:1. A method for stably detecting a moving target, comprising the following steps: 检测当前帧图像中的运动目标;Detect moving objects in the current frame image; 将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配;Matching each moving object in the current frame image with each moving object processed up to the previous frame image; 根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;According to the matching result, the number of frames in which the moving target in the current frame image appears in the historical continuous image frames is increased or decreased; 选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。Selecting a moving target whose number of frames obtained by processing the current frame image is greater than a first preset value, and tracking the selected moving target. 2.根据权利要求1所述的方法,其特征在于,所述将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配的过程包括:2. The method according to claim 1, wherein the process of matching each moving object in the current frame image with each moving object processed up to the previous frame image comprises: 计算所述当前帧图像中的各运动目标与所述截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度以及面积重合度;Calculating the length-width similarity, distance similarity, and area coincidence between each moving object in the current frame image and the moving objects processed up to the previous frame image; 根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像中的运动目标和截止到前一帧图像所处理得到的各运动目标中的相匹配的运动目标。Determine the moving object in the current frame image and the matching moving object among the moving objects processed up to the previous frame image according to the length-width similarity, distance similarity and the area overlap. 3.根据权利要求2所述的方法,其特征在于,在检测出运动目标后,采用矩形框表示运动目标,第一矩形框表示当前帧图像中的运动目标,第二矩形框表示截止到前一帧图像所处理得到的各运动目标中的运动目标;3. The method according to claim 2, characterized in that, after the moving target is detected, the moving target is represented by a rectangular frame, the first rectangular frame represents the moving target in the current frame image, and the second rectangular frame represents the A moving target among the moving targets obtained by processing one frame of image; 计算第一矩形框与第二矩形框的宽度差,计算所述宽度差与两者中宽度最大的宽度之间的第一比值,以及计算第一矩形框与第二矩形框的长度差,计算所述长度差与两者中长度最大的长度之间的第二比值,将所述第一比值与所述第二比值中最小的比值作为所述长宽相似度;Calculate the width difference between the first rectangular frame and the second rectangular frame, calculate the first ratio between the width difference and the width with the largest width among them, and calculate the length difference between the first rectangular frame and the second rectangular frame, and calculate The second ratio between the length difference and the length with the largest length among the two, the smallest ratio between the first ratio and the second ratio is used as the length-width similarity; 所述距离相似度=(D-d)/D,其中,d是第一矩形框与第二矩形框之间的距离,D是预设最大相似距离;The distance similarity=(D-d)/D, wherein, d is the distance between the first rectangular frame and the second rectangular frame, and D is the preset maximum similarity distance; 所述面积重合度=S/C,S表示第一矩形框与第二矩形的重合面积,C表示第一矩形框与第二矩形框的总面积与所述重合面积之间的差值。The area overlapping degree=S/C, S represents the overlapping area of the first rectangular frame and the second rectangular frame, and C represents the difference between the total area of the first rectangular frame and the second rectangular frame and the overlapping area. 4.根据权利要求3所述的方法,其特征在于,根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像和截止到前一帧图像所处理得到的各运动目标中的相匹配的运动目标包括:4. The method according to claim 3, characterized in that, according to the length and width similarity, distance similarity and the area coincidence degree, determine the current frame image and each moving target obtained by processing the previous frame image The matching sports goals in include: 对所述当前帧图像中每一个运动目标与截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度和所述面积重合度进行加权求和,并且选取最大的加权求和值;Carry out weighted summation for each moving object in the current frame image and the length and width similarity, distance similarity and the area coincidence degree of each moving object processed up to the previous frame image, and select the largest weighted Sum value; 若最大的加权求和值大于第二预设值,则确定两个运动目标是相匹配的运动目标。If the largest weighted summation value is greater than the second preset value, it is determined that the two moving objects are matching moving objects. 5.根据权利要求1至4中任一项所述的方法,其特征在于,所述对选取出的运动目标进行跟踪,包括:5. The method according to any one of claims 1 to 4, wherein said tracking the selected moving target comprises: 在选取出的运动目标为多个时,计算出一个跟踪框,以将该多个运动目标限定在所述跟踪框内,对所述跟踪框进行跟踪处理;When there are multiple moving objects selected, a tracking frame is calculated to confine the multiple moving objects within the tracking frame, and perform tracking processing on the tracking frame; 所述方法还包括:The method also includes: 删除截止到当前帧图像所处理得到的出现帧数小于等于所述第一预设值的运动目标,并保留所述当前帧图像中新出现的运动目标。Deleting the moving objects whose appearance frames obtained through the processing of the current frame image is less than or equal to the first preset value, and retaining the newly appearing moving objects in the current frame image. 6.根据权利要求1至4中任一项所述的方法,其特征在于,根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理,包括:6. The method according to any one of claims 1 to 4, characterized in that, according to the matching result, the number of occurrence frames of the moving target in the current frame image in the historical continuous image frames is increased or decreased, including : 对于在所述当前帧图像中未找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数减一;If no moving object matching the moving object obtained by processing the previous frame image is found in the current frame image, the corresponding number of occurrence frames is reduced by one; 对于在所述当前帧图像中找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数增一。For a moving object found in the current frame image that matches the moving object obtained through processing up to the previous frame image, its corresponding appearance frame number is increased by one. 7.一种稳定检测运动目标的装置,其特征在于,包括:7. A device for stably detecting a moving target, comprising: 检测单元,用于检测当前帧图像中的运动目标;A detection unit, configured to detect a moving target in the current frame image; 匹配单元,连接至所述检测单元,用于将所述当前帧图像中的各运动目标与截止到前一帧图像所处理得到的各运动目标进行匹配;A matching unit, connected to the detection unit, for matching each moving object in the current frame image with each moving object processed up to the previous frame image; 处理单元,连接至所述匹配单元,用于根据匹配结果对所述当前帧图像中的运动目标在历史连续图像帧中的出现帧数进行增减处理;A processing unit, connected to the matching unit, configured to increase or decrease the number of frames in which the moving target in the current frame image appears in the historical continuous image frames according to the matching result; 控制单元,用于选取截止到当前帧图像所处理得到的出现帧数大于第一预设值的运动目标,对选取出的运动目标进行跟踪。The control unit is used to select a moving target whose number of frames obtained by processing the current frame image is greater than a first preset value, and to track the selected moving target. 8.根据权利要求7所述的装置,其特征在于,所述匹配单元包括:8. The device according to claim 7, wherein the matching unit comprises: 计算子单元,用于计算所述当前帧图像中的各运动目标与所述截止到前一帧图像所处理得到的各运动目标的长宽相似度、距离相似度以及面积重合度;A calculation subunit, configured to calculate the length-width similarity, distance similarity, and area coincidence between each moving object in the current frame image and each moving object processed by the previous frame image; 判断子单元,用于根据所述长宽相似度、距离相似度和所述面积重合度确定当前帧图像中的运动目标和截止到前一帧图像所处理得到的各运动目标中的相匹配的运动目标。The judging subunit is used to determine the matching moving objects in the current frame image and the moving objects processed up to the previous frame image according to the length-width similarity, distance similarity and the area overlap sports goals. 9.根据权利要求8所述的装置,其特征在于,所述计算子单元还用于在所述检测单元检测出运动目标后,采用矩形框表示运动目标,第一矩形框表示当前帧图像中的运动目标,第二矩形框表示截止到前一帧图像所处理得到的各运动目标中的运动目标;9. The device according to claim 8, wherein the calculation subunit is further configured to use a rectangular frame to represent the moving target after the detection unit detects the moving target, and the first rectangular frame represents the moving target in the current frame image. The moving target, the second rectangular frame represents the moving target among the moving targets obtained by the processing of the previous frame image; 计算第一矩形框与第二矩形框的宽度差,计算所述宽度差与两者中宽度最大的宽度之间的第一比值,以及计算第一矩形框与第二矩形框的长度差,计算所述长度差与两者中长度最大的长度之间的第二比值,将所述第一比值与所述第二比值中最小的比值作为所述长宽相似度;Calculate the width difference between the first rectangular frame and the second rectangular frame, calculate the first ratio between the width difference and the width with the largest width among them, and calculate the length difference between the first rectangular frame and the second rectangular frame, and calculate The second ratio between the length difference and the length with the largest length among the two, the smallest ratio between the first ratio and the second ratio is used as the length-width similarity; 所述距离相似度=(D-d)/D,其中,d是第一矩形框与第二矩形框之间的距离,D是预设最大相似距离;The distance similarity=(D-d)/D, wherein, d is the distance between the first rectangular frame and the second rectangular frame, and D is the preset maximum similarity distance; 所述面积重合度=S/C,S表示第一矩形框与第二矩形的重合面积,C表示第一矩形框与第二矩形框的总面积与所述重合面积之间的差值。The area overlapping degree=S/C, S represents the overlapping area of the first rectangular frame and the second rectangular frame, and C represents the difference between the total area of the first rectangular frame and the second rectangular frame and the overlapping area. 10.根据权利要求7至9中任一项所述的装置,其特征在于,所述处理单元用于对于在所述当前帧图像中未找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数减一,对于在所述当前帧图像中找到与所述截止到前一帧图像所处理得到的运动目标相匹配的运动目标,将其对应的出现帧数增一。10. The device according to any one of claims 7 to 9, wherein the processing unit is configured to find and obtain in the current frame image and the processed image up to the previous frame image For a moving target that matches the moving target, its corresponding number of occurrence frames is reduced by one, and for a moving target found in the current frame image that matches the moving target obtained by processing the image up to the previous frame, its The corresponding occurrence frame number is incremented by one.
CN201510427264.XA 2015-07-20 2015-07-20 A kind of method and device of stable detection moving target Expired - Fee Related CN105069813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510427264.XA CN105069813B (en) 2015-07-20 2015-07-20 A kind of method and device of stable detection moving target

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510427264.XA CN105069813B (en) 2015-07-20 2015-07-20 A kind of method and device of stable detection moving target

Publications (2)

Publication Number Publication Date
CN105069813A true CN105069813A (en) 2015-11-18
CN105069813B CN105069813B (en) 2018-03-23

Family

ID=54499169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510427264.XA Expired - Fee Related CN105069813B (en) 2015-07-20 2015-07-20 A kind of method and device of stable detection moving target

Country Status (1)

Country Link
CN (1) CN105069813B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107886048A (en) * 2017-10-13 2018-04-06 西安天和防务技术股份有限公司 Method for tracking target and system, storage medium and electric terminal
CN108537093A (en) * 2017-03-02 2018-09-14 深圳市中兴微电子技术有限公司 A kind of statistical method and device of video number
CN108664853A (en) * 2017-03-30 2018-10-16 北京君正集成电路股份有限公司 Method for detecting human face and device
CN109859254A (en) * 2019-02-28 2019-06-07 北京百度网讯科技有限公司 Method and apparatus for sending information
CN110414443A (en) * 2019-07-31 2019-11-05 苏州市科远软件技术开发有限公司 A kind of method for tracking target, device and rifle ball link tracking
CN113468452A (en) * 2021-09-03 2021-10-01 成都国星宇航科技有限公司 Remote sensing data visual interface interaction method and device and electronic equipment
CN117292280A (en) * 2023-10-10 2023-12-26 中国电信股份有限公司 Target tracking and detection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287648A (en) * 2007-05-21 2008-11-27 Fujifilm Corp MOBILE BODY DETECTION METHOD AND DEVICE, AND MONITORING DEVICE
CN101393609A (en) * 2008-09-18 2009-03-25 北京中星微电子有限公司 Target detection tracking method and device
CN101739691A (en) * 2009-12-04 2010-06-16 北京智安邦科技有限公司 Method and device for detecting video false alarm target
CN103617410A (en) * 2013-08-30 2014-03-05 重庆大学 Highway tunnel parking detection method based on video detection technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287648A (en) * 2007-05-21 2008-11-27 Fujifilm Corp MOBILE BODY DETECTION METHOD AND DEVICE, AND MONITORING DEVICE
CN101393609A (en) * 2008-09-18 2009-03-25 北京中星微电子有限公司 Target detection tracking method and device
CN101739691A (en) * 2009-12-04 2010-06-16 北京智安邦科技有限公司 Method and device for detecting video false alarm target
CN103617410A (en) * 2013-08-30 2014-03-05 重庆大学 Highway tunnel parking detection method based on video detection technology

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIN SONG ET AL: "Algorithm Research of Moving Vehicle Detection and Vehicle Flow Statistical Based on Machine Vision", 《2011 3RD INTERNATIONAL CONFERENCE ON SIGNAL PROCESSING SYSTEMS(ICSPS 2011)》 *
司红伟 等: "基于背景估计的运动检测算法", 《基于背景估计的运动检测算法 *
王燕玲 等: "复杂动态环境下运动目标自动检测算法", 《系统仿真学报》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537093A (en) * 2017-03-02 2018-09-14 深圳市中兴微电子技术有限公司 A kind of statistical method and device of video number
CN108537093B (en) * 2017-03-02 2020-07-03 深圳市中兴微电子技术有限公司 Method and device for counting number of people in video
CN108664853A (en) * 2017-03-30 2018-10-16 北京君正集成电路股份有限公司 Method for detecting human face and device
CN108664853B (en) * 2017-03-30 2022-05-27 北京君正集成电路股份有限公司 Face detection method and device
CN107886048A (en) * 2017-10-13 2018-04-06 西安天和防务技术股份有限公司 Method for tracking target and system, storage medium and electric terminal
CN109859254A (en) * 2019-02-28 2019-06-07 北京百度网讯科技有限公司 Method and apparatus for sending information
CN110414443A (en) * 2019-07-31 2019-11-05 苏州市科远软件技术开发有限公司 A kind of method for tracking target, device and rifle ball link tracking
CN113468452A (en) * 2021-09-03 2021-10-01 成都国星宇航科技有限公司 Remote sensing data visual interface interaction method and device and electronic equipment
CN117292280A (en) * 2023-10-10 2023-12-26 中国电信股份有限公司 Target tracking and detection method and device

Also Published As

Publication number Publication date
CN105069813B (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN105069813B (en) A kind of method and device of stable detection moving target
US12205376B2 (en) Object tracking apparatus, object tracking system, object tracking method, display control device, object detection device, and computer-readable medium
CN109446942B (en) Target tracking method, device and system
CN107818573B (en) Target tracking method and device
CN104732187B (en) A kind of method and apparatus of image trace processing
Moya-Alcover et al. Modeling depth for nonparametric foreground segmentation using RGBD devices
JP6280020B2 (en) Moving object tracking device
CN109658433B (en) Image background modeling and foreground extracting method and device and electronic equipment
CN116645396B (en) Track determination method, track determination device, computer-readable storage medium and electronic device
WO2018228413A1 (en) Method and device for capturing target object and video monitoring device
JP2016507834A (en) System and method for tracking and detecting a target object
CN105279771B (en) A kind of moving target detecting method based on the modeling of online dynamic background in video
CN106204658A (en) Moving image tracking and device
WO2017199840A1 (en) Object tracking device, object tracking method, and recording medium
CN106097385A (en) A kind of method and apparatus of target following
JP2020109644A (en) Fall detection method, fall detection apparatus, and electronic device
CN103679130B (en) Hand method for tracing, hand tracing equipment and gesture recognition system
US20150213308A1 (en) Method and system for analyzing human behavior in an intelligent surveillance system
TWI517100B (en) Method for tracking moving object and electronic apparatus using the same
JP2017174305A (en) Object tracking apparatus, method and program
CN110059531A (en) Behavioral value method and device of fighting based on video image
CN104376579A (en) Moving object detecting method and system used for online class system
CN113012193B (en) A Multi-Pedestrian Tracking Method Based on Deep Learning
CN107665495B (en) Object tracking method and object tracking device
Bo et al. PhD forum: Illumination-robust foreground detection for multi-camera occupancy mapping

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180323

Termination date: 20200720

CF01 Termination of patent right due to non-payment of annual fee