[go: up one dir, main page]

CN103152558A - Intrusion detection method based on scene recognition - Google Patents

Intrusion detection method based on scene recognition Download PDF

Info

Publication number
CN103152558A
CN103152558A CN2013101065723A CN201310106572A CN103152558A CN 103152558 A CN103152558 A CN 103152558A CN 2013101065723 A CN2013101065723 A CN 2013101065723A CN 201310106572 A CN201310106572 A CN 201310106572A CN 103152558 A CN103152558 A CN 103152558A
Authority
CN
China
Prior art keywords
scene
image
mode
video
sigma
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
CN2013101065723A
Other languages
Chinese (zh)
Other versions
CN103152558B (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.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN201310106572.3A priority Critical patent/CN103152558B/en
Publication of CN103152558A publication Critical patent/CN103152558A/en
Application granted granted Critical
Publication of CN103152558B publication Critical patent/CN103152558B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

本发明提供了一种基于场景识别的入侵检测方法,属于智能视频监控技术领域。该方法有效解决了在动态背景下视频区域实时入侵检测的问题。本发明包括如下步骤:初始化:将整个视频区域划分为N×N个图像块,并计算每个图像块的均值和标准差。输入监控区域视频图像:输入的图像是通过监控摄像头实时采集得到的视频图像,也可以是由已采集的视频文件分解为多个帧组成的图像序列,按照时间顺序逐个输入图像;场景识别和入侵区域分析与处理:根据场景已有的正常模式,当前场景首先被有效的识别和匹配,然后通过计算每个图像块的模式偏差并与阈值比较,得到被入侵的视频区域,从而实现对监控视频的入侵检测。主要用于入侵检测。

The invention provides an intrusion detection method based on scene recognition, which belongs to the technical field of intelligent video monitoring. This method effectively solves the problem of real-time intrusion detection in video areas under dynamic background. The invention includes the following steps: initialization: divide the whole video area into N*N image blocks, and calculate the mean value and standard deviation of each image block. Input the video image of the monitoring area: the input image is the video image collected in real time by the surveillance camera, or it can be an image sequence composed of multiple frames by decomposing the collected video file, and input the image one by one according to the time sequence; scene recognition and intrusion Area analysis and processing: According to the existing normal mode of the scene, the current scene is firstly effectively identified and matched, and then the intruded video area is obtained by calculating the mode deviation of each image block and comparing it with the threshold, so as to realize the surveillance video intrusion detection. Mainly used for intrusion detection.

Description

基于场景识别的入侵检测方法Intrusion Detection Method Based on Scene Recognition

技术领域technical field

本发明属于智能视频监控技术领域。The invention belongs to the technical field of intelligent video surveillance.

背景技术Background technique

入侵检测是智能安防系统的重要组成部分,被广泛应用于对重点区域的监视和防护,如军事重地,铁路,博物馆,试验场,危险区,警戒区等。与安装特殊的传感器设备相比(如红外线、声控设备),基于视频图像的入侵检测具有检测覆盖范围大,安装简单,维护方便,工程造价低,适用面广等特点,因而成为目前入侵检测技术研究的热点。Intrusion detection is an important part of the intelligent security system, and it is widely used in the monitoring and protection of key areas, such as military important areas, railways, museums, testing grounds, dangerous areas, warning areas, etc. Compared with installing special sensor equipment (such as infrared rays and voice-activated equipment), intrusion detection based on video images has the characteristics of large detection coverage, simple installation, convenient maintenance, low engineering cost, and wide application, so it has become the current intrusion detection technology. research hotspot.

基于视频图像的入侵检测是利用计算机视觉技术对监控场景的视频图像内容进行分析,自动检测监控画面中的异常情况,并警报和提供有用信息,从而能够更加有效地提醒安防人员及时处理非法入侵。目前,基于视频图像的入侵检测方法主要有基于灰度比较法、背景差法、帧间差法和光流法,这些方法都是通过从视频序列中检测出运动目标来实现入侵检测和报警功能。灰度比较法采用对背景和目标的灰度统计值来检测运动目标,但它对环境光线的变化十分敏感。背景差法通过计算当前输入帧图像与背景图像的差值以提取运动目标,但背景图像需实时刷新,其检测精度很大程度上依赖于背景图像的可靠性。帧间差法是将相邻两帧或者多帧相减,对保留的运动目标信息进行检测。尽管该方法受环境光变化影响小,但是当摄像头的抖动而引起相邻两帧背景点的相应“抖动”时,该方法不能完全将背景滤除,从而引起误判;此外,该方法对于静止或运动速度过慢的目标,不能有效检测。光流法是通过对图像像素点的运动场进行分析,进而提取运动目标,该方法同样难以处理动态背景下的目标检测问题。以上这些方法均无法有效解决动态背景下的入侵检测问题,如移动的摄像头,场景切换等,且适应能力差,扩展性不强。Intrusion detection based on video image is to use computer vision technology to analyze the video image content of the monitoring scene, automatically detect abnormal conditions in the monitoring screen, and alarm and provide useful information, so as to more effectively remind security personnel to deal with illegal intrusion in a timely manner. At present, intrusion detection methods based on video images mainly include grayscale comparison method, background difference method, frame difference method and optical flow method. These methods realize intrusion detection and alarm functions by detecting moving targets from video sequences. The gray comparison method uses the gray statistical value of the background and the target to detect the moving target, but it is very sensitive to the change of the ambient light. The background difference method extracts the moving target by calculating the difference between the current input frame image and the background image, but the background image needs to be refreshed in real time, and its detection accuracy largely depends on the reliability of the background image. The inter-frame difference method is to subtract two adjacent frames or multiple frames to detect the retained moving target information. Although this method is less affected by changes in ambient light, when the shaking of the camera causes the corresponding "jitter" of the background points of two adjacent frames, this method cannot completely filter out the background, resulting in misjudgment; Or the target whose moving speed is too slow cannot be effectively detected. The optical flow method is to extract the moving target by analyzing the motion field of the image pixels, which is also difficult to deal with the target detection problem in the dynamic background. None of the above methods can effectively solve the problem of intrusion detection in dynamic backgrounds, such as moving cameras, scene switching, etc., and their adaptability is poor and their scalability is not strong.

鉴于此,本发明提出了一种基于场景识别的入侵检测方法。该方法将整个视频场景划分为多个子区域,即图像块,然后根据各个图像块的均值和标准差建立场景的各种正常模式(非入侵模式),接着在运行时对当前场景的模式进行识别,即将其与这些正常模式进行匹配,最后通过计算当前模式与对应匹配模式中各个图像块的偏差并比较阈值,得到被入侵的视频区域(由多个图像块组成),从而实现实时地入侵检测。In view of this, the present invention proposes an intrusion detection method based on scene recognition. This method divides the entire video scene into multiple sub-regions, that is, image blocks, and then establishes various normal modes (non-invasive modes) of the scene according to the mean and standard deviation of each image block, and then recognizes the mode of the current scene at runtime , that is, to match it with these normal patterns, and finally by calculating the deviation between the current pattern and each image block in the corresponding matching pattern and comparing the threshold, the invaded video area (composed of multiple image blocks) is obtained, so as to realize real-time intrusion detection .

发明内容Contents of the invention

本发明的目的是提供一种基于场景识别的入侵检测方法,它能有效地实现实时的视频区域入侵检测。由于随着视频流的输入,该入侵区域将根据各图像块被入侵情况动态地加以更新,因此该过程自动地实现了对入侵目标的运动跟踪。因此,本发明的方法可以用于不管是静态还是动态背景,固定摄像头还是移动摄像头的入侵检测任务,不仅检测更加准确,适应和扩展能力强,且结构简单,易于实现。The purpose of the present invention is to provide an intrusion detection method based on scene recognition, which can effectively realize real-time video area intrusion detection. As the video stream is input, the intrusion area will be dynamically updated according to the intrusion of each image block, so this process automatically realizes the motion tracking of the intrusion target. Therefore, the method of the present invention can be used for intrusion detection tasks of static or dynamic backgrounds, fixed cameras or mobile cameras, and not only has more accurate detection, strong adaptability and expansion capabilities, but also has a simple structure and is easy to implement.

本发明的目的是通过以下技术方案来实现的:所述技术方案包括如下步骤:The purpose of the present invention is achieved through the following technical solutions: said technical solution comprises the steps:

(1)初始化(1) Initialization

将整个视频区域划分为N×N个图像块,N的大小可根据视频所覆盖的实际区域范围设置,如N=30.根据图像的像素亮度值,计算每个图像块的均值和标准差。设第i个图像块的均值和标准差分别为μi和σi,则整个场景的模式Z为这N×N个图像块对应的均值和标准差组成的向量,即:Divide the entire video area into N×N image blocks, and the size of N can be set according to the actual area covered by the video, such as N=30. According to the pixel brightness value of the image, calculate the mean and standard deviation of each image block. Suppose the mean and standard deviation of the i-th image block are μ i and σ i respectively, then the mode Z of the entire scene is a vector composed of the mean and standard deviation corresponding to the N×N image blocks, namely:

Z=(μ1122,…,μii,…,μN×NN×N).Z=(μ 1122 ,…,μ ii ,…,μ N×NN×N ).

对于动态场景,各个图像块在不同情况下将具有不同的均值和标准差,因此动态场景将具有多个不同的模式。设Zk表示场景的第K个模式,该模式对应的第i个图像块的均值和标准差分别表示为μk,i和σk,i,则:For dynamic scenes, individual image patches will have different means and standard deviations in different situations, so dynamic scenes will have multiple different modes. Let Z k represent the Kth mode of the scene, and the mean value and standard deviation of the i-th image block corresponding to this mode are denoted as μ k,i and σ k,i respectively, then:

Zk=(μk,1k,1k,2k,2,…,μk,ik,i,…,μk,N×Nk,N×N).Z k = (μ k,1k,1k,2k,2 ,…,μ k,i , σ k ,i , …,μ k,N×Nk,N× N ).

对于固定的摄像头,场景的变化主要来自光照变化(如白天,夜间,灯光)和背景运动(如树木摇摆);而对于移动的摄像头,场景的变化将更多,即场景将具有更多的模式。在监控开始之前,获取场景可能的模式。具体为,对于固定摄像头,在多个时刻和各种天气情况下采集具有代表性的视频图像;对于移动摄像头,当摄像头每移动一定的角度(如每移动1度)则采集一组视频图像,这一组图像指在多个时刻和各种天气情况下采集得到的具有代表性的视频图像。根据以上得到的图像,计算场景的各个模式,这些模式均为尚未有入侵发生时场景的正常模式。For a fixed camera, the scene changes mainly come from lighting changes (such as day, night, lights) and background motion (such as tree swaying); while for a moving camera, the scene changes will be more, that is, the scene will have more modes . Get the possible modes of the scene before monitoring starts. Specifically, for a fixed camera, representative video images are collected at multiple times and under various weather conditions; for a mobile camera, a group of video images are collected every time the camera moves by a certain angle (such as every 1 degree), This set of images refers to representative video images collected at multiple times and under various weather conditions. According to the images obtained above, calculate various modes of the scene, and these modes are all normal modes of the scene when no intrusion has occurred.

(2)输入监控区域视频图像(2) Input the video image of the monitoring area

进行入侵检测的视频图像输入,输入的图像是通过监控摄像头实时采集得到的视频图像,也可以是由已采集的视频文件分解为多个帧组成的图像序列,按照时间顺序逐个输入的图像。如果输入图像为空,则整个流程中止。The video image input for intrusion detection, the input image is the video image collected in real time by the surveillance camera, or it can be an image sequence composed of multiple frames from the collected video file, and the image is input one by one according to the time sequence. If the input image is empty, the whole process is aborted.

(3)场景识别(3) Scene recognition

按照与初始化中相同的方法,计算当前时刻t监控图像的场景模式Zt,即:According to the same method as in the initialization, calculate the scene mode Z t of the monitoring image at the current moment t, namely:

ZZ tt == (( μμ 11 tt ,, σσ 11 tt ,, μμ 22 tt ,, σσ 22 tt ,, .. .. .. ,, μμ ii tt ,, σσ ii tt ,, .. .. .. ,, μμ NN ×× NN tt ,, σσ NN ×× NN tt )) ,,

其中,

Figure BDA00002986572600031
Figure BDA00002986572600032
分别表示场景模式Zt的第i个图像块的均值和标准差。设
Figure BDA00002986572600033
表示当前场景模式Zt与场景第K个正常模式的距离,则
Figure BDA00002986572600034
计算为:in,
Figure BDA00002986572600031
and
Figure BDA00002986572600032
Represent the mean value and standard deviation of the i-th image block of the scene mode Z t , respectively. set up
Figure BDA00002986572600033
Indicates the distance between the current scene mode Z t and the Kth normal mode in the scene, then
Figure BDA00002986572600034
Calculated as:

dd KK tt == ΣΣ ii == 11 NN ×× NN (( (( μμ ii tt -- μμ kk ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ,, ii )) 22 )) ..

计算并比较当前场景模式Zt与场景的所有正常模式的距离,设为所有距离中最小距离对应的场景正常模式的序号,即:Calculate and compare the distance between the current scene mode Z t and all normal modes of the scene, set is the serial number of the scene normal mode corresponding to the smallest distance among all distances, that is:

KK ^^ == argarg minmin KK ∈∈ Hh dd KK tt

其中,H为场景所有正常模式序号的集合。因此,场景识别的结果为,将场景的第个正常模式 Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) 作为当前场景Zt所属的模式,其中

