WO2021208275A1 - Traffic video background modelling method and system - Google Patents

Traffic video background modelling method and system Download PDF

Info

Publication number
WO2021208275A1
WO2021208275A1 PCT/CN2020/101551 CN2020101551W WO2021208275A1 WO 2021208275 A1 WO2021208275 A1 WO 2021208275A1 CN 2020101551 W CN2020101551 W CN 2020101551W WO 2021208275 A1 WO2021208275 A1 WO 2021208275A1
Authority
WO
WIPO (PCT)
Prior art keywords
background
image
video
area
foreground
Prior art date
Application number
PCT/CN2020/101551
Other languages
French (fr)
Chinese (zh)
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 WO2021208275A1 publication Critical patent/WO2021208275A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/174Segmentation; Edge detection involving the use of two or more images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/254Analysis of motion involving subtraction of images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • 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
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30236Traffic on road, railway or crossing
    • 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 relates to the technical field of intelligent video analysis, in particular to a traffic video background modeling method and system.
  • Video surveillance technology has been more and more researched and applied, especially in the transportation system, which plays an important role in promoting the development of transportation intelligence.
  • video sequences for background modeling and then detection of moving targets is used to undertake subsequent tasks such as vehicle counting, target recognition and tracking. Therefore, background modeling is a very important research topic in the field of intelligent transportation.
  • Traffic video captured by a fixed camera can be used for target vehicle detection.
  • Common methods include inter-frame difference method, optical flow method, and background difference method.
  • the inter-frame difference is greatly affected by the speed and the calculation of the optical flow method is more complicated.
  • the method has obvious defects and it is difficult to meet the requirements of the detection system.
  • the background difference method is simple and easy to use.
  • the most complete feature information and the most suitable target contour can be extracted by using the known background as a reference. Whether the background difference method can achieve better results depends on whether the background modeling algorithm can extract high-quality background images, and the research on the background modeling algorithm is very important.
  • Bootstrapping means that a person lifts himself up with the shoelaces on his feet, which is a metaphor for an unrealizable practice.
  • background modeling it means that because there are moving objects such as vehicles and pedestrians at almost every moment in the traffic scene, it is difficult for people to get a "clean" traffic background frame that does not include foreground objects during normal times of each intersection, specifically for background training . Therefore, there are always foreground targets in the traffic video during background modeling.
  • the first thing to consider is how to avoid the interference of foreground targets in the Bootstrapping scene, so as to obtain true and complete background image information.
  • the object of the present invention is to provide a traffic video background modeling method and system to solve the problem that it is difficult to directly extract the traffic background from the urban road traffic video, which leads to inaccurate detection of foreground objects.
  • Step 1 Perform a grayscale operation on the original video image frame
  • Step 2 Use the inter-frame difference method to extract the foreground area of adjacent frames and determine the background area;
  • Step 3 Use the statistical histogram method to determine the pixel value of each position in the background area
  • Step 4 Loop the first three steps in the N-frame video image sequence to reconstruct the background image
  • Step 5 Use the "first-out and end-in" update strategy to update the background.
  • the grayscale operation of the original video image frame in the step 1 is as follows: Set the RGB composition of the coordinate (x, y) pixel point as (R, G, B), assign weights to all color channels and calculate the weights And, the gray value V is obtained by formula 1.
  • the value range of each color channel is [0,255], so the value range of the gray value V is also [0,255].
  • step 2 includes the following sub-steps:
  • Step 2.1 For the video frame image sequence F 1 , F 2 , ..., F N , use the inter-frame difference method to perform pairwise difference of adjacent images in sequence, and determine the difference between the background area and the background area in each image except the first frame. Foreground area. Let F k-1 and F k be two adjacent frames of video images (2 ⁇ K ⁇ N), calculate the difference according to the gray value, and obtain the difference image D, which is obtained by formula 2.
  • Step 2.2 Select a suitable threshold T to perform binarization operation on the difference image D to obtain a binarized image B, which is obtained by formula 3.
  • the gray value of 255 is the background point
  • the gray value of 0 is the moving point, that is, the front scenic spot.
  • Step 2.3 Extract the video foreground target according to the threshold T, and use morphology to perform opening and closing operations on the extracted foreground image, and reduce the influence of noise through multiple expansion and erosion combined operations, making the overall contour of the foreground moving target clearer.
  • Step 2.4 For each foreground moving target area, calculate its circumscribed rectangle, and use the circumscribed rectangle as the detection frame to mark the foreground area M. Once the foreground area M is extracted, the background area B is also determined accordingly.
  • step 3 includes the following sub-steps:
  • Step 3.1 Mark all the foreground area M as -1 to distinguish it from the gray value in the interval [0,255].
  • Step 3.2 For each position (x, y) in the background area B, establish a corresponding gray histogram that has nothing to do with the foreground and is related to the background, count the occurrence frequency of the gray value of each pixel, and select the one with the most occurrences.
  • the pixel value p is the pixel value at the same coordinate position (x, y) of the background image.
  • the pixel value selection strategy is represented by formula 4.
  • Step 3.3 After the pixel value is selected, the foreground area and the background area together form the background image Bg to be optimized.
  • step 4 in N frames As N increases, the background position in the video sequence that is always covered by the foreground target gradually decreases. Once the inter-frame difference detects a new background area, it will replace this part of the foreground area with the background area, and then form a new statistical histogram, until all areas are updated, and finally get a complete and neat background image.
  • step 5 includes the following sub-steps:
  • Step 5.1 Within the corresponding time of N frames, there is a high probability that part of the background will always be covered by the foreground target, resulting in a "black hole” area in the background. In order to ensure the integrity of the initial background image, only in the first background modeling, N takes a larger value.
  • Step 5.2 Take N frames of gray-scale image sequence as a batch, and call the first N frames of images ⁇ F 1 , F 2 ,..., F N ⁇ as batch 1 .
  • Step 5.4 If there is no "black hole” area in Bg 2 , then output; otherwise, using Bg 1 as the optimized reference object, fill the gray value of Bg 1 at the corresponding position on the "black hole” area on Bg 2 , and get the complete Background image.
  • Step 5.5 If the video stream is not over, follow steps 5.3 and 5.4 to continue to generate a new background image until the video stream ends.
  • the traffic video background modeling method of the present invention combines the advantages of two methods of inter-frame difference and statistical histogram, and overcomes the problem that it is difficult to directly extract the background in the traffic video, which leads to inaccurate detection of foreground objects.
  • use the inter-frame difference method to detect the characteristics of the general area of the moving target, eliminate the moving area, and then use the statistical histogram to count and select the gray value of the background image. After multiple optimization and reconstruction, a high-quality background image is finally obtained, and real-time Perform background updates.
  • a traffic video background modeling system including a video acquisition module for providing continuous traffic video stream information, a method integration module for encapsulating the background modeling method, a calculation module for executing program functions and processing data, and a storage module for storing Application programs, source data and processing results, and the display module is used to display input and output image information.
  • the video capture module uses a fixed device camera on a traffic monitoring pole to capture a real-time traffic video stream with a vertical viewing angle of 90°.
  • the camera has a built-in graphics processor to process the captured still pictures and video image data, and process Data flow information is stored in the storage module, displayed on the display module, and transmitted to the method integration module as input information;
  • the method integration module is a package body of the traffic video background modeling method, reserves an interface to form a black box, and the input is image data in the correct format;
  • calculation module as a core calculation unit, implements program calculation and data processing by executing the software program stored in the storage module and calling the image data stored in the storage module;
  • the storage module is used to store the software program of the background modeling method, the source image data transmitted from the video acquisition module, and the background image result processed by the calculation module;
  • the display module as an image presentation carrier, is used to display input video image information and output background image information.
  • the advantages of the present invention are: 1) the present invention uses the inter-frame difference to effectively utilize the dynamics of pixels in time sequence and space, and has a higher accuracy; 2) the present invention combines the advantages of classic algorithms and calculates The method is simple, easy to implement, and has good real-time performance; 3) The present invention can accurately capture every background point, realizes background modeling in as few frames as possible, and has a faster speed; 4) The present invention is even at the speed of the vehicle In the slower traffic scene, there is still a high degree of completeness.
  • Fig. 1 is a flowchart of a traffic video background modeling method according to an embodiment of the present invention.
  • Fig. 2 is a schematic diagram of a traffic video background modeling system according to an embodiment of the present invention.
  • Figure 3 is a comparison diagram of the background modeling process of the present invention and some existing methods under the simulation video.
  • Figure 4 is a comparison diagram of the integrity change curves of the background modeling of the present invention and some existing methods.
  • Figure 5 is a comparison diagram of the background modeling process of the present invention and some existing methods in real video.
  • Fig. 1 is a flowchart of a traffic video background modeling method according to an embodiment of the present invention. As shown in Figure 1, after the video stream is imported, the method steps are as follows:
  • the gray value V is obtained by formula 1.
  • the value range of each color channel is [0,255], so the value range of the gray value V is also [0,255].
  • the gray-scaled video frame image sequence Denote the gray-scaled video frame image sequence as F 1 , F 2 , ..., F N ⁇ I h*w , where N is the total number of frames in the image sequence, and h and w represent the image size of each frame, that is, h represents The image height, w represents the image width.
  • the inter-frame difference method can capture the changes in the gray value of two adjacent frames, and define the nature of the area according to the change.
  • the area composed of points with a large gray value change is recorded as the foreground area M, and the gray value change is small
  • the area composed of dots is denoted as the background area B. Since M is obtained from the difference between the current frame and the previous frame at this time, the part of the motion change of the previous frame will remain in M, which causes the detection frame to not completely match the actual moving object, and is slightly larger than the area where the moving object is located.
  • the method of the present invention is to update M and B in a continuous iterative process to obtain a complete background image. Therefore, M and B are not fixed, they have a trade-off relationship.
  • the inter-frame difference method is used to sequentially perform pairwise difference of adjacent images, and distinguish the background area and the foreground area in each frame of the image except the first frame.
  • F k-1 and F k be two adjacent frames of video images (2 ⁇ K ⁇ N), calculate the difference according to the gray value, and obtain the difference image D, which is obtained by formula 2.
  • the gray value of 255 is the background point
  • the gray value of 0 is the moving point, that is, the front scenic spot.
  • the video foreground target is extracted according to the threshold T, and the extracted foreground image is opened and closed using morphology, and the influence of noise is reduced through multiple expansion and erosion combined operations, so that the overall contour of the foreground moving target is clearer.
  • For each foreground moving target area calculate its circumscribed rectangle, and use the circumscribed rectangle as the detection frame to mark the foreground area M. Once the foreground area M is extracted, the background area B is also determined accordingly.
  • B k (x, y) takes the pixel value of the pixel (x, y) with the largest frequency in the N-frame gray-scale video image sequence as the background gray value of the pixel, M k (x, y) Mark the foreground area with -1 for subsequent updates.
  • the foreground area and the background area together form the background image Bg to be optimized.
  • the background position in the video sequence that has been covered by the foreground target gradually decreases.
  • the inter-frame difference detects a new background area, it will update the part of the area contained in the foreground area as the background area, and then form a new statistical histogram, until all areas are updated, and finally get a complete and neat background image.
  • the specific operations are as follows:
  • N takes a larger value.
  • the first N frames of images ⁇ F 1 , F 2 ,..., F N ⁇ are called batch 1 .
  • Bg 2 "black hole” area If Bg 2 "black hole” area does not exist, then the output; otherwise, in order to optimize the reference object Bg 1, Bg 1 on the "black hole” area fill gradation value at the corresponding position to the Bg 2, to obtain a complete image background.
  • Fig. 2 is a schematic diagram of a traffic video background modeling system according to an embodiment of the present invention.
  • the video acquisition module is used to provide continuous traffic video stream information
  • the method integration module is used to encapsulate the background modeling method
  • the calculation module is used to execute program functions and process data
  • the storage module is used to store application programs and source data.
  • the display module is used to display input and output image information.
  • the video capture module uses a fixed-device camera on a traffic monitoring pole to capture a real-time traffic video stream with a vertical viewing angle of 90°.
  • the camera has a built-in graphics processor to process the captured still pictures and video image data, and
  • the processed data flow information is stored in the storage module, displayed on the display module, and transmitted to the method integration module as input information;
  • the method integration module is the package body of the traffic video background modeling method.
  • the interface is reserved to form a black box, and the input is image data in the correct format;
  • the calculation module implements program calculation and data processing by executing the software program stored in the storage module and calling the image data stored in the storage module;
  • the storage module is used to store the software program of the background modeling method, the source image data from the video acquisition module and the background image result processed by the calculation module;
  • the display module is used as an image presentation carrier to display input video image information and output background image information.
  • the invention integrates the advantages of the two methods of inter-frame difference and statistical histogram, and encapsulates the method into a module, and is supported by an intelligent monitoring system, which can overcome the problem that it is difficult to directly extract the background in the traffic video and the foreground target detection is inaccurate.
  • the innovations in the scheme are specifically: the present invention integrates the advantages of classic algorithms, the calculation method is simple and easy to implement, the inter-frame difference is used to effectively utilize the dynamics of pixels in time sequence and space, and the statistical histogram is used to effectively estimate the pixel value. Higher accuracy, faster calculation speed and higher background integrity. Whether in a normal traffic scene or a typical traffic scene with slow vehicles, this method can extract a background image that is similar to the real background and has a higher degree of matching.
  • the simulated traffic video and the real traffic video are used for joint verification.
  • the simulation traffic video is used to verify the reliability of the theoretical principle of the method
  • the real traffic video is used to verify the effectiveness of the method in practical application.
  • Figure 3 is a comparison diagram of the background modeling process of the present invention and some existing methods under the simulation video.
  • the resolution of the simulated traffic video is 590 ⁇ 350 pixels.
  • the city road is recorded as Bg true as the background, and the moving vehicle is recorded as Fg true as the foreground.
  • the vehicle is defined to travel right at a speed of 2-4 pixels per frame.
  • a is the simulation video sequence frame
  • b is the background modeling process of the multi-frame image averaging algorithm
  • c is the background modeling process of the statistical histogram algorithm
  • d is the background modeling process of the mixed Gaussian background modeling algorithm
  • e is the background modeling process of the method of the present invention. Affected by the slow movement of the vehicle, part of the background is blocked by the vehicle for a long time. The pixel distribution of the background image extracted by the multi-frame image averaging algorithm is uneven, and there are obvious traces of distortion.
  • the statistical histogram algorithm can finally extract a background image that is closer to the actual background, but still some noise remains, and the performance is still not ideal in a complex scene environment.
  • the mixed Gaussian background modeling algorithm uses multiple Gaussian distributions to describe the color presentation law of each pixel, which has high time complexity and introduces noise.
  • the method of the present invention can extract the most complete and clear background image at the 47th frame. Compared with the other three algorithms, it can still maintain good performance even in the scene of slow vehicle movement.
  • Figure 4 is a comparison diagram of the integrity change curves of the background modeling of the present invention and some existing methods. Theoretically, the most direct way to measure the integrity of a background image is to judge the consistency of the extracted background image Bg and the real background image Bg_true at the pixel level. In order to facilitate comparison, define the formula:
  • NBFOR Non-Background pixels to Foreground Objection pixels Ratio refers to the ratio of the number of pixels with different pixel values in Bg and Bg true to the number of pixels in the foreground image Fg true . The fewer real background pixels, the higher the integrity.
  • Figure 4 shows the completeness change process of various algorithms extracting the background in the entire simulation video.
  • the X axis represents the video frame number, and the Y axis represents the NBFOR value. It can be seen that the method of the present invention can extract the background image with the highest degree of completeness, and it can be realized by using fewer frames.
  • Figure 5 is a comparison diagram of the background modeling process of the present invention and some existing methods under real video.
  • the data is taken from the UA-DETRAC dataset, which has a resolution of 960 ⁇ 540 pixels per frame at 25 frames per second.
  • UA-DETRAC dataset which has a resolution of 960 ⁇ 540 pixels per frame at 25 frames per second.
  • a real traffic scene compare the performance pros and cons of the multi-frame image averaging algorithm, statistical histogram algorithm, mixed Gaussian background modeling algorithm and the method of the present invention.
  • a is the real video sequence frame
  • b is the background modeling process of multi-frame image averaging algorithm
  • c is the background modeling process of statistical histogram algorithm
  • d is the background modeling process of mixed Gaussian background modeling algorithm
  • e is the background modeling process of the method of the present invention.
  • the method of the present invention can obtain a complete background image when N is set to 15. Compared with other methods, the number of frames used is less, the time is faster, and the degree of completeness is higher.

