WO2022027931A1 - 基于视频图像的运动车辆前景检测方法 - Google Patents

基于视频图像的运动车辆前景检测方法 Download PDF

Info

Publication number
WO2022027931A1
WO2022027931A1 PCT/CN2021/071366 CN2021071366W WO2022027931A1 WO 2022027931 A1 WO2022027931 A1 WO 2022027931A1 CN 2021071366 W CN2021071366 W CN 2021071366W WO 2022027931 A1 WO2022027931 A1 WO 2022027931A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
background
frame
foreground
video
Prior art date
Application number
PCT/CN2021/071366
Other languages
English (en)
French (fr)
Inventor
胡伍生
余倩
余龙飞
张志伟
沙月进
Original Assignee
东南大学
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 东南大学 filed Critical 东南大学
Publication of WO2022027931A1 publication Critical patent/WO2022027931A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the invention belongs to the field of image processing, and particularly relates to a method for detecting the foreground of a moving vehicle.
  • Video surveillance technology is closely related to people's lives and is widely used in finance, public security, transportation and other fields. With the development of computer technology, video surveillance is becoming more and more intelligent. In terms of road traffic, intelligent video surveillance can timely detect various abnormal driving conditions. Vehicles, timely warning, reduce the occurrence of traffic accidents, and find that traffic accidents can be quickly dealt with, shorten the time to clear the accident scene, relieve temporary traffic congestion, and reduce the impact of accidents on road traffic.
  • Moving target detection is the basic step of video surveillance processing. Moving target detection is to extract the changing target in the video sequence from the background, and prepare for the next step such as target classification and tracking.
  • the optical flow method assigns an initial velocity vector to each pixel in the image, dynamically analyzes the velocity vector characteristics of each pixel in the image, and finds out that the area formed by the changed pixels is the foreground area of the moving target.
  • the calculation is complex, and it is difficult to realize real-time detection;
  • the inter-frame difference method is to differentiate the adjacent frame images of the video sequence.
  • the algorithm principle is simple and easy to implement, and the processing speed is fast.
  • the disadvantage is that the detected target will appear hollow; Model, which differentiates the current frame of the video sequence from the background.
  • the background model building methods include: mean background modeling, median background modeling, vibe algorithm and mixed Gaussian background modeling GMM.
  • the area detected by the background difference method is relatively complete, but will Affected by changes in illumination, external noise, etc., the background will change and the detected target will be inaccurate.
  • the present invention proposes a method for detecting the foreground of a moving vehicle based on a video image.
  • the technical scheme of the present invention is:
  • the foreground detection method of moving vehicles based on video images includes the following steps:
  • Preprocess the color video frame image convert the color image into a grayscale image, and then use median filtering to denoise the grayscale image;
  • step (3) background modeling is performed on the preprocessed video frame image in step (1) to obtain a background differential image, and the background differential image is binarized and set as a mask and updated with the current frame image;
  • step (3) Perform a logical OR operation on the result obtained in step (2) and the result obtained in step (3), and perform morphological processing to extract a complete foreground target image.
  • step (2) the steps of the improved five-frame difference method are as follows:
  • (201) select five adjacent frames of images in the video frame, and take the kth frame as an intermediate frame to perform frame difference operation with the first two frames of images and the last two frames of images respectively:
  • I k-2 (x, y), I k-1 (x, y), I k (x, y), I k+1 (x, y), I k+2 (x, y) ) represents five adjacent frames of images
  • d k,k-2 (x,y) represents the difference result between the kth frame image and the k-2th frame image
  • d k,k-1 (x,y) represents the kth frame
  • d k+1,k (x,y) represents the difference result between the k+1th frame image and the kth frame image
  • d k+2,k (x,y) Indicates the difference result between the k+2 frame image and the kth frame image;
  • g 1 (x,y) is the result of the logical OR operation of d k,k-2 (x,y) and d k+2,k (x,y), and g 2 (x,y) is d k,k-1 (x,y) and d k+1,k (x,y) logical OR operation result;
  • G k (x,y) g 1 (x,y) ⁇ g 2 (x,y)
  • G k (x, y) is the target contour of the k-th frame image
  • step (204) the method for binarizing G k (x, y) is as follows:
  • b(x, y) is the binarized image
  • T is the segmentation threshold
  • step (204) use the prewitt edge detection operator to perform edge extraction on the kth frame image to obtain the edge information of the target, and perform binarization processing on the edge information to obtain the foreground edge map of the target B p (x , y), and then perform a logical AND operation on the binarized image of the foreground edge map B p (x, y) and G k (x, y).
  • step (3) the steps of the background modeling are as follows:
  • B K (x, y) is the initial background image
  • f i (x, y) is the ith video image
  • K is the number of video image frames
  • I K (x, y) is the background difference image
  • F i (x, y) is the current frame image
  • the background difference image is binarized and set as a mask, and the background is updated.
  • step (303) the area with the pixel gray value of 0 in the mask represents the background area, and the area with the pixel gray value of 1 represents the foreground area.
  • step (303) replace the pixel point with the pixel grayscale value of 1 in the mask into the pixel point of the current video frame, and obtain the foreground region part G d (x, y) in the corresponding mask of the current frame image. ;
  • "Not" operation obtain the background area with pixel gray value of 1, and the foreground area with pixel gray value of 0; then extract the background area B d (x, y) in the mask corresponding to the current frame image, and the initial background image corresponds to The background area B b (x, y) in the mask;
  • the background is updated according to the following formula:
  • B(x, y) is the updated background image, and ⁇ is the update rate
  • the difference operation is performed between the updated background image and the next frame image to obtain the next frame background difference image, and then the background is updated until the last frame image of the input video sequence is reached.
  • the morphological processing includes using an expansion operation to fill the target hollow portion and an erosion operation to eliminate noise points in the background.
  • the invention combines the frame difference method and the background difference method, overcomes the shortcomings of a single method, improves the accuracy of foreground detection in the case of illumination changes, background disturbances, etc.
  • the background image must be a clean background to improve the accuracy of background modeling.
  • Fig. 1 is the overall flow chart of the present invention
  • Fig. 2 is the improved five-frame difference method flow chart in the present invention
  • Fig. 3 is the improved background difference method flow chart in the present invention.
  • FIG. 4 is a graph of the test results in the embodiment.
  • the present invention designs a method for detecting the foreground of a moving vehicle based on a video image, as shown in Figure 1, the steps are as follows:
  • Step 1 Preprocess the color video frame image: Convert the color image to a grayscale image, and then use median filtering to denoise the grayscale image.
  • Step 2 Process the video frame image preprocessed in Step 1 by the improved five-frame difference method.
  • Step 3 Perform background modeling on the video frame image preprocessed in step 1 to obtain a background difference image, set the background difference image into a mask after binarization, and perform background update with the current frame image.
  • Step 4 Perform a logical OR operation on the result obtained in step 2 and the result obtained in step 3, and perform morphological processing to extract a complete foreground target image.
  • This example uses the Changedetection dataset launched at the 2012 CVPR International Conference IEEE Change Detection Workshop.
  • the advantage of this dataset is that the video scenes are rich, and each frame has accurate manual annotations, and a variety of algorithms are published on its official website. evaluation results.
  • the color image is converted into a grayscale image as follows:
  • f(x, y) represents the gray value at the point (x, y)
  • R(x, y) represents the R channel value of the point
  • G(x, y) represents the G channel value of the point
  • B(x,y) represents the B channel value of this point
  • 0.30, 0.59, 0.11 represent the proportion of each channel component.
  • Step 201 Select 5 adjacent frames of images in the video frame, and use the kth frame as an intermediate frame to perform frame difference operation with the first two frames of images and the last two frames of images respectively:
  • I k-2 (x, y), I k-1 (x, y), I k (x, y), I k+1 (x, y), I k+2 (x, y) ) represents five adjacent frames of images
  • d k,k-2 (x,y) represents the difference result between the kth frame image and the k-2th frame image
  • d k,k-1 (x,y) represents the kth frame
  • d k+1,k (x,y) represents the difference result between the k+1th frame image and the kth frame image
  • d k+2,k (x,y) Indicates the difference result between the k+2th frame image and the kth frame image.
  • Step 202 Compare d k,k-2 (x,y) with dk+2,k (x,y), dk,k-1 (x,y) and dk+1,k (x,y) ) to perform a logical OR operation respectively:
  • g 1 (x,y) is the result of the logical OR operation of d k,k-2 (x,y) and d k+2,k (x,y), and g 2 (x,y) is The result of the logical OR operation of d k,k-1 (x,y) and d k+1,k (x,y).
  • Step 203 In order to restrain the target overlapping phenomenon caused by the logical OR operation, perform a logical AND operation result on g 1 (x,y) and g 2 (x, y) to obtain the target contour of the kth frame image:
  • G k (x,y) g 1 (x,y) ⁇ g 2 (x,y)
  • G k (x, y) is the target contour of the k-th frame image.
  • Step 204 combine the G k (x, y) binarization with an edge detection operator to obtain the foreground area of the intermediate frame of the adjacent 5 frames of images.
  • the prewitt edge detection operator is used to extract the edge of the k-th frame image to obtain the edge information of the target, and the edge information is binarized to obtain the foreground edge map B p (x, y) of the target, and then the foreground edge map B p (x, y) is obtained.
  • the edge map B p (x, y) and G k (x, y) binarized images are subjected to a logical AND operation.
  • Step 301 select the consecutive images of K frames before the video sequence, sum them up and take the average value, and the obtained average value image is used as the initial background image:
  • B K (x, y) is the initial background image
  • f i (x, y) is the ith video image
  • K is the number of video image frames.
  • Step 302 Read the current frame image, and perform a difference operation between the current frame image and the initial background image to obtain a background difference image:
  • I K (x, y) is the background difference image
  • F i (x, y) is the current frame image
  • Step 303 set the background difference image into a mask after binarization processing, and update the background.
  • the area with the pixel gray value of 0 represents the background area
  • the area with the pixel gray value of 1 represents the foreground area.
  • a pixel whose gray value is 1 is replaced by the pixel of the initial background image, and the foreground area part G b (x, y) in the mask corresponding to the initial background image is obtained;
  • the background area with a grayscale value of 1, and the foreground area with a pixel grayscale value of 0; then extract the background area B d (x, y) in the mask corresponding to the current frame image, and the initial background image corresponds to the background area B in the mask b (x,y);
  • the background is updated according to the following formula
  • B(x, y) is the updated background image
  • is the update rate
  • the difference operation is performed between the updated background image and the next frame image to obtain the next frame background difference image, and then the background is updated until the last frame image of the input video sequence is reached.
  • the morphological processing includes filling the hollow part of the target with a dilation operation and removing noise points in the background with an erosion operation, so as to make the original foreground binary image more complete, and remove the discontinuity and hole phenomenon at the edge to obtain the foreground target image.
  • Fig. 4 is the effect comparison diagram of the present invention and other algorithms
  • (a) in Fig. 4 is the input original image
  • (b) is the detection result diagram of the three-frame difference method
  • (c) is the five-frame difference method detection result diagram
  • ( d) is the detection result diagram of the background difference method
  • (e) is the detection result diagram of the algorithm of the present invention.
  • the three-frame difference method detects serious voids in moving vehicles, and the vehicles far away from the camera are basically unable to be detected.
  • the algorithm of the present invention can detect a more complete vehicle, the detected vehicle outline is clearer than other methods, and the influence of the surrounding environment is overcome, and the detected noise points are reduced.
  • the embodiment is only to illustrate the technical idea of the present invention, and cannot limit the protection scope of the present invention. Any changes made on the basis of the technical solution according to the technical idea proposed by the present invention all fall within the protection scope of the present invention. .