Figure BDA000029865726000312
Figure BDA000029865726000313
分别表示场景模式
Figure BDA000029865726000314
的第i个图像块的均值和标准差。Among them, H is the set of all normal mode serial numbers of the scene. Therefore, the result of scene recognition is that the first normal mode Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) As the mode to which the current scene Z t belongs, where
Figure BDA000029865726000312
and
Figure BDA000029865726000313
Indicates the scene mode respectively
Figure BDA000029865726000314
The mean and standard deviation of the i-th image block of .

(4)入侵区域分析与处理(4) Analysis and treatment of intrusion areas

根据当前场景模式Zt与其所属的模式

Figure BDA000029865726000315
,计算每个图像块对应的模式偏差。设ei为第i个图像块对应的模式偏差,则ei计算为:According to the current scene mode Z t and the mode it belongs to
Figure BDA000029865726000315
, to calculate the mode deviation corresponding to each image patch. Let e i be the mode deviation corresponding to the i-th image block, then e i is calculated as:

ee ii == (( μμ ii tt -- μμ kk ^^ ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ^^ ,, ii )) 22 ..

对所有N×N个图像块,如果其偏差值大于阈值θe,则将该图像块标记为有入侵,否则为没有入侵。θe值可根据具体情况按照应用测试结果加以选择和设置。For all N×N image blocks, if the deviation value is greater than the threshold θ e , the image block is marked as intrusion, otherwise it is not intrusion. The value of θ e can be selected and set according to the application test results according to the specific situation.