Landscapes

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

Abstract

Disclosed are a traffic video background modelling method and system. The method comprises the following steps: 1) performing graying processing on an original video frame; 2) extracting, by means of an inter-frame difference method, foreground areas of adjacent frames to determine a background area; 3) determining a pixel value of each position in the background area by means of a statistical histogram method; 4) performing, in a loop, the first three steps in a sequence of N frames of video images to reconstruct a background image; and 5) updating the background by using a "first out and last in" updating policy. The system comprises the following modules: a video collection module for providing traffic video stream information; a method integration module for encapsulating a background modelling method; a computing module for executing program functions and processing data; a storage module for storing an application program, source data and processing results; and a display module for displaying input and output image information. The method and system are easily implemented, are applied to an intelligent monitoring system so that a clean background image can be extracted, and can effectively solve the problem of the incomplete extraction of a traffic background when vehicles move slowly.

Description

一种交通视频背景建模方法及系统Method and system for modeling traffic video background 技术领域Technical field
本发明涉及智能视频分析技术领域,具体为一种交通视频背景建模方法及系统。The invention relates to the technical field of intelligent video analysis, in particular to a traffic video background modeling method and system.
背景技术Background technique
近年来,高速发展的信息技术和精细化管理的交通监控共同保障着道路交通的正常运行。视频监控技术得到越来越多的研究和应用,特别是在交通系统中,对于促进交通智能化的发展具有重要的推动作用。随着视频监控技术的广泛应用,大量的监控视频数据也随之而来,利用视频序列进行背景建模继而检测运动目标,并以此承接车辆计数、目标识别与跟踪等后续任务的顺利进行。因此,背景建模是智能交通领域中一个非常重要的研究课题。In recent years, rapid development of information technology and sophisticated management of traffic monitoring have jointly ensured the normal operation of road traffic. Video surveillance technology has been more and more researched and applied, especially in the transportation system, which plays an important role in promoting the development of transportation intelligence. With the widespread application of video surveillance technology, a large amount of surveillance video data has also followed. The use of video sequences for background modeling and then detection of moving targets is used to undertake subsequent tasks such as vehicle counting, target recognition and tracking. Therefore, background modeling is a very important research topic in the field of intelligent transportation.
基于固定摄像头拍摄的交通视频可以用于目标车辆检测,常用方法包括帧间差分法、光流法和背景差分法。但是帧间差分受速度影响较大和光流法计算较为复杂,方法缺陷明显,难以达到检测系统要求。背景差分法简单易用,以已知背景为参照可以提取最完整的特征信息和最契合的目标轮廓。背景差分法能否取得较好的结果取决于背景建模算法能否提取到高质量的背景图像,对背景建模算法的研究便至关重要。Traffic video captured by a fixed camera can be used for target vehicle detection. Common methods include inter-frame difference method, optical flow method, and background difference method. However, the inter-frame difference is greatly affected by the speed and the calculation of the optical flow method is more complicated. The method has obvious defects and it is difficult to meet the requirements of the detection system. The background difference method is simple and easy to use. The most complete feature information and the most suitable target contour can be extracted by using the known background as a reference. Whether the background difference method can achieve better results depends on whether the background modeling algorithm can extract high-quality background images, and the research on the background modeling algorithm is very important.
在背景建模中存在“Bootstrapping”的问题,Bootstrapping意思为一个人手提脚上鞋带便把自己提起,比喻一种不可实现的做法。在背景建模中是指由于交通场景中几乎每一时刻都存在车辆和行人等运动物体,在各个路口正常时段,人们难以得到一段不包括前景目标的“干净”交通背景帧专门用以背景训练。因此,在背景建模时交通视频中一直有前景目标出现,首先需要考虑的一点就是如何在Bootstrapping场景下避免前景目标的干扰,从而获得真实完整的背景图像信息。There is a problem of "Bootstrapping" in the background modeling. Bootstrapping means that a person lifts himself up with the shoelaces on his feet, which is a metaphor for an unrealizable practice. In background modeling, it means that because there are moving objects such as vehicles and pedestrians at almost every moment in the traffic scene, it is difficult for people to get a "clean" traffic background frame that does not include foreground objects during normal times of each intersection, specifically for background training . Therefore, there are always foreground targets in the traffic video during background modeling. The first thing to consider is how to avoid the interference of foreground targets in the Bootstrapping scene, so as to obtain true and complete background image information.
针对上述问题分析以及城市交通特点,为了解决城市道路交通视频难以直接提取交通背景,导致前景目标检测不准确的问题,需要提出一种新的效果更好的背景建模解决方案。In view of the above-mentioned problem analysis and the characteristics of urban traffic, in order to solve the problem that the urban road traffic video is difficult to directly extract the traffic background, which leads to the inaccurate detection of foreground objects, a new and better background modeling solution needs to be proposed.
发明内容Summary of the invention
本发明的目的在于提供一种交通视频背景建模方法及系统,以解决城市道路交通视频难以直接提取交通背景,导致前景目标检测不准确的问题。The object of the present invention is to provide a traffic video background modeling method and system to solve the problem that it is difficult to directly extract the traffic background from the urban road traffic video, which leads to inaccurate detection of foreground objects.
实现本发明目的的技术解决方案如下:The technical solutions to achieve the purpose of the present invention are as follows:
一种交通视频背景建模方法,包括以下步骤:A traffic video background modeling method includes the following steps:
步骤1:对原视频图像帧进行灰度化操作;Step 1: Perform a grayscale operation on the original video image frame;
步骤2:使用帧间差分法提取相邻帧前景区域,确定背景区域;Step 2: Use the inter-frame difference method to extract the foreground area of adjacent frames and determine the background area;
步骤3:使用统计直方图法确定背景区域每个位置像素值;Step 3: Use the statistical histogram method to determine the pixel value of each position in the background area;
步骤4:在N帧视频图像序列内循环前三步骤,重建背景图像;Step 4: Loop the first three steps in the N-frame video image sequence to reconstruct the background image;
步骤5:采用“首出尾入”的更新策略,进行背景更新。Step 5: Use the "first-out and end-in" update strategy to update the background.
进一步地,所述步骤1中对原视频图像帧进行灰度化操作如下:设坐标(x,y)像素点的RGB组成为(R,G,B),为所有颜色通道分配权重并加权求和,则灰度值V由公式①所得。每一个颜色通道的取值范围为[0,255],所以灰度值V的取值范围也为[0,255]。Further, the grayscale operation of the original video image frame in the step 1 is as follows: Set the RGB composition of the coordinate (x, y) pixel point as (R, G, B), assign weights to all color channels and calculate the weights And, the gray value V is obtained by formula ①. The value range of each color channel is [0,255], so the value range of the gray value V is also [0,255].
V=0.30R+0.59G+0.11B    ①V=0.30R+0.59G+0.11B①
进一步地,所述步骤2包括以下子步骤:Further, the step 2 includes the following sub-steps:
步骤2.1:对于视频帧图像序列F 1,F 2,...,F N,使用帧间差分法依次对相邻图像进行两两差分,判别除首帧之外每帧图像中的背景区域与前景区域。设F k-1和F k为相邻两帧视频图像(2≤K≤N),根据灰度值计算差值,得到差分图像D,由公式②所得。 Step 2.1: For the video frame image sequence F 1 , F 2 , ..., F N , use the inter-frame difference method to perform pairwise difference of adjacent images in sequence, and determine the difference between the background area and the background area in each image except the first frame. Foreground area. Let F k-1 and F k be two adjacent frames of video images (2≤K≤N), calculate the difference according to the gray value, and obtain the difference image D, which is obtained by formula ②.
D (k-1,k)(x,y)=|F (k-1)(x,y)-F k(x,y)|      ② D (k-1,k)(x,y) =|F (k-1)(x,y) -F k(x,y) | ②
步骤2.2:选定合适的阈值T对差值图像D作二值化操作,得到二值化图像B,由公式③所得。其中,灰度值为255的为背景点,灰度值为0的为运动点即前景点。Step 2.2: Select a suitable threshold T to perform binarization operation on the difference image D to obtain a binarized image B, which is obtained by formula ③. Among them, the gray value of 255 is the background point, and the gray value of 0 is the moving point, that is, the front scenic spot.
Figure PCTCN2020101551-appb-000001
Figure PCTCN2020101551-appb-000001
步骤2.3:根据阈值T提取视频前景目标,将提取到的前景图像,采用形态学进行开运算、闭运算,通过多次膨胀和腐蚀组合运算降低噪声影响,使得前景运动目标轮廓整体性更加清晰。Step 2.3: Extract the video foreground target according to the threshold T, and use morphology to perform opening and closing operations on the extracted foreground image, and reduce the influence of noise through multiple expansion and erosion combined operations, making the overall contour of the foreground moving target clearer.
步骤2.4:对每个前景运动目标区域,计算其外接矩形,并以此外接矩形作为检测框来标记出前景区域M。一旦前景区域M被提取出来,那么背景区域B也就随之确定。Step 2.4: For each foreground moving target area, calculate its circumscribed rectangle, and use the circumscribed rectangle as the detection frame to mark the foreground area M. Once the foreground area M is extracted, the background area B is also determined accordingly.
进一步地,所述步骤3包括以下子步骤:Further, the step 3 includes the following sub-steps:
步骤3.1:将前景区域M全都标记为-1,以便区别于区间为[0,255]的灰度值。Step 3.1: Mark all the foreground area M as -1 to distinguish it from the gray value in the interval [0,255].
步骤3.2:对背景区域B中每个位置(x,y)建立一个对应的与前景无关且与背景有关的灰度直方图,统计各像素灰度值的出现频率,选择其上出现次数最多的像素值p作为背景图像同坐标位置(x,y)上的像素值。像素值选取策略由公式④表示。Step 3.2: For each position (x, y) in the background area B, establish a corresponding gray histogram that has nothing to do with the foreground and is related to the background, count the occurrence frequency of the gray value of each pixel, and select the one with the most occurrences. The pixel value p is the pixel value at the same coordinate position (x, y) of the background image. The pixel value selection strategy is represented by formula ④.
Figure PCTCN2020101551-appb-000002
Figure PCTCN2020101551-appb-000002
其中,Hist x,y[p]=K(x,y,p)++,if F k(x,y)=p,p∈[0,255]     ⑤ Among them, Hist x, y [p] = K(x, y, p)++, if F k (x, y) = p, p ∈ [0, 255] ⑤
在式⑤中,K(x,y,p)表示在图像(x,y)处像素灰度值为p时出现的次数,f k(x,y)=p表示图像f k在(x,y)处像素值为p,Hist x,y就表示在坐标点(x,y)处以像素灰度值p为统计依据的直方图。 In formula ⑤, K(x, y, p) represents the number of times when the pixel gray value is p at the image (x, y), f k (x, y) = p represents the image f k in (x, The pixel value at y) is p, Hist x, y represents a histogram based on the pixel gray value p as the statistical basis at the coordinate point (x, y).
步骤3.3:像素值选取之后,前景区域和背景区域共同组成待优化的背景图像Bg。Step 3.3: After the pixel value is selected, the foreground area and the background area together form the background image Bg to be optimized.
进一步地,所述步骤4在N帧内的迭代过程中,随着N的增大,视频序列中被前景目标一直遮盖的背景位置逐渐减少。帧间差分一旦检测出新的背景区域,就会将前景区域中包含的此部分区域更替为背景区域,然后形成新的统计直方图,直至所有区域都得到更新,最终获得一张完整整洁的背景图像。Further, in the iterative process of step 4 in N frames, as N increases, the background position in the video sequence that is always covered by the foreground target gradually decreases. Once the inter-frame difference detects a new background area, it will replace this part of the foreground area with the background area, and then form a new statistical histogram, until all areas are updated, and finally get a complete and neat background image.
进一步地,所述步骤5包括以下子步骤:Further, the step 5 includes the following sub-steps:
步骤5.1:在N帧对应时间内,部分背景有较大概率会一直被前景目标覆盖,导致背景产生“黑洞”区域。为了保证初始背景图的完整性,仅在首次背景建模时,N取较大值。Step 5.1: Within the corresponding time of N frames, there is a high probability that part of the background will always be covered by the foreground target, resulting in a "black hole" area in the background. In order to ensure the integrity of the initial background image, only in the first background modeling, N takes a larger value.
步骤5.2:以N帧灰度图像序列作为一个batch,将前N帧图像{F 1,F 2,...,F N}称为batch 1。每个像素位置(x,y)的灰度直方图Hist x,y是根据其对应的灰度值序列p sequence(x,y)={F 1(x,y),F 2(x,y),...,F N(x,y)}统计得来,最终获取背景图像为Bg1。 Step 5.2: Take N frames of gray-scale image sequence as a batch, and call the first N frames of images {F 1 , F 2 ,..., F N } as batch 1 . The gray-level histogram of each pixel location (x, y) Hist x, y is based on its corresponding gray-level value sequence p sequence (x, y) = {F 1 (x, y), F 2 (x, y) ),..., F N (x, y)} is calculated, and the final background image is Bg1.
步骤5.3:当方法接收到第N+1帧图像时,将F N+1插入到batch 1中,并将F 1从中剔除,此时是batch 2:{F 2,F 3,...,F N+1},灰度直方图Hist x,y对应的灰度值序列p sequence(x,y)={F 2(x,y),F 3(x,y),...,F N+1(x,y)},最终获取背景图像为Bg 2Step 5.3: When the method receives the N+1th frame of image, insert F N+1 into batch 1 , and remove F 1 from it. At this time, it is batch 2 : {F 2 , F 3 ,..., F N+1 }, the gray value sequence p sequence (x, y) corresponding to the gray histogram Hist x, y = {F 2(x, y) , F 3(x, y) ,..., F N+1 (x, y)}, the final acquired background image is Bg 2 .
步骤5.4:如果Bg 2不存在“黑洞”区域,则输出;否则,以Bg 1为优化参考对象,将Bg 1在“黑洞”区域上相应位置上的灰度值填充到Bg 2上,得到完整背景图像。 Step 5.4: If there is no "black hole" area in Bg 2 , then output; otherwise, using Bg 1 as the optimized reference object, fill the gray value of Bg 1 at the corresponding position on the "black hole" area on Bg 2 , and get the complete Background image.
步骤5.5:如果视频流未结束,按照步骤5.3和5.4继续生成新的背景图像,直到视频流结束。Step 5.5: If the video stream is not over, follow steps 5.3 and 5.4 to continue to generate a new background image until the video stream ends.
本发明的交通视频背景建模方法融合帧间差分与统计直方两种方法优势,克服了在交通视频中难以直接提取背景,导致前景目标检测不准确的问题。首先利用帧间差分法检测运动目标大致区域的特点,剔除运动区域,再利用统计直方图对背景图像进行灰度值统计和选取,经过多次优化重建后,最终获得高质量背景图像,并实时进行背景更新。The traffic video background modeling method of the present invention combines the advantages of two methods of inter-frame difference and statistical histogram, and overcomes the problem that it is difficult to directly extract the background in the traffic video, which leads to inaccurate detection of foreground objects. First, use the inter-frame difference method to detect the characteristics of the general area of the moving target, eliminate the moving area, and then use the statistical histogram to count and select the gray value of the background image. After multiple optimization and reconstruction, a high-quality background image is finally obtained, and real-time Perform background updates.
一种交通视频背景建模系统,包括视频采集模块用于提供连续的交通视频流信息,方法集成模块用于封装背景建模方法,计算模块用于执行程序功能和处理数据,存储模块用于存 储应用程序、源数据和处理结果,显示模块用于显示输入、输出的图像信息。A traffic video background modeling system, including a video acquisition module for providing continuous traffic video stream information, a method integration module for encapsulating the background modeling method, a calculation module for executing program functions and processing data, and a storage module for storing Application programs, source data and processing results, and the display module is used to display input and output image information.
进一步地,视频采集模块使用固定装置在交通监控立杆上的摄像头采集垂直视角90°的实时交通视频流,摄像头内置图形处理器对捕获的静态图片和视频图像数据进行处理,并将处理后的数据流信息保存在存储模块中,显示在显示模块上,并作为输入信息传输到方法集成模块;Further, the video capture module uses a fixed device camera on a traffic monitoring pole to capture a real-time traffic video stream with a vertical viewing angle of 90°. The camera has a built-in graphics processor to process the captured still pictures and video image data, and process Data flow information is stored in the storage module, displayed on the display module, and transmitted to the method integration module as input information;
进一步地,所述方法集成模块,是交通视频背景建模方法的封装体,预留接口,形成黑盒,输入为格式正确的图像数据;Further, the method integration module is a package body of the traffic video background modeling method, reserves an interface to form a black box, and the input is image data in the correct format;
进一步地,所述计算模块,作为核心计算单元,通过执行存储在存储模块中的软件程序,以及调用存储在存储模块中的图像数据,实现程序运算和数据处理;Further, the calculation module, as a core calculation unit, implements program calculation and data processing by executing the software program stored in the storage module and calling the image data stored in the storage module;
进一步地,所述存储模块,用于存储背景建模方法的软件程序、由视频采集模块传来的源图像数据和由计算模块处理后的背景图像结果;Further, the storage module is used to store the software program of the background modeling method, the source image data transmitted from the video acquisition module, and the background image result processed by the calculation module;
进一步地,所述显示模块,作为图像呈现载体,用于显示输入的视频图像信息和输出的背景图像信息。Further, the display module, as an image presentation carrier, is used to display input video image information and output background image information.
与现有技术相比,本发明优势在于:1)本发明使用帧间差分有效地利用像素在时序和空间上的动态性,具有较高的准确率;2)本发明融合经典算法优势,计算方法简单,易于实现,具有较好的实时性;3)本发明能精准捕捉每一个背景点,在尽少帧内实现背景建模,具有较快的速度;4)本发明即使在车辆行驶速度较为缓慢的交通场景下,依然有着较高的完整度。Compared with the prior art, the advantages of the present invention are: 1) the present invention uses the inter-frame difference to effectively utilize the dynamics of pixels in time sequence and space, and has a higher accuracy; 2) the present invention combines the advantages of classic algorithms and calculates The method is simple, easy to implement, and has good real-time performance; 3) The present invention can accurately capture every background point, realizes background modeling in as few frames as possible, and has a faster speed; 4) The present invention is even at the speed of the vehicle In the slower traffic scene, there is still a high degree of completeness.
附图说明Description of the drawings
图1为本发明实施方式的交通视频背景建模方法流程图。Fig. 1 is a flowchart of a traffic video background modeling method according to an embodiment of the present invention.
图2为本发明实施方式的交通视频背景建模系统示意图。Fig. 2 is a schematic diagram of a traffic video background modeling system according to an embodiment of the present invention.
图3为本发明和部分已有方法在仿真视频下背景建模过程比较图。Figure 3 is a comparison diagram of the background modeling process of the present invention and some existing methods under the simulation video.
图4为本发明和部分已有方法背景建模的完整性变化曲线比较图。Figure 4 is a comparison diagram of the integrity change curves of the background modeling of the present invention and some existing methods.
图5为本发明和部分已有方法在真实视频下背景建模过程比较图。Figure 5 is a comparison diagram of the background modeling process of the present invention and some existing methods in real video.
具体实施方式Detailed ways
为了更清楚明白地理解本发明实施方式的目的、技术方案和优点,下面结合附图对本发明的内容做进一步的说明。此处所描述的具体实施例仅用于解释本发明,并不用于限定本发明。In order to understand the objectives, technical solutions, and advantages of the embodiments of the present invention more clearly, the content of the present invention will be further described below with reference to the accompanying drawings. The specific embodiments described here are only used to explain the present invention, but not used to limit the present invention.
实施例Example
图1为本发明实施方式的交通视频背景建模方法流程图。如图1所示,在视频流导入之后,方法步骤如下:Fig. 1 is a flowchart of a traffic video background modeling method according to an embodiment of the present invention. As shown in Figure 1, after the video stream is imported, the method steps are as follows:
(1)对原视频图像帧进行灰度化操作以减少方法复杂度和提高运算速度。具体操作如下:(1) Perform gray-scale operation on the original video image frame to reduce the complexity of the method and increase the calculation speed. The specific operations are as follows:
设坐标(x,y)像素点的RGB组成为(R,G,B),为所有颜色通道分配权重并加权求和,则灰度值V由公式①所得。每一个颜色通道的取值范围为[0,255],所以灰度值V的取值范围也为[0,255]。Assuming that the RGB composition of the pixel at the coordinates (x, y) is (R, G, B), all the color channels are assigned weights and weighted and summed, then the gray value V is obtained by formula ①. The value range of each color channel is [0,255], so the value range of the gray value V is also [0,255].
V=0.30R+0.59G+0.11B       ①V=0.30R+0.59G+0.11B①
将灰度化之后的视频帧图像序列记为F 1,F 2,...,F N∈I h*w,N为图像序列总帧数,h和w表示每帧图像尺寸,即h表示图像高度,w表示图像宽度。创建与视频帧尺寸一致且像素值都为0的灰度图作为初始化背景模型,用于以后优化更新。 Denote the gray-scaled video frame image sequence as F 1 , F 2 , ..., F N ∈ I h*w , where N is the total number of frames in the image sequence, and h and w represent the image size of each frame, that is, h represents The image height, w represents the image width. Create a grayscale image that is consistent with the video frame size and has a pixel value of 0 as the initial background model for future optimization and update.
(2)使用帧间差分法,通过图像差分、二值化、数学形态学滤波处理、连通性分析等操作提取视频中每帧的大致运动区域作为前景区域,并确定背景区域。具体操作如下:(2) Using the inter-frame difference method, extract the approximate motion area of each frame in the video as the foreground area through image difference, binarization, mathematical morphology filter processing, connectivity analysis and other operations, and determine the background area. The specific operations are as follows:
帧间差分法可以捕捉相邻两帧灰度值的变化,并根据变化情况定义区域性质,将灰度值变化较大的点组成的区域记为前景区域M,将灰度值变化较小的点组成的区域记为背景区域B。由于此时M是由当前帧和上一帧差分所得,所以M会残留上一帧运动变化的部分,这就导致检测框与实际运动物体并不完全契合,稍微大于运动物体所在区域。而且本发明方法是在不断地迭代过程中更新M和B从而获得完整的背景图像。所以M和B并不固定,是此消彼长的关系。The inter-frame difference method can capture the changes in the gray value of two adjacent frames, and define the nature of the area according to the change. The area composed of points with a large gray value change is recorded as the foreground area M, and the gray value change is small The area composed of dots is denoted as the background area B. Since M is obtained from the difference between the current frame and the previous frame at this time, the part of the motion change of the previous frame will remain in M, which causes the detection frame to not completely match the actual moving object, and is slightly larger than the area where the moving object is located. Moreover, the method of the present invention is to update M and B in a continuous iterative process to obtain a complete background image. Therefore, M and B are not fixed, they have a trade-off relationship.
对于视频帧图像序列F 1,F 2,...,F N,使用帧间差分法依次对相邻图像进行两两差分,判别除首帧之外每帧图像中的背景区域与前景区域。设F k-1和F k为相邻两帧视频图像(2≤K≤N),根据灰度值计算差值,得到差分图像D,由公式②所得。 For the video frame image sequence F 1 , F 2 , ..., F N , the inter-frame difference method is used to sequentially perform pairwise difference of adjacent images, and distinguish the background area and the foreground area in each frame of the image except the first frame. Let F k-1 and F k be two adjacent frames of video images (2≤K≤N), calculate the difference according to the gray value, and obtain the difference image D, which is obtained by formula ②.
D (k-1,k)(x,y)=|F (k-1)(x,y)-F k(x,y)|      ② D (k-1,k)(x,y) =|F (k-1)(x,y) -F k(x,y) | ②
选定合适的阈值T对差值图像D作二值化操作,得到二值化图像B,由公式③所得。其中,灰度值为255的为背景点,灰度值为0的为运动点即前景点。Choosing a suitable threshold T to perform binarization operation on the difference image D to obtain the binarization image B, which is obtained by formula ③. Among them, the gray value of 255 is the background point, and the gray value of 0 is the moving point, that is, the front scenic spot.
Figure PCTCN2020101551-appb-000003
Figure PCTCN2020101551-appb-000003
根据阈值T提取视频前景目标,将提取到的前景图像,采用形态学进行开运算、闭运算,通过多次膨胀和腐蚀组合运算降低噪声影响,使得前景运动目标轮廓整体性更加清晰。The video foreground target is extracted according to the threshold T, and the extracted foreground image is opened and closed using morphology, and the influence of noise is reduced through multiple expansion and erosion combined operations, so that the overall contour of the foreground moving target is clearer.
对每个前景运动目标区域,计算其外接矩形,并以此外接矩形作为检测框来标记出前景区域M。一旦前景区域M被提取出来,那么背景区域B也就随之确定。For each foreground moving target area, calculate its circumscribed rectangle, and use the circumscribed rectangle as the detection frame to mark the foreground area M. Once the foreground area M is extracted, the background area B is also determined accordingly.
(3)使用统计直方图法,标记定前景区域,获得背景区域内图像的灰度值分布,确定背景区域每个位置的像素值,进行背景图像的估计。具体操作如下:(3) Use the statistical histogram method to mark the foreground area, obtain the gray value distribution of the image in the background area, determine the pixel value of each position in the background area, and estimate the background image. The specific operations are as follows:
将前景区域M全都标记为-1,以便区别于区间为[0,255]的灰度值。Mark all the foreground areas M as -1 to distinguish them from the gray value in the interval [0,255].
对背景区域B中每个位置(x,y)建立一个对应的与前景无关且与背景有关的灰度直方图,统计各像素灰度值的出现频率,选择其上出现次数最多的像素值p作为背景图像同坐标位置(x,y)上的像素值。像素值选取策略由公式④表示。For each position (x, y) in the background area B, create a corresponding gray histogram that is irrelevant to the foreground and related to the background, count the occurrence frequency of the gray value of each pixel, and select the pixel value p with the most occurrences. As the background image, the pixel value at the same coordinate position (x, y). The pixel value selection strategy is represented by formula ④.
Figure PCTCN2020101551-appb-000004
Figure PCTCN2020101551-appb-000004
其中,Hist x,y[p]=K(x,y,p)++,if F k(x,y)=p,p∈[0,255]      ⑤ Among them, Hist x, y [p] = K(x, y, p)++, if F k (x, y) = p, p ∈ [0, 255] ⑤
在式⑤中,K(x,y,p)表示在图像(x,y)处像素灰度值为p时出现的次数,f k(x,y)=p表示图像f k在(x,y)处像素值为p,Hist x,y就表示在坐标点(x,y)处以像素灰度值p为统计依据的直方图。在式④中,B k(x,y)以像素点(x,y)在N帧灰度视频图像序列上频数最大的像素数值作为像素点的背景灰度值,M k(x,y)以-1标记前景区域,以便后续更新。 In formula ⑤, K(x, y, p) represents the number of times when the pixel gray value is p at the image (x, y), f k (x, y) = p represents the image f k in (x, The pixel value at y) is p, Hist x, y represents a histogram based on the pixel gray value p as the statistical basis at the coordinate point (x, y). In formula ④, B k (x, y) takes the pixel value of the pixel (x, y) with the largest frequency in the N-frame gray-scale video image sequence as the background gray value of the pixel, M k (x, y) Mark the foreground area with -1 for subsequent updates.
像素值选取之后,前景区域和背景区域共同组成待优化的背景图像Bg。After the pixel value is selected, the foreground area and the background area together form the background image Bg to be optimized.
(4)在N帧视频图像序列内循环步骤1、2、3,将前景区域逐帧更替成背景区域,最终得到一幅完整整洁的背景图像。具体操作如下:(4) Repeat steps 1, 2, and 3 in the N-frame video image sequence, and replace the foreground area into a background area frame by frame, and finally obtain a complete and neat background image. The specific operations are as follows:
在N帧内的迭代过程中,随着N的增大,视频序列中被前景目标一直遮盖的背景位置逐渐减少。帧间差分一旦检测出新的背景区域,就会将前景区域中包含的此部分区域更新为背景区域,然后形成新的统计直方图,直至所有区域都得到更新,最终获得一张完整整洁的背景图像。In the iterative process within N frames, as N increases, the background position in the video sequence that has been covered by the foreground target gradually decreases. Once the inter-frame difference detects a new background area, it will update the part of the area contained in the foreground area as the background area, and then form a new statistical histogram, until all areas are updated, and finally get a complete and neat background image.
(5)采用“首出尾入”的更新策略,分析最新帧背景图像完整性,以上一帧背景图像为依据作优化处理。具体操作如下:(5) Adopt the update strategy of "first out and end in" to analyze the integrity of the latest frame of background image, and optimize the processing based on the previous frame of background image. The specific operations are as follows:
在N帧对应时间内,部分背景有较大概率会一直被前景目标覆盖,导致背景产生“黑洞”区域。为了保证初始背景图的完整性,仅在首次背景建模时,N取较大值。Within the corresponding time of N frames, there is a high probability that part of the background will always be covered by the foreground target, resulting in a "black hole" area in the background. In order to ensure the integrity of the initial background image, only in the first background modeling, N takes a larger value.
以N帧灰度图像序列作为一个batch,将前N帧图像{F 1,F 2,...,F N}称为batch 1。每个像 素位置(x,y)的灰度直方图Hist x,y是根据其对应的灰度值序列p sequence(x,y)={F 1(x,y),F 2(x,y),...,F N(x,y)}统计得来,最终获取背景图像为Bg 1Taking a sequence of N frames of grayscale images as a batch, the first N frames of images {F 1 , F 2 ,..., F N } are called batch 1 . The gray-level histogram of each pixel location (x, y) Hist x, y is based on its corresponding gray-level value sequence p sequence (x, y) = {F 1 (x, y), F 2 (x, y) ),..., F N (x, y)} is calculated, and the final background image is Bg 1 .
当方法接收到第N+1帧图像时,将F N+1插入到batch 1中,并将F 1从中剔除,此时是batch 2:{F 2,F 3,...,F N+1},灰度直方图Hist x,y对应的灰度值序列p sequence(x,y)={F 2(x,y),F 3(x,y),...,F N+1(x,y)},最终获取背景图像为Bg 2When the method receives the N+1th frame image, it inserts F N+1 into batch 1 , and removes F 1 from it. At this time, it is batch 2 : {F 2 , F 3 ,..., F N+ 1 }, the gray value sequence p sequence (x, y) corresponding to the gray histogram Hist x, y = {F 2(x, y) , F 3(x, y) ,..., F N+1 (x, y)}, the final acquired background image is Bg 2 .
如果Bg 2不存在“黑洞”区域,则输出;否则,以Bg 1为优化参考对象,将Bg 1在“黑洞”区域上相应位置上的灰度值填充到Bg 2上,得到完整背景图像。 If Bg 2 "black hole" area does not exist, then the output; otherwise, in order to optimize the reference object Bg 1, Bg 1 on the "black hole" area fill gradation value at the corresponding position to the Bg 2, to obtain a complete image background.
以此类推,直到视频流结束。And so on, until the end of the video stream.
图2是本发明实施方式的交通视频背景建模系统示意图。本发明系统中,视频采集模块用于提供连续的交通视频流信息,方法集成模块用于封装背景建模方法,计算模块用于执行程序功能和处理数据,存储模块用于存储应用程序、源数据和处理结果,显示模块用于显示输入、输出的图像信息。Fig. 2 is a schematic diagram of a traffic video background modeling system according to an embodiment of the present invention. In the system of the present invention, the video acquisition module is used to provide continuous traffic video stream information, the method integration module is used to encapsulate the background modeling method, the calculation module is used to execute program functions and process data, and the storage module is used to store application programs and source data. And processing results, the display module is used to display input and output image information.
如图2所示,视频采集模块使用固定装置在交通监控立杆上的摄像头采集垂直视角90°的实时交通视频流,摄像头内置图形处理器对捕获的静态图片和视频图像数据进行处理,并将处理后的数据流信息保存在存储模块中,显示在显示模块上,并作为输入信息传输到方法集成模块;As shown in Figure 2, the video capture module uses a fixed-device camera on a traffic monitoring pole to capture a real-time traffic video stream with a vertical viewing angle of 90°. The camera has a built-in graphics processor to process the captured still pictures and video image data, and The processed data flow information is stored in the storage module, displayed on the display module, and transmitted to the method integration module as input information;
方法集成模块是交通视频背景建模方法的封装体,预留接口,形成黑盒,输入为格式正确的图像数据;The method integration module is the package body of the traffic video background modeling method. The interface is reserved to form a black box, and the input is image data in the correct format;
计算模块作为核心计算单元,通过执行存储在存储模块中的软件程序,以及调用存储在存储模块中的图像数据,实现程序运算和数据处理;As the core computing unit, the calculation module implements program calculation and data processing by executing the software program stored in the storage module and calling the image data stored in the storage module;
存储模块用于存储背景建模方法的软件程序、由视频采集模块传来的源图像数据和由计算模块处理后的背景图像结果;The storage module is used to store the software program of the background modeling method, the source image data from the video acquisition module and the background image result processed by the calculation module;
显示模块作为图像呈现载体,用于显示输入的视频图像信息和输出的背景图像信息。The display module is used as an image presentation carrier to display input video image information and output background image information.
本发明融合帧间差分与统计直方两种方法优势,并将方法封装成模块,以智能监控系统为设备支撑,可以克服在交通视频中难以直接提取背景,导致前景目标检测不准确的问题。方案中的创新具体在于:本发明融合经典算法优势,计算方法简单,易于实现,使用帧间差分有效地利用像素在时序和空间上的动态性,使用统计直方图有效对像素值进行估计,具有较高精确性、较快运算速度和较高的背景完整度。无论是在普通交通场景,还是在车辆行驶 缓慢的典型交通场景中,此方法都可以提取出与真实背景相似匹配度更高的背景图像The invention integrates the advantages of the two methods of inter-frame difference and statistical histogram, and encapsulates the method into a module, and is supported by an intelligent monitoring system, which can overcome the problem that it is difficult to directly extract the background in the traffic video and the foreground target detection is inaccurate. The innovations in the scheme are specifically: the present invention integrates the advantages of classic algorithms, the calculation method is simple and easy to implement, the inter-frame difference is used to effectively utilize the dynamics of pixels in time sequence and space, and the statistical histogram is used to effectively estimate the pixel value. Higher accuracy, faster calculation speed and higher background integrity. Whether in a normal traffic scene or a typical traffic scene with slow vehicles, this method can extract a background image that is similar to the real background and has a higher degree of matching.
为了验证本发明方法相较于现有技术具有较好的效果,使用仿真交通视频和真实交通视频共同验证。其中,仿真交通视频用以验证方法理论原理可靠性,真实交通视频用以验证方法实际应用有效性。In order to verify that the method of the present invention has a better effect than the prior art, the simulated traffic video and the real traffic video are used for joint verification. Among them, the simulation traffic video is used to verify the reliability of the theoretical principle of the method, and the real traffic video is used to verify the effectiveness of the method in practical application.
图3为本发明和部分已有方法在仿真视频下背景建模过程比较图。仿真交通视频分辨率大小为590×350像素,以城市道路作背景记为Bg true,运动车辆作前景记为Fg true。为了解决已有背景建模方法在车辆行驶缓慢时效果不佳的问题,定义车辆以每帧2-4个像素长度的速度右行。在该典型场景下,比较多帧图像平均算法、统计直方图算法、混合高斯背景建模算法与本发明方法的性能优劣。 Figure 3 is a comparison diagram of the background modeling process of the present invention and some existing methods under the simulation video. The resolution of the simulated traffic video is 590×350 pixels. The city road is recorded as Bg true as the background, and the moving vehicle is recorded as Fg true as the foreground. In order to solve the problem that the existing background modeling method does not work well when the vehicle is traveling slowly, the vehicle is defined to travel right at a speed of 2-4 pixels per frame. In this typical scenario, compare the performance pros and cons of the multi-frame image averaging algorithm, statistical histogram algorithm, mixed Gaussian background modeling algorithm and the method of the present invention.
如图3所示,其中a行为仿真视频序列帧,b行为多帧图像平均算法背景建模过程,c行为统计直方图算法背景建模过程,d行为混合高斯背景建模算法背景建模过程,e行为本发明方法背景建模过程。受车辆运动缓慢的较大影响,部分背景被车辆遮挡时间较长,多帧图像平均算法提取的背景图像像素分布不均匀,有明显失真痕迹。统计直方图算法最终可以提取出与实际背景较为接近的背景图像,但是仍残留部分噪声,在复杂场景环境下表现效果仍不理想。混合高斯背景建模算法使用多个高斯分布描述每个像素点颜色的呈现规律,时间复杂度高,且会引入噪声。本发明方法能够在第47帧时就提取到最为完整和清晰的背景图像,与其他三种算法相比,即使在车辆运动缓慢场景下,依然可以保持良好表现。As shown in Figure 3, where a is the simulation video sequence frame, b is the background modeling process of the multi-frame image averaging algorithm, c is the background modeling process of the statistical histogram algorithm, and d is the background modeling process of the mixed Gaussian background modeling algorithm. e is the background modeling process of the method of the present invention. Affected by the slow movement of the vehicle, part of the background is blocked by the vehicle for a long time. The pixel distribution of the background image extracted by the multi-frame image averaging algorithm is uneven, and there are obvious traces of distortion. The statistical histogram algorithm can finally extract a background image that is closer to the actual background, but still some noise remains, and the performance is still not ideal in a complex scene environment. The mixed Gaussian background modeling algorithm uses multiple Gaussian distributions to describe the color presentation law of each pixel, which has high time complexity and introduces noise. The method of the present invention can extract the most complete and clear background image at the 47th frame. Compared with the other three algorithms, it can still maintain good performance even in the scene of slow vehicle movement.
图4为本发明和部分已有方法背景建模的完整性变化曲线比较图。从理论上讲,衡量一幅背景图像完整性的最直接的方法是对提取的背景图像Bg和真实背景图像Bg_true进行像素级别的一致性判断。为了便于比较,定义公式:Figure 4 is a comparison diagram of the integrity change curves of the background modeling of the present invention and some existing methods. Theoretically, the most direct way to measure the integrity of a background image is to judge the consistency of the extracted background image Bg and the real background image Bg_true at the pixel level. In order to facilitate comparison, define the formula:
Figure PCTCN2020101551-appb-000005
Figure PCTCN2020101551-appb-000005
NBFOR(Non-Background pixels to Foreground Objection pixels Ratio)是指Bg与Bg true中像素值不一致的像素点个数同前景图像Fg true中像素点个数之比,NBFOR值越小表示Bg中残存的非真实背景像素点越少,完整性越高。 NBFOR (Non-Background pixels to Foreground Objection pixels Ratio) refers to the ratio of the number of pixels with different pixel values in Bg and Bg true to the number of pixels in the foreground image Fg true . The fewer real background pixels, the higher the integrity.
如图4所示为各种算法在整个仿真视频中提取背景的完整性变化过程,X轴代表视频帧序号,Y轴代表NBFOR值。从中可以看出,本发明方法可以提取完整度最高的背景图像,且使用较少的帧实现。Figure 4 shows the completeness change process of various algorithms extracting the background in the entire simulation video. The X axis represents the video frame number, and the Y axis represents the NBFOR value. It can be seen that the method of the present invention can extract the background image with the highest degree of completeness, and it can be realized by using fewer frames.
图5为本发明和部分已有方法在真实视频下的背景建模过程比较图。数据取自 UA-DETRAC数据集,该数据集中每帧图片分辨率为960×540像素,每秒25帧。在真实交通场景中,比较多帧图像平均算法、统计直方图算法、混合高斯背景建模算法与本发明方法的性能优劣。Figure 5 is a comparison diagram of the background modeling process of the present invention and some existing methods under real video. The data is taken from the UA-DETRAC dataset, which has a resolution of 960×540 pixels per frame at 25 frames per second. In a real traffic scene, compare the performance pros and cons of the multi-frame image averaging algorithm, statistical histogram algorithm, mixed Gaussian background modeling algorithm and the method of the present invention.
如图5所示,其中a行为真实视频序列帧,b行为多帧图像平均算法背景建模过程,c行为统计直方图算法背景建模过程,d行为混合高斯背景建模算法背景建模过程,e行为本发明方法背景建模过程。本发明方法在N取15时,便可以得到完整背景图像,比其他方法在使用帧数上更少、在时间上更快速、在完整度上更高。As shown in Figure 5, where a is the real video sequence frame, b is the background modeling process of multi-frame image averaging algorithm, c is the background modeling process of statistical histogram algorithm, and d is the background modeling process of mixed Gaussian background modeling algorithm. e is the background modeling process of the method of the present invention. The method of the present invention can obtain a complete background image when N is set to 15. Compared with other methods, the number of frames used is less, the time is faster, and the degree of completeness is higher.
以上所述实施例仅仅是对本发明的优选实施方式进行描述,并非对本发明的范围进行限定。文中所用术语和公式符号,旨在最好地解释各实施例的原理和过程,使本技术领域的其他技术人员能理解本文所述的实施例。在不偏离本发明设计精神的前提下,本领域技术人员对本发明的技术方案作出的各种变形和改进,均应落入本发明的权利要求书确定的保护范围内。The above-mentioned embodiments merely describe the preferred embodiments of the present invention, and do not limit the scope of the present invention. The terms and formula symbols used in the text are intended to best explain the principles and processes of the embodiments, so that other skilled in the art can understand the embodiments described herein. Without departing from the design spirit of the present invention, various modifications and improvements made by those skilled in the art to the technical solution of the present invention should fall within the protection scope determined by the claims of the present invention.