Abstract

基于视频图像的运动车辆前景检测方法,包括:对彩色视频帧图像进行预处理:将彩色图转换为灰度图,然后利用中值滤波对灰度图进行降噪处理;对经预处理后的视频帧图像进行改进的五帧差分法处理;对经预处理后的视频帧图像进行背景建模,得到背景差分图像,将该背景差分图像二值化后设置成掩膜并与当前帧图像进行背景更新;将五帧差分法结果与背景差分法结果进行逻辑"或"运算,并进行形态学处理,提取完整的前景目标图像。相比于传统方法,可以在光照变化、背景扰动等情况下提高前景检测的准确度。

Description

基于视频图像的运动车辆前景检测方法 技术领域
本发明属于图像处理领域,特别涉及了一种运动车辆前景检测方法。
背景技术
视频监控技术与人们的生活息息相关,大量应用于金融、公安、交通等领域,随着计算机技术的发展,视频监控越来越智能化,在道路交通方面智能视频监控能及时发现各种异常行驶的车辆,及时预警,减少交通事故的发生,并且发现交通事故发生能快速进行处理,缩短清理事故现场时间,缓解暂时的交通拥堵,降低因事故对道路交通的影响。运动目标检测是视频监控处理的基本步骤,运动目标检测就是将视频序列中变化的目标从背景中提取出来,为下一步目标分类、跟踪等处理做准备。
在真实的环境中,由于受到光照的影响、相机的抖动、背景中树叶等的抖动干扰,会对运动目标检测效果产生影响。传统的前景提取方法包括光流法、帧间差分法和背景差分法。光流法即对图像中的每一个像素点赋予一个初始速度矢量,动态分析图像中各像素点的速度矢量特性,找出变化的像素点构成的区域即为运动目标前景区域,光流法算法计算复杂,难以实现实时检测;帧间差分法即将视频序列的相邻帧图像进行差分,算法原理简单易于实现,处理速度快,缺点是检测的目标会出现空洞现象;背景差分法即建立一个背景模型,将视频序列当前帧与背景差分,背景模型建立方法有:均值背景建模、中值背景建模、vibe算法和混合高斯背景建模GMM,背景差分法检测到的区域较为完整,但会受到光照变化、外界噪声等的干扰,会使背景发生变化导致检测的目标不准确。
发明内容
为了解决上述背景技术提到的技术问题,本发明提出了基于视频图像的运动车辆前景检测方法。
为了实现上述技术目的,本发明的技术方案为:
基于视频图像的运动车辆前景检测方法,包括以下步骤:
(1)对彩色视频帧图像进行预处理:将彩色图转换为灰度图,然后利用中值滤波对灰度图进行降噪处理;
(2)对经步骤(1)预处理后的视频帧图像进行改进的五帧差分法处理;
(3)对经步骤(1)预处理后的视频帧图像进行背景建模,得到背景差分图像,将该背景差分图像二值化后设置成掩膜并与当前帧图像进行背景更新;
(4)将步骤(2)得到的结果与步骤(3)得到的结果进行逻辑“或”运算,并进行形态学处理,提取完整的前景目标图像。
进一步地,在步骤(2)中,所述改进的五帧差分法的步骤如下:
(201)选取视频帧中相邻的5帧图像,将第k帧当作中间帧分别与前两帧图像和后两帧图像进行帧差运算:
d k,k-2(x,y)=|I k(x,y)-I k-2(x,y)|
d k,k-1(x,y)=|I k(x,y)-I k-1(x,y)|
d k+1,k(x,y)=|I k+1(x,y)-I k(x,y)|
d k+2,k(x,y)=|I k+2(x,y)-I k(x,y)|
上式中,I k-2(x,y)、I k-1(x,y)、I k(x,y)、I k+1(x,y)、I k+2(x,y)表示相邻5帧图像,d k,k-2(x,y)表示第k帧图像与第k-2帧图像的差分结果,d k,k-1(x,y)表示第k帧图像与第k-1帧图像的差分结果,d k+1,k(x,y)表示第k+1帧图像与第k帧图像的差分结果,d k+2,k(x,y)表示第k+2帧图像与第k帧图像的差分结果;
(202)将d k,k-2(x,y)与d k+2,k(x,y)、d k,k-1(x,y)与d k+1,k(x,y)分别进行逻辑“或”运算:
g 1(x,y)=d k,k-2(x,y)∪d k+2,k(x,y)
g 2(x,y)=d k,k-1(x,y)∪d k+1,k(x,y)
上式中,g 1(x,y)为d k,k-2(x,y)与d k+2,k(x,y)逻辑“或”运算结果,g 2(x,y)为d k,k-1(x,y)与d k+1,k(x,y)逻辑“或”运算结果;
(203)将g 1(x,y)与g 2(x,y)进行逻辑“与”运算结果,得到第k帧图像的目标轮廓:
G k(x,y)=g 1(x,y)∩g 2(x,y)
上式中,G k(x,y)为第k帧图像的目标轮廓;
(204)将G k(x,y)二值化处理后与边缘检测算子结合,得到相邻5帧图像中间帧的前景区域。
进一步地,在步骤(204)中,对G k(x,y)进行二值化处理的方法如下:
Figure PCTCN2021071366-appb-000001
上式中,b(x,y)为二值化图像,T为分割阈值。
进一步地,在步骤(204)中,采用prewitt边缘检测算子对第k帧图像进行边缘提取,获得目标的边缘信息,并对边缘信息进行二值化处理获得目标的前景边缘图B p(x,y),然后将前景边缘图B p(x,y)与G k(x,y)二值化处理后的图像进行逻辑“与”运算。
进一步地,在步骤(3)中,所述背景建模的步骤如下:
(301)选取视频序列前K帧连续图像,将其求和后取平均值,得到的均值图像作为初始背景图像:
Figure PCTCN2021071366-appb-000002
上式中,B K(x,y)为初始背景图像,f i(x,y)为第i帧视频图像,K为视频图像帧数;
(302)读取当前帧图像,将当前帧图像与初始背景图像作差运算得到背景差分图像:
I K(x,y)=F i(x,y)-B K(x,y)
上式中,I K(x,y)为背景差分图像,F i(x,y)为当前帧图像;
(303)将背景差分图像二值化处理后设置成掩模,进行背景更新。
进一步地,在步骤(303)中,掩模中像素灰度值为0的区域代表背景区域,像素灰度值为1的区域代表前景区域。
进一步地,在步骤(303)中,将掩模中像素灰度值为1的像素点替换成当前视频帧像素点,得到当前帧图像对应掩模中的前景区域部分G d(x,y);再次将掩模中每一个像素灰度值为1的像素点替换成初始背景图像像素点,得到初始背景图像对应掩模中的前景区域部分G b(x,y);将掩模取逻辑“非”运算,得到像素灰度值为1的背景区域,像素灰度值为0的前景区域;然后提取当前帧图像对应掩模中的背景区域B d(x,y),初始背景图像对应掩模中的背景区域B b(x,y);最后按照下式进行背景更新:
Figure PCTCN2021071366-appb-000003
上式中,B(x,y)为更新后的背景图像,α为更新速率;
将更新后的背景图像与与下一帧图像进行差分运算得到下一帧背景差分图像,再进行背景更新,直到输入视频序列最后一帧图像为止。
进一步地,在步骤(4)中,所述形态学处理包括采用膨胀操作填充目标空洞部分以及采用腐蚀操作消除背景中的噪声点。
采用上述技术方案带来的有益效果:
本发明将帧间差分法和背景差分法结合起来,克服了单一方法的不足,在光照变化、背景扰动等情况下提高前景检测的准确度,提出新的背景更新策略,能保证得到的新的背景图像一定是干净的背景,提高背景建模的准确性。
附图说明
图1是本发明的整体流程图;
图2是本发明中改进的五帧差分法流程图;
图3是本发明中改进的背景差分法流程图;
图4是实施例中测试结果图。
具体实施方式
以下将结合附图,对本发明的技术方案进行详细说明。
本发明设计了基于视频图像的运动车辆前景检测方法,如图1所示,步骤如下:
步骤1:对彩色视频帧图像进行预处理:将彩色图转换为灰度图,然后利用中值滤波对灰度图进行降噪处理。
步骤2:对经步骤1预处理后的视频帧图像进行改进的五帧差分法处理。
步骤3:对经步骤1预处理后的视频帧图像进行背景建模,得到背景差分图像,将该背景差分图像二值化后设置成掩膜并与当前帧图像进行背景更新。
步骤4:将步骤2得到的结果与步骤3得到的结果进行逻辑“或”运算,并进行形态学处理,提取完整的前景目标图像。
本实施例采用2012年CVPR国际会议IEEE Change Detection Workshop上推出的Changedetection数据集,该数据集的优点是视频场景较丰富,每帧都有精确的人工标注,并且在其官网上公布了多种算法的评测结果。
在本实施例中,上述步骤1涉及的具体内容如下:
现有大部分彩色图像都是RGB彩色图像,R、G、B三原色之间存在相关性,直接用彩 色图像检测效果较差,因此将彩色图按下式转换为灰度图:
f(x,y)=0.30R(x,y)+0.59G(x,y)+0.11B(x,y)
上式中,f(x,y)表示点(x,y)处的灰度值,R(x,y)表示该点的R通道值,G(x,y)表示该点的G通道值,B(x,y)表示该点的B通道值;0.30、0.59、0.11表示各通道分量的比例。再将灰度化图像进行中值滤波去噪处理。
在本实施例中,如图1所示,上述步骤2涉及的具体内容如下:
步骤201、选取视频帧中相邻的5帧图像,将第k帧当作中间帧分别与前两帧图像和后两帧图像进行帧差运算:
d k,k-2(x,y)=|I k(x,y)-I k-2(x,y)|
d k,k-1(x,y)=|I k(x,y)-I k-1(x,y)|
d k+1,k(x,y)=|I k+1(x,y)-I k(x,y)|
d k+2,k(x,y)=|I k+2(x,y)-I k(x,y)|
上式中,I k-2(x,y)、I k-1(x,y)、I k(x,y)、I k+1(x,y)、I k+2(x,y)表示相邻5帧图像,d k,k-2(x,y)表示第k帧图像与第k-2帧图像的差分结果,d k,k-1(x,y)表示第k帧图像与第k-1帧图像的差分结果,d k+1,k(x,y)表示第k+1帧图像与第k帧图像的差分结果,d k+2,k(x,y)表示第k+2帧图像与第k帧图像的差分结果。
步骤202、将d k,k-2(x,y)与d k+2,k(x,y)、d k,k-1(x,y)与d k+1,k(x,y)分别进行逻辑“或”运算:
g 1(x,y)=d k,k-2(x,y)∪d k+2,k(x,y)
g 2(x,y)=d k,k-1(x,y)∪d k+1,k(x,y)
上式中,g 1(x,y)为d k,k-2(x,y)与d k+2,k(x,y)逻辑“或”运算结果,g 2(x,y)为d k,k-1(x,y)与d k+1,k(x,y)逻辑“或”运算结果。
步骤203、为克制逻辑“或”运算造成的目标重叠现象,将g 1(x,y)与g 2(x,y)进行逻辑“与”运算结果,得到第k帧图像的目标轮廓:
G k(x,y)=g 1(x,y)∩g 2(x,y)
上式中,G k(x,y)为第k帧图像的目标轮廓。
步骤204、将G k(x,y)二值化处理后与边缘检测算子结合,得到相邻5帧图像中间帧的前景区域。具体地,采用prewitt边缘检测算子对第k帧图像进行边缘提取,获得目标的边缘信息,并对边缘信息进行二值化处理获得目标的前景边缘图B p(x,y),然后将前景边缘图B p(x,y)与G k(x,y)二值化处理后的图像进行逻辑“与”运算。
在本实施例中,如图2所示,上述步骤3涉及的具体内容如下:
步骤301、选取视频序列前K帧连续图像,将其求和后取平均值,得到的均值图像作为初始背景图像:
Figure PCTCN2021071366-appb-000004
上式中,B K(x,y)为初始背景图像,f i(x,y)为第i帧视频图像,K为视频图像帧数。
步骤302、读取当前帧图像,将当前帧图像与初始背景图像作差运算得到背景差分图像:
I K(x,y)=F i(x,y)-B K(x,y)
上式中,I K(x,y)为背景差分图像,F i(x,y)为当前帧图像。
步骤303、将背景差分图像二值化处理后设置成掩模,进行背景更新。掩模中像素灰度值为0的区域代表背景区域,像素灰度值为1的区域代表前景区域。具体地,将掩模中像素灰度值为1的像素点替换成当前视频帧像素点,得到当前帧图像对应掩模中的前景区域部分G d(x,y);再次将掩模中每一个像素灰度值为1的像素点替换成初始背景图像像素点,得到初始背景图像对应掩模中的前景区域部分G b(x,y);将掩模取逻辑“非”运算,得到像素灰度值为1的背景区域,像素灰度值为0的前景区域;然后提取当前帧图像对应掩模中的背景区域B d(x,y),初始背景图像对应掩模中的背景区域B b(x,y);最后按照下式进行背景更新:
Figure PCTCN2021071366-appb-000005
上式中,B(x,y)为更新后的背景图像,α为更新速率。
将更新后的背景图像与与下一帧图像进行差分运算得到下一帧背景差分图像,再进行背景更新,直到输入视频序列最后一帧图像为止。
在本实施例中,上述步骤4涉及的具体内容如下:
所述形态学处理包括采用膨胀操作填充目标空洞部分以及采用腐蚀操作消除背景中的噪声点,使原来的前景二值图像更加完整,去除边缘的不连续和空洞现象,得到前景目标图像。
图4为本发明与其他算法的效果对比图,图4中的(a)为输入原始图,(b)为三帧差分法检测结果图,(c)为五帧差分法检测结果图,(d)为背景差分法检测结果图,(e)为本发明算法检测结果图。根据图4结果可见,三帧差分法检测出运动车辆空洞现象严重,距离摄像头较远的车辆基本未能检测出来,五帧差分法和背景差分法受道路旁晃动的树叶、光照等影响,检测出的噪声点比较多,本发明算法能检测出更为完整的车辆,检测到的车辆轮廓比其他方法清晰,并且克服了周围环境的影响,检测出的噪声点有所下降。
实施例仅为说明本发明的技术思想,不能以此限定本发明的保护范围,凡是按照本发明提出的技术思想,在技术方案基础上所做的任何改动,均落入本发明保护范围之内。