因此,如果有一个及以上的图像块被标记为有入侵,则认为整个场景为被入侵状态,否则认为场景未被入侵。对于固定摄像头情形,在场景被入侵时可直接突出显示入侵区域(由多个图像块组成)并进行报警提示;对于移动摄像头,在场景被入侵时,首先应停止摄像头移动,然后突出显示入侵区域并报警。随着视频流的输入,入侵区域将根据各图像块被入侵情况动态地加以更新,因此该过程自动地实现了对入侵目标的运动跟踪。Therefore, if one or more image blocks are marked as being intruded, the whole scene is considered to be intruded, otherwise the scene is considered not to be intruded. For a fixed camera situation, when the scene is invaded, the intrusion area (composed of multiple image blocks) can be directly highlighted and an alarm prompt; for a mobile camera, when the scene is invaded, the camera movement should be stopped first, and then the intrusion area should be highlighted And call the police. With the input of the video stream, the intrusion area will be dynamically updated according to the intrusion of each image block, so the process automatically realizes the motion tracking of the intrusion target.

如果继续进行入侵检测,则跳转到(2),否则整个流程中止。If the intrusion detection continues, jump to (2), otherwise the whole process stops.

本发明的方法经过以上(1)~(4)的处理后,根据场景已有的正常模式,当前场景首先被有效的识别和匹配,然后通过计算每个图像块的模式偏差并与阈值比较,得到被入侵的视频区域,从而实现对监控视频的入侵检测。In the method of the present invention, after the above (1)-(4) processing, according to the existing normal mode of the scene, the current scene is firstly effectively identified and matched, and then by calculating the mode deviation of each image block and comparing it with the threshold value, The intruded video area is obtained, so as to realize the intrusion detection of the surveillance video.