Claims (8)

  1. 一种交通视频背景建模方法,其特征在于,包括以下步骤:A traffic video background modeling method is characterized in that it includes the following steps:
    步骤1:对原视频图像帧进行灰度化操作;Step 1: Perform a grayscale operation on the original video image frame;
    步骤2:使用帧间差分法提取相邻帧前景区域,确定背景区域;Step 2: Use the inter-frame difference method to extract the foreground area of adjacent frames and determine the background area;
    步骤3:使用统计直方图法确定背景区域每个位置像素值;Step 3: Use the statistical histogram method to determine the pixel value of each position in the background area;
    步骤4:在N帧视频图像序列内循环前三步骤,重建背景图像;Step 4: Loop the first three steps in the N-frame video image sequence to reconstruct the background image;
    步骤5:采用“首出尾入”的更新策略,进行背景更新。Step 5: Use the "first-out and end-in" update strategy to update the background.
  2. 根据权利要求1所述的交通视频背景建模方法,其特征在于,所述步骤1中对原交通视频图像帧进行灰度化操作如下:设坐标(x,y)像素点的RGB组成为(R,G,B),为所有颜色通道分配权重并加权求和,则灰度值V由公式①所得,每一个颜色通道的取值范围为[0,255],灰度值V的取值范围为[0,255]The traffic video background modeling method according to claim 1, characterized in that, in the step 1, the gray-scale operation of the original traffic video image frame is as follows: Set the RGB composition of the coordinate (x, y) pixel point as ( R, G, B), assign weights to all color channels and weighted sum, then the gray value V is obtained by formula ①, the value range of each color channel is [0,255], and the value range of the gray value V is [0,255]
    V=0.30R+0.59G+0.11B    ①。V=0.30R+0.59G+0.11B①.
  3. 根据权利要求1所述的交通视频背景建模方法,其特征在于,所述步骤2包括以下子步骤:The traffic video background modeling method according to claim 1, wherein said step 2 comprises the following sub-steps:
    步骤2.1:对于视频帧图像序列F 1,F 2,...,F N,N为视频流总帧数;使用帧间差分法依次对相邻图像进行两两差分,设F k-1和F k为相邻两帧视频图像(2≤K≤N),根据灰度值计算差值,得到差分图像D,由公式②所得; Step 2.1: For the video frame image sequence F 1 , F 2 , ..., F N , N is the total number of video stream frames; use the inter-frame difference method to sequentially differentiate adjacent images in pairs, set F k-1 and F k is two adjacent frames of video images (2≤K≤N), and the difference is calculated according to the gray value to obtain the difference image D, which is obtained by formula ②;
    D (k-1,k)(x,y)=|F (k-1)(x,y)-F k(x,y)|    ② D (k-1,k)(x,y) =|F (k-1)(x,y) -F k(x,y) | ②
    步骤2.2:选定阈值T对差值图像D作二值化操作,得到二值化图像B,由公式③所得,其中,灰度值为255的为背景点,灰度值为0的为运动点即前景点;Step 2.2: Select the threshold T to perform binarization operation on the difference image D to obtain the binarized image B, which is obtained by formula ③, where the gray value is 255 as the background point, and the gray value is 0 as the motion Point to the former scenic spot;
    Figure PCTCN2020101551-appb-100001
    Figure PCTCN2020101551-appb-100001
    步骤2.3:根据阈值T提取视频前景目标,将提取到的前景图像,采用形态学进行开运算、闭运算,通过膨胀和腐蚀组合运算降低噪声影响,使得前景运动目标轮廓整体性更加清晰;Step 2.3: Extract the video foreground target according to the threshold T, and use the morphology to open and close the extracted foreground image, and reduce the influence of noise through the combined operation of expansion and erosion, so that the overall contour of the foreground moving target is clearer;
    步骤2.4:对每个前景运动目标区域,计算其外接矩形,并以此外接矩形作为检测框来标记出前景区域M,如果前景区域M被提取出来,则非M区域即为背景区域B。Step 2.4: Calculate the circumscribed rectangle for each foreground moving target area, and use the circumscribed rectangle as the detection frame to mark the foreground area M. If the foreground area M is extracted, the non-M area is the background area B.
  4. 根据权利要求1所述的交通视频背景建模方法,其特征在于,所述步骤3包括如下子步骤:The traffic video background modeling method according to claim 1, wherein said step 3 comprises the following sub-steps:
    步骤3.1:将前景区域M全都标记为-1,用于区别于区间为[0,255]的灰度值;Step 3.1: Mark all the foreground area M as -1, which is used to distinguish the gray value from the interval [0,255];
    步骤3.2:对背景区域B中每个位置(x,y)建立一个对应的与前景无关且与背景有关的灰度直方图,统计各像素灰度值的出现频率,选择其上出现次数最多的像素值p作为背景图像同坐标位置(x,y)上的像素值,像素值选取策略由公式④表示;Step 3.2: For each position (x, y) in the background area B, establish a corresponding gray histogram that has nothing to do with the foreground and is related to the background, count the occurrence frequency of the gray value of each pixel, and select the one with the most occurrences. The pixel value p is used as the pixel value at the same coordinate position (x, y) of the background image, and the pixel value selection strategy is expressed by formula ④;
    Figure PCTCN2020101551-appb-100002
    Figure PCTCN2020101551-appb-100002
    其中,Hist x,y[p]=K(x,y,p)++,if F k(x,y)=p,p∈[0,255]    ⑤ Among them, Hist x, y [p] = K(x, y, p)++, if F k (x, y) = p, p ∈ [0, 255] ⑤
    在式⑤中,K(x,y,p)表示在图像(x,y)处像素灰度值为p时出现的次数,f k(x,y)=p表示图像f k在(x,y)处像素值为p,Hist x,y就表示在坐标点(x,y)处以像素灰度值p为统计依据的直方图; In formula ⑤, K(x, y, p) represents the number of times when the pixel gray value is p at the image (x, y), f k (x, y) = p represents the image f k in (x, y) the pixel value is p, Hist x, y represents the histogram based on the pixel gray value p as the statistical basis at the coordinate point (x, y);
    步骤3.3:像素值选取之后,前景区域和背景区域共同组成待优化的背景图像Bg。Step 3.3: After the pixel value is selected, the foreground area and the background area together form the background image Bg to be optimized.
  5. 根据权利要求1所述的交通视频背景建模方法,其特征在于,所述步骤4在N帧内的迭代过程中,随着N的增大,视频序列中被前景目标一直遮盖的背景位置逐渐减少,帧间差分一旦检测出新的背景区域,则将前景区域中包含的此部分区域更新为背景区域,然后形成新的统计直方图,直至所有区域都得到更新,最终获得一张背景图像。The traffic video background modeling method according to claim 1, characterized in that, in the iterative process of step 4 in N frames, as N increases, the position of the background that has been covered by the foreground target in the video sequence gradually Decrease, once a new background area is detected by the inter-frame difference, the part of the area contained in the foreground area is updated as the background area, and then a new statistical histogram is formed until all areas are updated, and finally a background image is obtained.
  6. 根据权利要求1所述的交通视频背景建模方法,其特征在于,所述步骤5包括以下子步骤:The traffic video background modeling method according to claim 1, wherein said step 5 comprises the following sub-steps:
    步骤5.1:在N帧对应时间内,在首次背景建模时,取值范围为20至30之间,非首次背景建模时,N取值范围为10至15之间;Step 5.1: In the corresponding time of N frames, the value range of N is between 20 and 30 during the first background modeling, and the value of N is between 10 and 15 during the non-first background modeling;
    步骤5.2:以N帧灰度图像序列作为一个batch,将前N帧图像{F 1,F 2,...,F N}称为batch 1;每个像素位置(x,y)的灰度直方图Hist x,y是根据其对应的灰度值序列p sequence(x,y)={F 1(x,y),F 2(x,y),...,F N(x,y)}统计得来,最终获取无“黑洞”区域的完整背景图像为Bg 1Step 5.2: Take N frames of gray-scale image sequence as a batch, call the first N frames of images {F 1 , F 2 ,..., F N } as batch 1 ; the gray scale of each pixel position (x, y) The histogram Hist x, y is based on its corresponding gray value sequence p sequence (x, y) = {F 1 (x, y), F 2 (x, y),..., F N (x, y) )} Based on statistics, the final complete background image of the area without "black holes" is Bg 1 ;
    步骤5.3:当交通视频背景建模方法接收到第N+1帧图像时,将F N+1插入到batch 1中,并将F 1从中剔除,此时是batch 2:{F 2,F 3,...,F N+1},灰度直方图Hist x,y对应的灰度值序列p sequence(x,y)={F 2(x,y),F 3(x,y),...,F N+1(x,y)},最终获取背景图像为Bg 2Step 5.3: When the traffic video background modeling method receives the N+1th frame image, insert F N+1 into batch 1 , and remove F 1 from it. At this time, it is batch 2 : {F 2 , F 3 ,..., F N+1 }, the gray value sequence p sequence (x, y) corresponding to the gray histogram Hist x, y = {F 2 (x, y), F 3 (x, y), ..., F N+1 (x, y)}, the final acquired background image is Bg 2 ;
    步骤5.4:如果Bg 2不存在“黑洞”区域,则输出;否则,以Bg 1为优化参考对象,将Bg 1在“黑洞”区域上相应位置上的灰度值填充到Bg 2上,得到完整背景图像; Step 5.4: If there is no "black hole" area in Bg 2 , then output; otherwise, using Bg 1 as the optimized reference object, fill the gray value of Bg 1 at the corresponding position on the "black hole" area on Bg 2 , and get the complete Background image
    步骤5.5:如果视频流未结束,返回步骤5.3和5.4继续生成新的背景图像,直到视频流结束。Step 5.5: If the video stream is not over, return to steps 5.3 and 5.4 to continue to generate a new background image until the video stream ends.
  7. 一种交通视频背景建模系统,其特征在于,包括以下模块:视频采集模块用于提供连续的交通视频流信息,方法集成模块用于封装背景建模方法,计算模块用于执行程序功能和处理数据,存储模块用于存储应用程序、源数据和处理结果,显示模块用于显示生成的背景图像。A traffic video background modeling system, which is characterized by comprising the following modules: a video acquisition module is used to provide continuous traffic video stream information, a method integration module is used to encapsulate a background modeling method, and a calculation module is used to perform program functions and processing Data, the storage module is used to store application programs, source data and processing results, and the display module is used to display the generated background image.
  8. 根据权利要求7所述的交通视频背景建模系统,其特征在于:The traffic video background modeling system according to claim 7, characterized in that:
    所述视频采集模块,固定安装在交通监控立杆上的摄像头采集垂直视角90°的实时交通视频流,摄像头内置图形处理器对捕获的静态图片和视频图像数据进行处理,并将处理后的数据流信息保存在存储模块中,显示在显示模块上,并作为输入信息传输到方法集成模块;In the video acquisition module, a camera fixedly installed on a traffic monitoring pole collects a real-time traffic video stream with a vertical viewing angle of 90°, and the camera has a built-in graphics processor to process the captured still pictures and video image data, and the processed data The flow information is stored in the storage module, displayed on the display module, and transmitted to the method integration module as input information;
    所述方法集成模块,用于交通视频背景建模方法的封装,预留接口,形成黑盒,输入为格式正确的图像数据;The method integration module is used to encapsulate the traffic video background modeling method, reserve an interface, form a black box, and input image data in the correct format;
    所述计算模块,通过执行存储在存储模块中的软件程序,以及调用存储在存储模块中的图像数据,实现程序运算和数据处理;The calculation module implements program calculation and data processing by executing the software program stored in the storage module and calling the image data stored in the storage module;
    所述存储模块,用于存储交通视频背景建模方法的软件程序、由视频采集模块传来的源图像数据和由计算模块处理后的背景图像结果;The storage module is used to store the software program of the traffic video background modeling method, the source image data transmitted from the video acquisition module, and the background image result processed by the calculation module;
    所述显示模块,作为图像呈现载体,用于显示输入的视频图像信息和输出的背景图像信息。The display module, as an image presentation carrier, is used to display input video image information and output background image information.