Claims (8)

  1. 基于视频图像的运动车辆前景检测方法,其特征在于,包括以下步骤:
    (1)对彩色视频帧图像进行预处理:将彩色图转换为灰度图,然后利用中值滤波对灰度图进行降噪处理;
    (2)对经步骤(1)预处理后的视频帧图像进行改进的五帧差分法处理;
    (3)对经步骤(1)预处理后的视频帧图像进行背景建模,得到背景差分图像,将该背景差分图像二值化后设置成掩膜并与当前帧图像进行背景更新;
    (4)将步骤(2)得到的结果与步骤(3)得到的结果进行逻辑“或”运算,并进行形态学处理,提取完整的前景目标图像。
  2. 根据权利要求1所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(2)中,所述改进的五帧差分法的步骤如下:
    (201)选取视频帧中相邻的5帧图像,将第k帧当作中间帧分别与前两帧图像和后两帧图像进行帧差运算:
    d k,k-2(x,y)=|I k(x,y)-I k-2(x,y)|
    d k,k-1(x,y)=|I k(x,y)-I k-1(x,y)|
    d k+1,k(x,y)=|I k+1(x,y)-I k(x,y)|
    d k+2,k(x,y)=|I k+2(x,y)-I k(x,y)|
    上式中,I k-2(x,y)、I k-1(x,y)、I k(x,y)、I k+1(x,y)、I k+2(x,y)表示相邻5帧图像,d k,k-2(x,y)表示第k帧图像与第k-2帧图像的差分结果,d k,k-1(x,y)表示第k帧图像与第k-1帧图像的差分结果,d k+1,k(x,y)表示第k+1帧图像与第k帧图像的差分结果,d k+2,k(x,y)表示第k+2帧图像与第k帧图像的差分结果;
    (202)将d k,k-2(x,y)与d k+2,k(x,y)、d k,k-1(x,y)与d k+1,k(x,y)分别进行逻辑“或”运算:
    g 1(x,y)=d k,k-2(x,y)∪d k+2,k(x,y)
    g 2(x,y)=d k,k-1(x,y)∪d k+1,k(x,y)
    上式中,g 1(x,y)为d k,k-2(x,y)与d k+2,k(x,y)逻辑“或”运算结果,g 2(x,y)为d k,k-1(x,y)与d k+1,k(x,y)逻辑“或”运算结果;
    (203)将g 1(x,y)与g 2(x,y)进行逻辑“与”运算结果,得到第k帧图像的目标轮廓:
    G k(x,y)=g 1(x,y)∩g 2(x,y)
    上式中,G k(x,y)为第k帧图像的目标轮廓;
    (204)将G k(x,y)二值化处理后与边缘检测算子结合,得到相邻5帧图像中间帧的前景区域。
  3. 根据权利要求2所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(204)中,对G k(x,y)进行二值化处理的方法如下:
    Figure PCTCN2021071366-appb-100001
    上式中,b(x,y)为二值化图像,T为分割阈值。
  4. 根据权利要求2所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(204)中,采用prewitt边缘检测算子对第k帧图像进行边缘提取,获得目标的边缘信息,并对边缘信息进行二值化处理获得目标的前景边缘图B p(x,y),然后将前景边缘图B p(x,y)与 G k(x,y)二值化处理后的图像进行逻辑“与”运算。
  5. 根据权利要求2所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(3)中,所述背景建模的步骤如下:
    (301)选取视频序列前K帧连续图像,将其求和后取平均值,得到的均值图像作为初始背景图像:
    Figure PCTCN2021071366-appb-100002
    上式中,B K(x,y)为初始背景图像,f i(x,y)为第i帧视频图像,K为视频图像帧数;
    (302)读取当前帧图像,将当前帧图像与初始背景图像作差运算得到背景差分图像:
    I K(x,y)=F i(x,y)-B K(x,y)
    上式中,I K(x,y)为背景差分图像,F i(x,y)为当前帧图像;
    (303)将背景差分图像二值化处理后设置成掩模,进行背景更新。
  6. 根据权利要求5所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(303)中,掩模中像素灰度值为0的区域代表背景区域,像素灰度值为1的区域代表前景区域。
  7. 根据权利要求5所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(303)中,将掩模中像素灰度值为1的像素点替换成当前视频帧像素点,得到当前帧图像对应掩模中的前景区域部分G d(x,y);再次将掩模中每一个像素灰度值为1的像素点替换成初始背景图像像素点,得到初始背景图像对应掩模中的前景区域部分G b(x,y);将掩模取逻辑“非”运算,得到像素灰度值为1的背景区域,像素灰度值为0的前景区域;然后提取当前帧图像对应掩模中的背景区域B d(x,y),初始背景图像对应掩模中的背景区域B b(x,y);最后按照下式进行背景更新:
    Figure PCTCN2021071366-appb-100003
    上式中,B(x,y)为更新后的背景图像,α为更新速率;
    将更新后的背景图像与与下一帧图像进行差分运算得到下一帧背景差分图像,再进行背景更新,直到输入视频序列最后一帧图像为止。
  8. 根据权利要求1所述基于视频图像的运动车辆前景检测方法,其特征在于,在步骤(4)中,所述形态学处理包括采用膨胀操作填充目标空洞部分以及采用腐蚀操作消除背景中的噪声点。