本发明与现有技术相比的优点和积极效果:该方法通过对视频场景建立相应的模式,然后在运行时进行场景模式的识别和匹配,进而提取被入侵的视频区域,从而实现实时地入侵检测和跟踪。因此,本发明的方法可用于不管是静态还是动态背景,固定摄像头还是移动摄像头的入侵检测任务,不仅检测更加准确,适应和扩展能力强,且结构简单,易于实现。Advantages and positive effects of the present invention compared with the prior art: the method establishes a corresponding pattern for the video scene, then recognizes and matches the scene pattern at runtime, and then extracts the invaded video area, thereby realizing real-time intrusion detection and tracking. Therefore, the method of the present invention can be used for the intrusion detection task of static or dynamic background, fixed camera or mobile camera, not only the detection is more accurate, the adaptability and expansion ability are strong, but also the structure is simple and easy to implement.

附图说明Description of drawings

图1为本发明视频区域划分为图像块示意图Fig. 1 is the schematic diagram that the video area of the present invention is divided into image blocks

图2为本发明技术流程图Fig. 2 is technical flowchart of the present invention

具体实施方式Detailed ways

下面根据附图对本发明做进一步描述:The present invention will be further described below according to accompanying drawing:

根据本发明技术流程图的逻辑过程以及发明内容所描述的步骤即可实施本发明。本发明的方法可用于视频图像下入侵检测的各种场合。在用于入侵检测之前,首先通过处理不同时刻不同条件下具有代表性的场景图像,建立场景可能的各种正常模式或将视频区域划分为图像块;并且将视频监控摄像头安装在合适的位置,使视频范围可以覆盖所需的监控区域;然后采用合适的视频传输手段,如有线或者无线方式,在入侵检测过程中提取摄像头实时采集的视频图像,接着对这些图像按照本发明的方法对其进行场景识别和匹配,最后通过对场景中各图像块进行入侵分析,得到区域入侵检测结果。按照本发明的方法,可用于不管是静态还是动态背景,固定摄像头还是移动摄像头的入侵检测任务,不仅检测更加准确,适应和扩展能力强,且结构简单,易于实现。The present invention can be implemented according to the logical process of the technical flow chart of the present invention and the steps described in the summary of the invention. The method of the invention can be used in various occasions of intrusion detection under video images. Before being used for intrusion detection, firstly, by processing representative scene images under different conditions at different times, various normal modes of the scene may be established or the video area is divided into image blocks; and the video surveillance camera is installed in a suitable position, The video range can cover the required monitoring area; then adopt suitable video transmission means, such as wired or wireless mode, extract the video images collected by the camera in real time during the intrusion detection process, and then perform these images according to the method of the present invention Scene recognition and matching, and finally through the intrusion analysis of each image block in the scene, the regional intrusion detection results are obtained. According to the method of the present invention, it can be used for the intrusion detection tasks of static or dynamic background, fixed camera or mobile camera, not only the detection is more accurate, the adaptability and expansion ability are strong, but also the structure is simple and easy to realize.

本发明技术方案包括如下步骤:Technical scheme of the present invention comprises the steps:

(1)初始化(1) Initialization

将整个视频区域划分为N×N个图像块,N的大小可根据视频所覆盖的实际区域范围设置,如N=30.根据图像的像素亮度值,计算每个图像块的均值和标准差。设第i个图像块的均值和标准差分别为μi和σi,则整个场景的模式Z为这N×N个图像块对应的均值和标准差组成的向量,即:Divide the entire video area into N×N image blocks, and the size of N can be set according to the actual area covered by the video, such as N=30. According to the pixel brightness value of the image, calculate the mean and standard deviation of each image block. Suppose the mean and standard deviation of the i-th image block are μ i and σ i respectively, then the mode Z of the entire scene is a vector composed of the mean and standard deviation corresponding to the N×N image blocks, namely:

Z=(μ1122,…,μii,…,μN×NN×N).Z=(μ 1122 ,…,μ ii ,…,μ N×NN×N ).

对于动态场景,各个图像块在不同情况下将具有不同的均值和标准差,因此动态场景将具有多个不同的模式。设Zk表示场景的第K个模式,该模式对应的第i个图像块的均值和标准差分别表示为μk,i和σk,i,则:For dynamic scenes, individual image patches will have different means and standard deviations in different situations, so dynamic scenes will have multiple different modes. Let Z k represent the Kth mode of the scene, and the mean value and standard deviation of the i-th image block corresponding to this mode are denoted as μ k,i and σ k,i respectively, then:

Zk=(μk,1k,1k,2k,2,…,μk,ik,i,…,μk,N×Nk,N×N).Z k = (μ k,1k,1k,2k,2 ,…,μ k,i , σ k ,i , …,μ k,N×Nk,N× N ).

对于固定的摄像头,场景的变化主要来自光照变化(如白天,夜间,灯光)和背景运动(如树木摇摆);而对于移动的摄像头,场景的变化将更多,即场景将具有更多的模式。在监控开始之前,获取场景可能的模式。具体为,对于固定摄像头,在多个时刻和各种天气情况下采集具有代表性的视频图像;对于移动摄像头,当摄像头每移动一定的角度(如每移动1度)则采集一组视频图像,这一组图像指在多个时刻和各种天气情况下采集得到的具有代表性的视频图像。根据以上得到的图像,计算场景的各个模式,这些模式均为尚未有入侵发生时场景的正常模式。For a fixed camera, the scene changes mainly come from lighting changes (such as day, night, lights) and background motion (such as tree swaying); while for a moving camera, the scene changes will be more, that is, the scene will have more modes . Get the possible modes of the scene before monitoring starts. Specifically, for a fixed camera, representative video images are collected at multiple times and under various weather conditions; for a mobile camera, a group of video images are collected every time the camera moves by a certain angle (such as every 1 degree), This set of images refers to representative video images collected at multiple times and under various weather conditions. According to the images obtained above, calculate various modes of the scene, and these modes are all normal modes of the scene when no intrusion has occurred.

(2)输入监控区域视频图像(2) Input the video image of the monitoring area

进行入侵检测的视频图像输入,输入的图像是通过监控摄像头实时采集得到的视频图像,也可以是由已采集的视频文件分解为多个帧组成的图像序列,按照时间顺序逐个输入的图像。如果输入图像为空,则整个流程中止。The video image input for intrusion detection, the input image is the video image collected in real time by the surveillance camera, or it can be an image sequence composed of multiple frames from the collected video file, and the image is input one by one according to the time sequence. If the input image is empty, the whole process is aborted.

(3)场景识别(3) Scene recognition

按照与初始化中相同的方法,计算当前时刻t监控图像的场景模式Zt,即:According to the same method as in the initialization, calculate the scene mode Z t of the monitoring image at the current moment t, namely:

ZZ tt == (( μμ 11 tt ,, σσ 11 tt ,, μμ 22 tt ,, σσ 22 tt ,, .. .. .. ,, μμ ii tt ,, σσ ii tt ,, .. .. .. ,, μμ NN ×× NN tt ,, σσ NN ×× NN tt )) ,,

其中,

Figure BDA00002986572600052
Figure BDA00002986572600053
分别表示场景模式Zt的第i个图像块的均值和标准差。设表示当前场景模式Zt与场景第K个正常模式的距离,则
Figure BDA00002986572600055
计算为:in,
Figure BDA00002986572600052
and
Figure BDA00002986572600053
Represent the mean value and standard deviation of the i-th image block of the scene mode Z t , respectively. set up Indicates the distance between the current scene mode Z t and the Kth normal mode in the scene, then
Figure BDA00002986572600055
Calculated as:

dd KK tt == ΣΣ ii == 11 NN ×× NN (( (( μμ ii tt -- μμ kk ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ,, ii )) 22 )) ..

计算并比较当前场景模式Zt与场景的所有正常模式的距离,设

Figure BDA00002986572600062
为所有距离中最小距离对应的场景正常模式的序号,即:Calculate and compare the distance between the current scene mode Z t and all normal modes of the scene, set
Figure BDA00002986572600062
is the serial number of the scene normal mode corresponding to the smallest distance among all distances, that is:

KK ^^ == argarg minmin KK ∈∈ Hh dd KK tt

其中,H为场景所有正常模式序号的集合。因此,场景识别的结果为,将场景的第

Figure BDA00002986572600064
个正常模式 Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) 作为当前场景Zt所属的模式,其中
Figure BDA00002986572600066
分别表示场景模式
Figure BDA00002986572600067
的第i个图像块的均值和标准差。Among them, H is the set of all normal mode serial numbers of the scene. Therefore, the result of scene recognition is that the first
Figure BDA00002986572600064
normal mode Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) As the mode to which the current scene Z t belongs, where
Figure BDA00002986572600066
and Indicates the scene mode respectively
Figure BDA00002986572600067
The mean and standard deviation of the i-th image block of .

(4)入侵区域分析与处理(4) Analysis and treatment of intrusion areas

根据当前场景模式Zt与其所属的模式计算每个图像块对应的模式偏差。设ei为第i个图像块对应的模式偏差,则ei计算为:According to the current scene mode Z t and the mode it belongs to Calculate the pattern deviation corresponding to each image patch. Let e i be the mode deviation corresponding to the i-th image block, then e i is calculated as:

ee ii == (( μμ ii tt -- μμ kk ^^ ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ^^ ,, ii )) 22 ..

对所有N×N个图像块,如果其偏差值大于阈值θe,则将该图像块标记为有入侵,否则为没有入侵。θe值可根据具体情况按照应用测试结果加以选择和设置。For all N×N image blocks, if the deviation value is greater than the threshold θ e , the image block is marked as intrusion, otherwise it is not intrusion. The value of θ e can be selected and set according to the application test results according to the specific situation.