PCT/CN2020/101551 2020-04-12 2020-07-13 Traffic video background modelling method and system WO2021208275A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010282644.X 2020-04-12
CN202010282644.XA CN111539273B (en) 2020-04-12 2020-04-12 Traffic video background modeling method and system

Publications (1)

Publication Number Publication Date
WO2021208275A1 true WO2021208275A1 (en) 2021-10-21

Family

ID=71977076

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/101551 WO2021208275A1 (en) 2020-04-12 2020-07-13 Traffic video background modelling method and system

Country Status (3)

Country Link
CN (1) CN111539273B (en)
LU (1) LU101981B1 (en)
WO (1) WO2021208275A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596573A (en) * 2021-07-28 2021-11-02 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114612853A (en) * 2022-02-11 2022-06-10 江苏濠汉信息技术有限公司 Vehicle detection system and method based on attention mechanism and time sequence image analysis
CN114863109A (en) * 2022-05-25 2022-08-05 广东飞达交通工程有限公司 Segmentation technology-based fine recognition method for various targets and elements of traffic scene
CN114951017A (en) * 2022-05-12 2022-08-30 深圳市顺鑫昌文化股份有限公司 Online intelligent detection error reporting system for label printing
CN115019508A (en) * 2022-06-13 2022-09-06 华南理工大学 Road monitoring traffic flow simulation method, device, equipment and medium based on machine learning
CN115019030A (en) * 2022-03-05 2022-09-06 中国电波传播研究所(中国电子科技集团公司第二十二研究所) Visual detection and identification method for abnormal drilling line flow
CN115618051A (en) * 2022-12-20 2023-01-17 楠楠聚智信息科技有限责任公司 Internet-based smart campus monitoring video storage method
FR3131047A1 (en) * 2021-12-21 2023-06-23 Orange Method for detecting the movement of at least one object, electronic device, system, computer program product and corresponding storage medium
CN116503388A (en) * 2023-06-25 2023-07-28 广东利元亨智能装备股份有限公司 Defect detection method, device and storage medium
CN117424988A (en) * 2023-12-15 2024-01-19 浙江大学台州研究院 Image processing system and processing method for intelligently managing welding machine
CN117478891A (en) * 2023-12-28 2024-01-30 辽宁云也智能信息科技有限公司 Intelligent management system for building construction
CN117939044A (en) * 2024-03-22 2024-04-26 广东九安智能科技股份有限公司 Video intelligent storage management system suitable for wireless video monitoring system

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112255536B (en) * 2020-09-21 2023-05-26 山东产研鲲云人工智能研究院有限公司 Switch fault detection method and device, electronic equipment and storage medium
CN112380962A (en) * 2020-11-11 2021-02-19 成都摘果子科技有限公司 Animal image identification method and system based on deep learning
CN112233137A (en) * 2020-11-19 2021-01-15 成都寰蓉光电科技有限公司 High-performance weighted standard deviation background modeling method
CN113643323B (en) * 2021-08-20 2023-10-03 中国矿业大学 Target detection system under urban underground comprehensive pipe rack dust fog environment
CN113807227B (en) * 2021-09-11 2023-07-25 浙江浙能嘉华发电有限公司 Safety monitoring method, device, equipment and storage medium based on image recognition
CN115273565A (en) * 2022-06-24 2022-11-01 苏州数智源信息技术有限公司 Airplane apron early warning method, device and terminal based on AI big data
CN115147441A (en) * 2022-07-31 2022-10-04 江苏云舟通信科技有限公司 Cutout special effect processing system based on data analysis

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216942A (en) * 2008-01-14 2008-07-09 浙江大学 An increment type characteristic background modeling algorithm of self-adapting weight selection
US20130114872A1 (en) * 2011-11-03 2013-05-09 Siemens Corporation Compressed sensing using regional sparsity
CN104978722A (en) * 2015-07-06 2015-10-14 天津大学 Multi-exposure image fusion ghosting removing method based on background modeling
CN107194949A (en) * 2017-05-18 2017-09-22 华中科技大学 A kind of interactive video dividing method and system for being matched based on block and strengthening Onecut

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609689B (en) * 2012-02-03 2016-12-28 江苏科海智能系统有限公司 A kind of video track background modeling method based on multiframe statistics
CN105631405B (en) * 2015-12-17 2018-12-07 谢寒 Traffic video intelligent recognition background modeling method based on Multilevel Block
US10261574B2 (en) * 2016-11-30 2019-04-16 University Of Macau Real-time detection system for parked vehicles

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216942A (en) * 2008-01-14 2008-07-09 浙江大学 An increment type characteristic background modeling algorithm of self-adapting weight selection
US20130114872A1 (en) * 2011-11-03 2013-05-09 Siemens Corporation Compressed sensing using regional sparsity
CN104978722A (en) * 2015-07-06 2015-10-14 天津大学 Multi-exposure image fusion ghosting removing method based on background modeling
CN107194949A (en) * 2017-05-18 2017-09-22 华中科技大学 A kind of interactive video dividing method and system for being matched based on block and strengthening Onecut

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WANG QIA, QI YONG: "Method for Traffic Video Background Modeling Based on Inter-frame Difference and Statistical Histogram", COMPUTER SCIENCE, KEXUE JISHU WENXIAN CHUBANSHE CHONGQING FENSHE, CN, vol. 47, no. 10, 13 May 2020 (2020-05-13), CN , pages 174 - 179, XP055859270, ISSN: 1002-137X *
ZHANG XUE-RONG, LEI GUO-WEI : "A Background Subtraction Algorithms of Object Detection Based on Histogram", COMPUTER SECURITY, no. 108, 28 February 2010 (2010-02-28), pages 45 - 47, XP009531194, ISSN: 1671-0428 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596573A (en) * 2021-07-28 2021-11-02 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
FR3131047A1 (en) * 2021-12-21 2023-06-23 Orange Method for detecting the movement of at least one object, electronic device, system, computer program product and corresponding storage medium
CN114612853A (en) * 2022-02-11 2022-06-10 江苏濠汉信息技术有限公司 Vehicle detection system and method based on attention mechanism and time sequence image analysis
CN115019030A (en) * 2022-03-05 2022-09-06 中国电波传播研究所(中国电子科技集团公司第二十二研究所) Visual detection and identification method for abnormal drilling line flow
CN115019030B (en) * 2022-03-05 2024-04-09 中国电波传播研究所(中国电子科技集团公司第二十二研究所) Visual detection and identification method for abnormal drilling line flow
CN114951017A (en) * 2022-05-12 2022-08-30 深圳市顺鑫昌文化股份有限公司 Online intelligent detection error reporting system for label printing
CN114863109A (en) * 2022-05-25 2022-08-05 广东飞达交通工程有限公司 Segmentation technology-based fine recognition method for various targets and elements of traffic scene
CN115019508A (en) * 2022-06-13 2022-09-06 华南理工大学 Road monitoring traffic flow simulation method, device, equipment and medium based on machine learning
CN115019508B (en) * 2022-06-13 2023-09-29 华南理工大学 Road monitoring traffic flow simulation method, device, equipment and medium based on machine learning
CN115618051B (en) * 2022-12-20 2023-03-21 楠楠聚智信息科技有限责任公司 Internet-based smart campus monitoring video storage method
CN115618051A (en) * 2022-12-20 2023-01-17 楠楠聚智信息科技有限责任公司 Internet-based smart campus monitoring video storage method
CN116503388A (en) * 2023-06-25 2023-07-28 广东利元亨智能装备股份有限公司 Defect detection method, device and storage medium
CN116503388B (en) * 2023-06-25 2023-11-14 广东利元亨智能装备股份有限公司 Defect detection method, device and storage medium
CN117424988A (en) * 2023-12-15 2024-01-19 浙江大学台州研究院 Image processing system and processing method for intelligently managing welding machine
CN117424988B (en) * 2023-12-15 2024-03-15 浙江大学台州研究院 Image processing system and processing method for intelligently managing welding machine
CN117478891A (en) * 2023-12-28 2024-01-30 辽宁云也智能信息科技有限公司 Intelligent management system for building construction
CN117478891B (en) * 2023-12-28 2024-03-15 辽宁云也智能信息科技有限公司 Intelligent management system for building construction
CN117939044A (en) * 2024-03-22 2024-04-26 广东九安智能科技股份有限公司 Video intelligent storage management system suitable for wireless video monitoring system
CN117939044B (en) * 2024-03-22 2024-06-04 广东九安智能科技股份有限公司 Video intelligent storage management system suitable for wireless video monitoring system