PCT/CN2021/071366 2020-08-07 2021-01-13 基于视频图像的运动车辆前景检测方法 WO2022027931A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010787487.8A CN112036254B (zh) 2020-08-07 2020-08-07 基于视频图像的运动车辆前景检测方法
CN202010787487.8 2020-08-07

Publications (1)

Publication Number Publication Date
WO2022027931A1 true WO2022027931A1 (zh) 2022-02-10

Family

ID=73582652

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/071366 WO2022027931A1 (zh) 2020-08-07 2021-01-13 基于视频图像的运动车辆前景检测方法

Country Status (2)

Country Link
CN (1) CN112036254B (zh)
WO (1) WO2022027931A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567773A (zh) * 2022-02-23 2022-05-31 珠海科技学院 视频处理算法仿真方法、系统、装置及存储介质
CN114567794A (zh) * 2022-03-11 2022-05-31 浙江理工大学 一种直播视频背景替换方法
CN114821391A (zh) * 2022-03-15 2022-07-29 西北工业大学 一种基于改进视觉背景提取法的运动目标检测方法
CN114973175A (zh) * 2022-05-24 2022-08-30 深圳市航盛电子股份有限公司 运动物体检测方法、装置、终端设备以及存储介质
CN117636687A (zh) * 2024-01-25 2024-03-01 江西方兴科技股份有限公司 一种隧道紧急停车带的预警方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036254B (zh) * 2020-08-07 2023-04-18 东南大学 基于视频图像的运动车辆前景检测方法
CN112581490B (zh) * 2020-12-28 2023-03-17 西安理工大学 一种复杂曲面干涉测量中前景区域提取方法
CN112883924B (zh) * 2021-03-23 2022-08-30 南京邮电大学 一种固定摄像下监控视频环境中对运动污染物的检测方法
CN113362375A (zh) * 2021-06-16 2021-09-07 江铃汽车股份有限公司 用于车辆的运动目标检测方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154053A (zh) * 2017-05-11 2017-09-12 南宁市正祥科技有限公司 静态背景下的运动目标检测方法
CN107895379A (zh) * 2017-10-24 2018-04-10 天津大学 一种视频监控中前景提取的改进算法
US20180253866A1 (en) * 2017-03-03 2018-09-06 General Electric Company Image analysis neural network systems
CN110349189A (zh) * 2019-05-31 2019-10-18 广州铁路职业技术学院(广州铁路机械学校) 一种基于连续帧间差分的背景图像更新方法
CN111260684A (zh) * 2020-03-02 2020-06-09 成都信息工程大学 基于帧差法和背景差分法结合的前景像素提取方法及系统
CN112036254A (zh) * 2020-08-07 2020-12-04 东南大学 基于视频图像的运动车辆前景检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180253866A1 (en) * 2017-03-03 2018-09-06 General Electric Company Image analysis neural network systems
CN107154053A (zh) * 2017-05-11 2017-09-12 南宁市正祥科技有限公司 静态背景下的运动目标检测方法
CN107895379A (zh) * 2017-10-24 2018-04-10 天津大学 一种视频监控中前景提取的改进算法
CN110349189A (zh) * 2019-05-31 2019-10-18 广州铁路职业技术学院(广州铁路机械学校) 一种基于连续帧间差分的背景图像更新方法
CN111260684A (zh) * 2020-03-02 2020-06-09 成都信息工程大学 基于帧差法和背景差分法结合的前景像素提取方法及系统
CN112036254A (zh) * 2020-08-07 2020-12-04 东南大学 基于视频图像的运动车辆前景检测方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GUO CHUN-FENG: "Target Tracking Algorithm Based on the Improved Five Frame Difference and MeanShift", JOURNAL OF LANGFANG NORMAL UNIVERSITY (NATURAL SCIENCE EDITION), vol. 18, no. 1, 15 March 2018 (2018-03-15), pages 21 - 24, XP055893776 *
PAN ZHENGRONG, ZHONG ZHEN-ZHEN;ZHANG NING: "Moving Object Detection of Improved Background Subtraction in Combination with Five Image Differential", AUTOMATION & INSTRUMENTATION, CN, vol. 32, no. 7, 15 July 2017 (2017-07-15), CN , XP055893772, ISSN: 1001-9944, DOI: 10.19557/j.cnki.1001-9944.2017.07.005 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567773A (zh) * 2022-02-23 2022-05-31 珠海科技学院 视频处理算法仿真方法、系统、装置及存储介质
CN114567773B (zh) * 2022-02-23 2023-03-24 珠海科技学院 视频处理算法仿真方法、系统、装置及存储介质
CN114567794A (zh) * 2022-03-11 2022-05-31 浙江理工大学 一种直播视频背景替换方法
CN114567794B (zh) * 2022-03-11 2023-06-30 浙江理工大学 一种直播视频背景替换方法
CN114821391A (zh) * 2022-03-15 2022-07-29 西北工业大学 一种基于改进视觉背景提取法的运动目标检测方法
CN114821391B (zh) * 2022-03-15 2024-02-27 西北工业大学 一种基于改进视觉背景提取法的运动目标检测方法
CN114973175A (zh) * 2022-05-24 2022-08-30 深圳市航盛电子股份有限公司 运动物体检测方法、装置、终端设备以及存储介质
CN117636687A (zh) * 2024-01-25 2024-03-01 江西方兴科技股份有限公司 一种隧道紧急停车带的预警方法及系统