因此,如果有一个及以上的图像块被标记为有入侵,则认为整个场景为被入侵状态,否则认为场景未被入侵。对于固定摄像头情形,在场景被入侵时可直接突出显示入侵区域(由多个图像块组成)并进行报警提示;对于移动摄像头,在场景被入侵时,首先应停止摄像头移动,然后突出显示入侵区域并报警。随着视频流的输入,入侵区域将根据各图像块被入侵情况动态地加以更新,因此该过程自动地实现了对入侵目标的运动跟踪。Therefore, if one or more image blocks are marked as being intruded, the whole scene is considered to be intruded, otherwise the scene is considered not to be intruded. For a fixed camera situation, when the scene is invaded, the intrusion area (composed of multiple image blocks) can be directly highlighted and an alarm prompt; for a mobile camera, when the scene is invaded, the camera movement should be stopped first, and then the intrusion area should be highlighted And call the police. With the input of the video stream, the intrusion area will be dynamically updated according to the intrusion of each image block, so the process automatically realizes the motion tracking of the intrusion target.

如果继续进行入侵检测,则跳转到(2),否则整个流程中止。If the intrusion detection continues, jump to (2), otherwise the whole process stops.

本发明的方法经过以上(1)~(4)的处理后,根据场景已有的正常模式,当前场景首先被有效的识别和匹配,然后通过计算每个图像块的模式偏差并与阈值比较,得到被入侵的视频区域,从而实现对监控视频的入侵检测。In the method of the present invention, after the above (1)-(4) processing, according to the existing normal mode of the scene, the current scene is firstly effectively identified and matched, and then by calculating the mode deviation of each image block and comparing it with the threshold value, The intruded video area is obtained, so as to realize the intrusion detection of the surveillance video.

本发明方法可通过任何计算机程序设计语言(如C语言)编程实现,基于本发明方法实现的系统软件可在任何PC或者嵌入式系统中实现实时的区域入侵检测应用。The method of the present invention can be realized by programming any computer programming language (such as C language), and the system software realized based on the method of the present invention can realize real-time area intrusion detection application in any PC or embedded system.

Claims (2)