Also Published As

Publication number Publication date
CN111539273A (en) 2020-08-14
LU101981B1 (en) 2021-05-18
CN111539273B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
WO2021208275A1 (en) Traffic video background modelling method and system
CN104392468B (en) Based on the moving target detecting method for improving visual background extraction
CN105069472B (en) A kind of vehicle checking method adaptive based on convolutional neural networks
CN108304798B (en) Street level order event video detection method based on deep learning and motion consistency
US20210118144A1 (en) Image processing method, electronic device, and storage medium
CN112800860B (en) High-speed object scattering detection method and system with coordination of event camera and visual camera
CN104978567B (en) Vehicle checking method based on scene classification
CN110517288A (en) Real-time target detecting and tracking method based on panorama multichannel 4k video image
CN103258332B (en) A kind of detection method of the moving target of resisting illumination variation
CN104050481B (en) Multi-template infrared image real-time pedestrian detection method combining contour feature and gray level
CN105513053B (en) One kind is used for background modeling method in video analysis
CN108416266A (en) A kind of video behavior method for quickly identifying extracting moving target using light stream
CN109685045A (en) A kind of Moving Targets Based on Video Streams tracking and system
CN109919053A (en) A kind of deep learning vehicle parking detection method based on monitor video
CN113762009B (en) Crowd counting method based on multi-scale feature fusion and double-attention mechanism
CN106327525B (en) Cross the border behavior method of real-time for a kind of computer room important place
CN109784216B (en) Vehicle-mounted thermal imaging pedestrian detection Rois extraction method based on probability map
CN106570885A (en) Background modeling method based on brightness and texture fusion threshold value
CN113763427B (en) Multi-target tracking method based on coarse-to-fine shielding processing
CN107315998A (en) Vehicle class division method and system based on lane line
CN109255326A (en) A kind of traffic scene smog intelligent detecting method based on multidimensional information Fusion Features
CN106778540A (en) Parking detection is accurately based on the parking event detecting method of background double layer
CN107230219A (en) A kind of target person in monocular robot is found and follower method
CN110751635A (en) Oral cavity detection method based on interframe difference and HSV color space
Zhu et al. Fast detection of moving object based on improved frame-difference method

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: 20931214

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: 20931214

Country of ref document: EP

Kind code of ref document: A1