Also Published As

Publication number Publication date
CN112036254B (zh) 2023-04-18
CN112036254A (zh) 2020-12-04

Similar Documents

Publication Publication Date Title
WO2022027931A1 (zh) 基于视频图像的运动车辆前景检测方法
WO2018130016A1 (zh) 一种基于监控视频的停车检测方法及装置
WO2019196131A1 (zh) 面向车载热成像行人检测的感兴趣区域过滤方法和装置
Kaur et al. An efficient approach for number plate extraction from vehicles image under image processing
CN104978567B (zh) 基于场景分类的车辆检测方法
CN104866843B (zh) 一种面向监控视频的蒙面人脸检测方法
Rabiu Vehicle detection and classification for cluttered urban intersection
Su et al. A new local-main-gradient-orientation HOG and contour differences based algorithm for object classification
Yu et al. A robust method for detecting and counting people
CN107564041B (zh) 一种可见光图像空中运动目标的检测方法
CN110782409B (zh) 一种去除多运动物体阴影的方法
CN111539980A (zh) 一种基于可见光的多目标追踪方法
CN109583414B (zh) 基于视频检测的室内占道检测方法、设备、介质及处理器
Aung et al. Automatic license plate detection system for myanmar vehicle license plates
CN108009480A (zh) 一种基于特征识别的图像人体行为检测方法
Xiang et al. Research on target detection method based on HSV fusion Gaussian mixture model
CN106339995A (zh) 一种基于时空多特征的车辆阴影消除方法
CN106951831B (zh) 一种基于深度摄像机的行人检测跟踪方法
Sridevi et al. Automatic generation of traffic signal based on traffic volume
CN110321828B (zh) 一种基于双目摄像机和车底阴影的前方车辆检测方法
CN109784176B (zh) 车载热成像行人检测RoIs提取方法和装置
Kaur et al. An Efficient Method of Number Plate Extraction from Indian Vehicles Image
Phan et al. Improved shadow removal algorithm for vehicle classification in traffic surveillance system
CN112949389A (zh) 一种基于改进目标检测网络的雾霾图像目标检测方法
Naseeba et al. KP Visibility Restoration of Single Hazy Images Captured in Real-World Weather Conditions

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21853623

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21853623

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.09.2023)