1.一种基于场景识别的入侵检测方法,包括如下步骤:1. An intrusion detection method based on scene recognition, comprising the steps of: (1)初始化(1) Initialization 将整个视频区域划分为N×N个图像块,根据图像的像素亮度值,计算每个图像块的均值和标准差,设第i个图像块的均值和标准差分别为μi和σi,则整个场景的模式Z为这N×N个图像块对应的均值和标准差组成的向量,即:Divide the entire video area into N×N image blocks, calculate the mean value and standard deviation of each image block according to the pixel brightness value of the image, set the mean value and standard deviation of the i-th image block to be μ i and σ i respectively, Then the mode Z of the entire scene is a vector composed of the mean and standard deviation corresponding to the N×N image blocks, namely: Z=(μ1122,…,μii,…,μN×NN×N).Z=(μ 1122 ,…,μ ii ,…,μ N×NN×N ). 对于动态场景,各个图像块在不同情况下将具有不同的均值和标准差,因此动态场景将具有多个不同的模式,设Zk表示场景的第K个模式,该模式对应的第i个图像块的均值和标准差分别表示为μk,i和σk,i,则:For dynamic scenes, each image block will have different means and standard deviations in different situations, so dynamic scenes will have multiple different modes, let Z k represent the Kth mode of the scene, and the i-th image corresponding to this mode The mean and standard deviation of the block are denoted as μ k,i and σ k,i respectively, then: Zk=(μk,1k,1k,2k,2,…,μk,ik,i,…,μk,N×Nk,N×N).Z k = (μ k,1k,1k,2k,2 ,…,μ k,i , σ k ,i , …,μ k,N×Nk,N× N ). 在监控开始之前,获取场景可能的模式,具体为,对于固定摄像头,在多个时刻和各种天气情况下采集具有代表性的视频图像;Obtain possible patterns of the scene before monitoring begins, specifically, for fixed cameras, capture representative video images at multiple times and under various weather conditions; (2)输入监控区域视频图像(2) Input the video image of the monitoring area 进行入侵检测的视频图像输入,输入的图像是通过监控摄像头实时采集得到的视频图像,也可以是由已采集的视频文件分解为多个帧组成的图像序列,按照时间顺序逐个输入图像;如果输入图像为空,则整个流程中止;The video image input for intrusion detection, the input image is the video image collected in real time by the surveillance camera, or it can be an image sequence composed of multiple frames from the captured video file, and the images are input one by one in time order; if the input If the image is empty, the entire process is aborted; (3)场景识别(3) Scene recognition 按照与初始化中相同的方法,计算当前时刻t监控图像的场景模式Zt,即:According to the same method as in the initialization, calculate the scene mode Z t of the monitoring image at the current moment t, namely: ZZ tt == (( μμ 11 tt ,, σσ 11 tt ,, μμ 22 tt ,, σσ 22 tt ,, .. .. .. ,, μμ ii tt ,, σσ ii tt ,, .. .. .. ,, μμ NN ×× NN tt ,, σσ NN ×× NN tt )) ,, 其中,
Figure FDA00002986572500012
分别表示场景模式Zt的第i个图像块的均值和标准差;设
Figure FDA00002986572500014
表示当前场景模式Zt与场景第K个正常模式的距离,则
Figure FDA00002986572500015
计算为:
in,
Figure FDA00002986572500012
and Represent the mean value and standard deviation of the i-th image block of the scene mode Z t respectively; set
Figure FDA00002986572500014
Indicates the distance between the current scene mode Z t and the Kth normal mode in the scene, then
Figure FDA00002986572500015
Calculated as:
dd KK tt == ΣΣ ii == 11 NN ×× NN (( (( μμ ii tt -- μμ kk ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ,, ii )) 22 )) .. 计算并比较当前场景模式Zt与场景的所有正常模式的距离,设
Figure FDA00002986572500021
为所有距离中最小距离对应的场景正常模式的序号,即:
Calculate and compare the distance between the current scene mode Z t and all normal modes of the scene, set
Figure FDA00002986572500021
is the serial number of the scene normal mode corresponding to the smallest distance among all distances, that is:
KK ^^ == argarg minmin KK ∈∈ Hh dd KK tt 其中,H为场景所有正常模式序号的集合;因此,场景识别的结果为,将场景的第
Figure FDA00002986572500023
个正常模式 Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) 作为当前场景Zt所属的模式,其中
Figure FDA00002986572500025
Figure FDA00002986572500026
分别表示场景模式
Figure FDA00002986572500029
的第i个图像块的均值和标准差;
Among them, H is the set of all normal mode serial numbers of the scene; therefore, the result of scene recognition is that the first scene of the scene
Figure FDA00002986572500023
normal mode Z K ^ = ( μ k ^ , 1 , σ k ^ , 1 , μ k ^ , 2 , σ k ^ , 2 , . . . , μ k ^ , i , σ k ^ , i , . . . , μ k ^ , N × N , σ k ^ , N × N ) As the mode to which the current scene Z t belongs, where
Figure FDA00002986572500025
and
Figure FDA00002986572500026
Indicates the scene mode respectively
Figure FDA00002986572500029
The mean and standard deviation of the i-th image block of ;
(4)入侵区域分析与处理(4) Analysis and treatment of intrusion areas 根据当前场景模式Zt与其所属的模式计算每个图像块对应的模式偏差,设ei为第i个图像块对应的模式偏差,则ei计算为:According to the current scene mode Z t and the mode it belongs to Calculate the mode deviation corresponding to each image block, let e i be the mode deviation corresponding to the i-th image block, then e i is calculated as: ee ii == (( μμ ii tt -- μμ kk ^^ ,, ii )) 22 ++ (( σσ ii tt -- σσ kk ^^ ,, ii )) 22 .. 对所有N×N个图像块,如果其偏差值大于阈值θe,则将该图像块标记为有入侵,否则为没有入侵,θe值可根据具体情况按照应用测试结果加以选择和设置;For all N×N image blocks, if the deviation value is greater than the threshold θ e , the image block is marked as intrusion, otherwise it is not intrusion, and the value of θ e can be selected and set according to the application test results according to the specific situation; 经过以上(1)~(4)的处理后,根据场景已有的正常模式,当前场景首先被有效的识别和匹配,然后通过计算每个图像块的模式偏差并与阈值比较,得到被入侵的视频区域,从而实现对监控视频的入侵检测。After the above (1)-(4) processing, according to the existing normal mode of the scene, the current scene is firstly recognized and matched effectively, and then by calculating the mode deviation of each image block and comparing it with the threshold, the intruded image is obtained. Video area, so as to realize the intrusion detection of surveillance video.
2.根据权利要求1所述的一种基于场景识别的入侵检测方法,其特征在于:对于移动摄像头,当摄像头每移动一定的角度,则采集一组视频图像,该图像为在多个时刻和各种天气情况下采集得到的具有代表性的视频图像;根据以上得到的图像,计算场景的各个模式,该模式均为尚未有入侵发生时场景的正常模式。2. A kind of intrusion detection method based on scene recognition according to claim 1, characterized in that: for a mobile camera, when the camera moves a certain angle, a group of video images are collected, and the images are at multiple moments and Representative video images collected under various weather conditions; based on the images obtained above, calculate the various modes of the scene, which are the normal modes of the scene when no intrusion has occurred.
CN201310106572.3A 2013-03-29 2013-03-29 Based on the intrusion detection method of scene Recognition Expired - Fee Related CN103152558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310106572.3A CN103152558B (en) 2013-03-29 2013-03-29 Based on the intrusion detection method of scene Recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310106572.3A CN103152558B (en) 2013-03-29 2013-03-29 Based on the intrusion detection method of scene Recognition

Publications (2)

Publication Number Publication Date
CN103152558A true CN103152558A (en) 2013-06-12
CN103152558B CN103152558B (en) 2015-10-07

Family

ID=48550403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310106572.3A Expired - Fee Related CN103152558B (en) 2013-03-29 2013-03-29 Based on the intrusion detection method of scene Recognition

Country Status (1)

Country Link
CN (1) CN103152558B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815960A (en) * 2017-02-15 2017-06-09 山东科技大学 A kind of method for reducing Forest Fire Alarm rate of false alarm
CN108198367A (en) * 2018-01-16 2018-06-22 西门子工厂自动化工程有限公司 Data acquire and monitoring control method, system, device and computer storage media
CN109655932A (en) * 2019-01-25 2019-04-19 宁波中车时代传感技术有限公司 A kind of method and system of the gate foreign bodies detection based on image recognition and alarm
CN111881863A (en) * 2020-08-03 2020-11-03 成都西交智汇大数据科技有限公司 Regional group abnormal behavior detection method
CN113115085A (en) * 2021-04-16 2021-07-13 海信电子科技(武汉)有限公司 Video playing method and display equipment
CN113408450A (en) * 2021-06-27 2021-09-17 樊嘉烨 Image processing method for intelligently sensing wild cat intrusion
CN114429761A (en) * 2022-04-01 2022-05-03 南京有物信息科技有限公司 Display control method, device and system suitable for multiple terminals
WO2025060196A1 (en) * 2023-09-22 2025-03-27 武汉虹信技术服务有限责任公司 Intrusion detection method and device based on self-learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256626A (en) * 2008-02-28 2008-09-03 王路 Method for monitoring instruction based on computer vision
US7616817B2 (en) * 2007-04-12 2009-11-10 The United States Of America As Represented By The Secretary Of The Navy Three dimensional shape correlator
CN101835035A (en) * 2010-06-04 2010-09-15 天津市亚安科技电子有限公司 Regional invasion real-time detection method
CN102546638A (en) * 2012-01-12 2012-07-04 冶金自动化研究设计院 Scene-based hybrid invasion detection method and system
CN102538695A (en) * 2010-12-15 2012-07-04 无锡物联网产业研究院 Security detection method and related device thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7616817B2 (en) * 2007-04-12 2009-11-10 The United States Of America As Represented By The Secretary Of The Navy Three dimensional shape correlator
CN101256626A (en) * 2008-02-28 2008-09-03 王路 Method for monitoring instruction based on computer vision
CN101835035A (en) * 2010-06-04 2010-09-15 天津市亚安科技电子有限公司 Regional invasion real-time detection method
CN102538695A (en) * 2010-12-15 2012-07-04 无锡物联网产业研究院 Security detection method and related device thereof
CN102546638A (en) * 2012-01-12 2012-07-04 冶金自动化研究设计院 Scene-based hybrid invasion detection method and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815960A (en) * 2017-02-15 2017-06-09 山东科技大学 A kind of method for reducing Forest Fire Alarm rate of false alarm
CN106815960B (en) * 2017-02-15 2018-10-02 山东科技大学 A method of reducing Forest Fire Alarm rate of false alarm
CN108198367A (en) * 2018-01-16 2018-06-22 西门子工厂自动化工程有限公司 Data acquire and monitoring control method, system, device and computer storage media
CN109655932A (en) * 2019-01-25 2019-04-19 宁波中车时代传感技术有限公司 A kind of method and system of the gate foreign bodies detection based on image recognition and alarm
CN111881863A (en) * 2020-08-03 2020-11-03 成都西交智汇大数据科技有限公司 Regional group abnormal behavior detection method
CN111881863B (en) * 2020-08-03 2021-04-13 成都西交智汇大数据科技有限公司 Regional group abnormal behavior detection method
CN113115085A (en) * 2021-04-16 2021-07-13 海信电子科技(武汉)有限公司 Video playing method and display equipment
CN113408450A (en) * 2021-06-27 2021-09-17 樊嘉烨 Image processing method for intelligently sensing wild cat intrusion
CN114429761A (en) * 2022-04-01 2022-05-03 南京有物信息科技有限公司 Display control method, device and system suitable for multiple terminals
WO2025060196A1 (en) * 2023-09-22 2025-03-27 武汉虹信技术服务有限责任公司 Intrusion detection method and device based on self-learning

Also Published As

Publication number Publication date
CN103152558B (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN103152558B (en) Based on the intrusion detection method of scene Recognition
CN103400111B (en) Method for detecting fire accident on expressway or in tunnel based on video detection technology
CN100585656C (en) A rule-based all-weather intelligent video analysis and monitoring method
US9412027B2 (en) Detecting anamolous sea-surface oil based on a synthetic discriminant signal and learned patterns of behavior
CN104680555B (en) Cross the border detection method and out-of-range monitoring system based on video monitoring
US8614744B2 (en) Area monitoring using prototypical tracks
KR102195706B1 (en) Method and Apparatus for Detecting Intruder
US20180286075A1 (en) Setting Different Background Model Sensitivities by User Defined Regions and Background Filters
CN106781165A (en) A kind of indoor multi-cam intelligent linkage supervising device based on depth sensing
CN105574468B (en) Video flame detection method, device and system
CN100555348C (en) Bank self-service equipment intelligent video surveillance system
KR102434154B1 (en) Method for tracking multi target in traffic image-monitoring-system
CN108376246A (en) A kind of identification of plurality of human faces and tracking system and method
CN112270253A (en) High-altitude parabolic detection method and device
Sharma Human detection and tracking using background subtraction in visual surveillance
KR20150034398A (en) A Parking Event Detection System Based on Object Recognition
CN105141887A (en) Submarine cable area video alarming method based on thermal imaging
CN103888731A (en) Structured description device and system for mixed video monitoring by means of gun-type camera and dome camera
KR101375186B1 (en) Method for detecting disturbance of monitoring camera
CN108737785B (en) Indoor automatic detection system that tumbles based on TOF 3D camera
CN103489202A (en) Intrusion detection method based on videos
CN108765833A (en) Based on the incipient fire detection algorithm for improving mixed Gaussian and machine learning
CN104574340A (en) Video intrusion detection method based on historical images
CN105513372B (en) Capture and recognition method for vehicles equipped with license plate anti-photographer
Liang et al. Real time intrusion detection system for outdoor environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151007

Termination date: 20180329

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