LU101981B1 - Traffic video background modeling method and system - Google Patents

Traffic video background modeling method and system Download PDF

Info

Publication number
LU101981B1
LU101981B1 LU101981A LU101981A LU101981B1 LU 101981 B1 LU101981 B1 LU 101981B1 LU 101981 A LU101981 A LU 101981A LU 101981 A LU101981 A LU 101981A LU 101981 B1 LU101981 B1 LU 101981B1
Authority
LU
Luxembourg
Prior art keywords
background
image
video
region
foreground
Prior art date
Application number
LU101981A
Other languages
German (de)
Inventor
Yong Qi
Qia Wang
Original Assignee
Univ Nanjing Sci & Tech
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 Univ Nanjing Sci & Tech filed Critical Univ Nanjing Sci & Tech
Application granted granted Critical
Publication of LU101981B1 publication Critical patent/LU101981B1/en

Links

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • 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

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

The present invention discloses a traffic video background modeling method and system. The method comprises the following steps: 1) graying original video frames; 2) extracting a foreground region of adjacent frames by using an inter-frame difference method and determining a background region; 3) determining a pixel value of each position in the background region by using a statistical histogram method; 4) cycling the first three steps in an N-frame video image sequence to reconstruct a background image; and 5) updating the background by using an update strategy of "first out and end in". The system comprises the following modules: a video capture module configured to provide traffic video stream information, a method integration module configured to package a background modeling method, a calculation module configured to execute program functions and process data, a storage module configured to store an application program, source data and processing results, and a display module configured to display input and output image information. The present invention is easy to implement, can be used in an intelligent surveillance system to extract a background image with high cleanliness, and effectively solves the problem of incomplete extraction of traffic backgrounds with slow vehicles.

Description

Description LU101981
TRAFFIC VIDEO BACKGROUND MODELING METHOD AND SYSTEM Field of the Invention The present invention relates to the field of intelligent video analysis technology, and specifically to a traffic video background modeling method and system. Background of the Invention In recent years, rapid development of information technology and sophisticated management of traffic surveillance have jointly ensured the normal operation of road traffic. Video surveillance technology has been researched and applied to a greater and greater extent especially in transportation systems, playing an important role in promoting the development of transportation intelligence. The widespread application of video surveillance technology is accompanied by a large amount of surveillance video data. Background modeling is performed using a video sequence, then a moving target is detected, and subsequent tasks such as vehicle counting, target identification and tracking are undertaken thereby. Therefore, background modeling is a very important research topic in the field of intelligent transportation.
Traffic videos captured by a fixed camera can be used for target vehicle detection. Common methods include an inter-frame difference method, an optical flow method and a background difference method. However, the inter-frame difference method is greatly affected by the speed and the calculation of the optical flow method is relatively complicated, so the methods have obvious defects and hardly meet the requirements of detection systems. 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 referring to a known background. Whether the background difference method can obtain good results depends on whether the background modeling method can extract high-quality background images, which is crucial to the research on the background modeling method.
There is a problem of “bootstrapping” in background modeling. Bootstrapping means pulling up by one's own shoelaces, which is a metaphor for an unrealizable practice. In 1
Description LU101981 background modeling, because there are moving objects such as vehicles and pedestrians at almost every moment in the traffic scene, it is difficult for people to obtain, specially for background training, a “clean” traffic background frame that does not include foreground objects during normal times of each intersection. Accordingly, since foreground targets always appear in the traffic video during background modeling, what needs to be considered first 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, a new and better background modeling solution is needed, in order to solve the problem that the detection of foreground targets is inaccurate because it is difficult to extract the traffic background from an urban road traffic video. Summary of the Invention The objective of the present invention is to provide a traffic video background modeling method and system, to solve the problem that the detection of foreground targets is inaccurate because it is difficult to extract the traffic background from an urban road traffic video.
The technical solution to achieve the objective of the present invention is as follows: A traffic video background modeling method includes the following steps: step 1: graying original video image frames; step 2: extracting a foreground region of adjacent frames by using an inter-frame difference method and determining a background region; step 3: determining a pixel value of each position in the background region by using a statistical histogram method; step 4: cycling the first three steps in an N-frame video image sequence to reconstruct a background image; and step 5: updating the background by using an update strategy of “first out and end in”.
Further, the step 1 of graying original video image frames is as follows: assuming the RGB composition of a coordinate {x.v} pixel to be (R, G, B), assigning weights to all color 2
Description LU101981 channels, weighting and summing, and then obtaining a gray value V from equation D, wherein the value range of each color channel is [0, 255], so the value range of the gray value V is also [0, 255] F = 0.308 + 0.596 + 0,115 D.
Further, step 2 includes the following sub-steps: step 2.1: for a video frame image sequence F; , #7, , Fy, sequentially differencing every two adjacent images by using an inter-frame difference method to distinguish a background region and a foreground region in each frame of image except the first frame, assuming F,—+ and F, to be two adjacent frames of video images {3 < X = N}, and calculating the difference according to the gray values to obtain a difference image D by equation @ Die as ag) = Planet” Pietro @ step 2.2: selecting an appropriate threshold T for binarizing the difference image D to obtain a binarized image B by equation (3), wherein the point having a gray value of 255 is a background point, and the point having a gray value of 0 is a moving point, i.e., a foreground point (255, if De-vntn ET SL Tig ; Ff Bogota CT ® step 2.3: extracting a video foreground target according to the threshold T, performing an opening operation and a closing operation on the extracted foreground image by using morphology, and performing multiple combined operations of expansion and erosion to reduce the influence of noise, so that the overall contour of a foreground moving target is clearer; and step 2.4: for each foreground moving target region, calculating its enclosing rectangle as a detection box to mark a foreground region M, wherein once the foreground region M is extracted, the background region B is also determined accordingly.
Further, step 3 includes the following sub-steps: 3
Description LU101981 step 3.1: marking all the foreground regions M as -1 to distinguish the gray values in the interval of [0, 255]; step 3.2: establishing a corresponding gray histogram that is not related to the foreground but related to the background for each position {x,¥} in the background region B, counting the occurrence frequency of the gray value of each pixel, and selecting the pixel value p with the most occurrences as the pixel value of the background image at the same coordinate position {x,w), wherein the selection strategy of the pixel value is represented by equation © A { May} = Life yin NM, @ PE ta v= M ax{Hist, y plex vie B, where Hist, {p]= K{x.v.p) + +.if Fay) =r.pe [0,255 © where in equation ©, Æ{x,v.p} represents the number of occurrences when the gray value of a pixel at the image ix.¥} is », A, 1x 5} =p represents that the pixel value of the image #, at {x.¥} is », and Mist, represents a histogram using the gray value © of the pixel as a statistical basis at the coordinates {x, +} and step 3.3: after the pixel value is selected, the foreground region and the background region together forming a background image Bg to be optimized.
Further, in the iterative process of step 4 within N frames, as N increases, the background positions in the video sequence that are always covered by foreground targets gradually decrease; once a new background region is detected out by the inter-frame difference, this part of region contained in the foreground region is updated as the background region, then a new statistical histogram is formed until all regions are updated, and a complete and neat background image is finally obtained.
Further, step 5 includes the following sub-steps: step 5.1: in the corresponding time of N frames, selecting a larger value for N only in the first background modeling in order to ensure the integrity of the initial background image 4
Description LU101981 because there is a high probability that part of the background is always covered by the foreground targets, resulting in a “black hole” region in the background; step 5.2: taking the N-frame gray image sequence as a &ateh, calling the first N frames of images {F,, F2; m, Fy} as &atehy, obtaining a gray histogram Hist, of each pixel position {x.v) by statistics on its corresponding gray value sequence Posguenceizad = Ray Fix. y}, … Fy (x, 23, and finally obtaining a background image Egy; step 5.3: when the (N+1)® frame of image is received in the method, inserting Fy, into batok,, removing F therefrom to obtain batch: {F,, F4. … Fr 411, the gray value sequence corresponding to the gray histogram Hist, being Pasquenesixat = Fores Fataate om Fr wi {x,3}}, and finally obtaining a background image Bag; step 5.4: outputting Bg, if Eg. does not have a “black hole” region; otherwise, taking Bg, as an optimization reference object, filling the gray value of Bg; at the corresponding position in the “black hole” region to Fg. to obtain a complete background image; and step 5.5: if the video stream does not end, continuing to generate new background images according to steps 5.3 and 5.4 until the end of the video stream.
The traffic video background modeling method of the present invention integrates the advantages of an inter-frame difference method and a statistical histogram method, and overcomes the problem that the detection of foreground targets is inaccurate because it is difficult to directly extract a background from a traffic video. The characteristics of a rough region of moving targets are first detected by using the inter-frame difference method to remove a moving region, gray value statistics and selection are then performed on the background image by using the statistical histogram method, a high-quality background
Description LU101981 image is finally obtained after multiple optimizations and reconstructions, and the background is updated in real time.
A traffic video background modeling system includes a video capture module configured to provide continuous traffic video stream information, a method integration module configured to package a background modeling method, a calculation module configured to execute program functions and process data, a storage module configured to store an application program, source data and processing results, and a display module configured to display input and output image information.
Further, the video capture module captures a real-time traffic video stream at a vertical viewing angle of 90° by using a camera fixed on a traffic surveillance pole, a built-in graphics processing unit of the camera processes the captured still images and video image data, and the processed data stream 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 of the traffic video background modeling method with an interface reserved to form a black box, and its input is image data in a 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 configured to store the software program of the background modeling method, the source image data transmitted by the video capture module, and the background image results processed by the calculation module; Further, the display module is used as an image presentation carrier to display input video image information and output background image information.
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 series and space, and therefore has higher accuracy; 2) the present invention integrates the advantages of classical methods, and the calculation method is simple and easy to implement, and has good real-time performance; 3) the present invention can accurately capture every 6
Description LU101981 background point, realizes background modeling in as few frames as possible, and has a relatively fast speed; and 4) the present invention still has higher integrity under the traffic scene with slow vehicles. Brief Description of the Drawings 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.
FIG. 3 is a comparison diagram of background modeling processes of the present invention and some existing methods under a simulated video.
FIG. 4 is a comparison diagram of integrity change curves of background modeling in the present invention and some existing methods.
FIG. 5 is a comparison diagram of background modeling processes of the present invention and some existing methods under a real video. Detailed Description of the Embodiments In order to understand the objectives, technical solutions and advantages of the present invention more clearly, the content of the present invention will be further described with reference to the accompanying drawings. The specific embodiments described herein are merely used for interpreting the present invention, rather than limiting the present invention.
Embodiments FIG. 1 is a flowchart of a traffic video background modeling method according to an embodiment of the present invention. As shown in FIG. 1, after a video stream is imported, the method steps are as follows: (1) Original video image frames are grayed to reduce the complexity of the method and increase the calculation speed. The specific operation is as follows: The RGB composition of a coordinate {z.v} pixel is assumed to be (R, G, B), all color 7
Description LU101981 channels are assigned with weights, weighted and summed, and then a gray value V is obtained from equation (D. The value range of each color channel is [0, 255], so the value range of the gray value V is also [0, 255].
F = 0308 + 0.596 + 0.115 D The grayed video frame image sequence is denoted as F,.F,. …, F, € IY, N is the total number of frames in the image sequence, # and represent the sizes of each frame of image, i.e., # represents the height of the image, and represents the width of the image. A gray image having a size identical to that of a video frame and having a pixel value of 0 is created as an initial background model for subsequent optimization and update.
(2) An approximate moving region of each frame in the video is extracted as a foreground region by using an inter-frame difference method through the operations of image difference, binarization, mathematical morphological filtering, connectivity analysis, etc., and a background region is determined. The specific operation is as follows: The inter-frame difference method can capture the changes in gray values of two adjacent frames, and define the natures of regions according to the changes. The region composed of points with large gray value changes is denoted as a foreground region 3, and the region composed of points with small gray value changes is denoted as a background region &. Since M is obtained from the difference between the current frame and the previous frame, the part of motion change of the previous frame remains on Af, which causes the detection box to not completely match the actual moving object, and to be slightly larger than the region where the moving object is located. Moreover, the method of the present invention updates & and Æ in the process of continuous iterations to obtain complete background images. Thus, # and £ are not constant, but have a fluctuant relationship.
For the video frame image sequence #,,F;;…,#y, every two adjacent images are sequentially differenced using the inter-frame difference method to distinguish a background 8
Description LU101981 region and a foreground region in each frame of image except the first frame. F,_, and F, are assumed to be two adjacent frames of video images {2 = X < N}, and the difference is calculated according to the gray values to obtain a difference image D by equation 2).
An appropriate threshold T is selected for binarizing the difference image D to obtain a binarized image B by equation ©. The point having a gray value of 255 is a background point, and the point having a gray value of 0 is a moving point, i.e., a foreground point.
Be 243 Ÿ Deen ET © RATS AO, EP Degré = 7 A video foreground target is extracted according to the threshold T, an opening operation and a closing operation are performed on the extracted foreground image by using morphology, and multiple combined operations of expansion and erosion are performed to reduce the influence of noise, so that the overall contour of a foreground moving target is clearer.
For each foreground moving target region, its enclosing rectangle is calculated, and the enclosing rectangle is used as a detection box to mark a foreground region M. Once the foreground region M is extracted, the background region B is also determined accordingly.
(3) The foreground region is marked using a statistical histogram method, a gray value distribution of the image in the background region is obtained, the pixel value of each position in the background region is determined, and the background image is estimated. The specific operation is as follows: All the foreground regions M are marked as -1 to distinguish the gray values in the interval of [0, 255].
A corresponding gray histogram that is not related to the foreground but related to the background is established for each position &x.v} in the background region B, the occurrence frequency of the gray value of each pixel is counted, and the pixel value p with the most occurrences is selected as the pixel value of the background image at the same 9
Description LU101981 coordinate position {x,¥ 1. The selection strategy of the pixel value is represented by equation @.
{ Molar = —1, 4F{x.v} in M, @ CE LB, {x, y} = Max {FF St er fol À éfix, vin 5, Where Hist, fp]= K(x vp} ++. Fay} = n.pe [0255] ® In equation ©, Æ{x,w,r} represents the number of occurrences when the gray value of a pixel at the image {x,v} is @, fi{x.¥} = 5 represents that the pixel value of the image Fp at {x.y} is p, and Fist, represents a histogram using the gray value p of the pixel as a statistical basis at the coordinates {x, #. In equation ©, B,{x,v} uses the pixel value of the pixel (x, y) with the maximum frequency on the N-frame gray-scale video image sequence as a background gray value of the pixel, and the foreground region is marked with -1 in My {x,y} for subsequent update.
After the pixel value is selected, the foreground region and the background region together form a background image Bg to be optimized.
(4) Steps 1, 2, and 3 are cycled in the N-frame video image sequence, the foreground regions are substituted into background regions frame by frame, and a complete and neat background image is finally obtained. The specific operation is as follows: In the iterative process within N frames, as N increases, the background positions in the video sequence that are always covered by foreground targets gradually decrease. Once a new background region is detected out by the inter-frame difference, this part of region contained in the foreground region is updated as the background region, then a new statistical histogram is formed until all regions are updated, and a complete and neat background image is finally obtained.
(5) The integrity of the latest frame of background image is analyzed by using an update strategy of “first out and end in”, and optimization is performed based on the last frame of background image. The specific operation is as follows:
Description LU101981 In the corresponding time of N frames, there is a high probability that part of the background is always covered by the foreground targets, resulting in a “black hole” region in the background. In order to ensure the integrity of the initial background image, a larger value is selected for N only in the first background modeling.
The N-frame gray image sequence is taken as a Satch, and the first N frames of images {FF on Fy} are called &atch,. The gray histogram Hist, of each pixel position {x, xy} is obtained by statistics on its corresponding gray value sequence Proquencelaat 7 iF (a, vi Fifa, vin. Fy (vd), and the background image finally obtained is Bg.
In the method, when the (N+1)® frame of image is received, Fy, is inserted into Batck,, F, is removed to obtain batoh,: {F,. F3. Fragt, the gray value sequence corresponding to the gray histogram Hist, is Posquencerat = Fate Fafagds oo Frau (2:31 and the background image finally obtained is Eg.
If &g, does not have a “black hole” region, it is output; otherwise, taking Eg, as an optimization reference object, the gray value of #34 at the corresponding position in the “black hole” region is filled to Hg, to obtain a complete background image.
And so on, until the end of the video stream.
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, a video capture module is configured to provide continuous traffic video stream information, a method integration module is configured to package a background modeling method, a calculation module is configured to execute program functions and process data, a storage module is configured to store an application program, source data and processing results, and 11
Description LU101981 a display module is configured to display input and output image information.
As shown in FIG. 2, the video capture module captures a real-time traffic video stream at a vertical viewing angle of 90° by using a camera fixed on a traffic surveillance pole, a built-in graphics processing unit of the camera processes the captured still images and video image data, and the processed data stream 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 of the traffic video background modeling method with an interface reserved to form a black box, and its input is image data in a correct format; As a core calculation 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 configured to store the software program of the background modeling method, the source image data transmitted by the video capture module, and the background image results 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 present invention integrates the advantages of the inter-frame difference method and the statistical histogram method, packages the method into a module, is supported by an intelligent surveillance system, and therefore, can overcome the problem that the detection of foreground targets is inaccurate because it is difficult to directly extract a background from a traffic video. This solution specifically innovates in that the present invention integrates the advantages of classic methods, the calculation method is simple and easy to implement, the inter-frame difference method effectively utilizes the dynamics of pixels in time series and space, and the statistical histogram method effectively estimates pixel values, so the present invention has 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 background images having higher similarity matching with the real background.
12
Description LU101981 In order to verify that the method of the present invention has better effects than the existing technologies, a simulated traffic video and a real traffic video are used for joint verification. The simulated traffic video is used to verify the reliability of theories and principles of the method, and the real traffic video is used to verify the effectiveness of practical applications of the method.
FIG. 3 is a comparison diagram of background modeling processes of the present invention and some existing methods under a simulated video. The resolution of the simulated traffic video is 590x350 pixels, an urban road as the background is denoted as 85,» and a moving vehicle as the foreground is denoted as Fg... IN order to solve the problem that the existing background modeling method does not work well when the vehicle is driven slowly, the vehicle is defined to travel right at a speed of 2-4 pixels per frame. In this typical scene, the performance advantages and disadvantages of a multi-frame image averaging method, a statistical histogram method, a mixed Gaussian background modeling method and the method of the present invention are compared.
As shown in FIG. 3, line a shows simulated video sequence frames, line b shows a background modeling process of the multi-frame image averaging method, line c shows a background modeling process of the statistical histogram method, line d shows a background modeling process of the mixed Gaussian background modeling method, and line e shows a background modeling process of the method of the present invention. Affected by the slow motion of a vehicle, part of the background is blocked by the vehicle for a long time. Background images extracted by the multi-frame image averaging method are uneven in pixel distribution and have obvious traces of distortion. The statistical histogram method can finally extract a background image that is closer to the actual background, but still some noise remains, and the performance of this method is still not ideal in a complex scene environment. The mixed Gaussian background modeling method uses multiple Gaussian distributions to describe the color presentation law of each pixel, which has high time complexity and will introduce noise. The method of the present invention can extract the most complete and clearest background image at the 47% frame. Compared with the other three methods, the 13
Description LU101981 method of the present invention can still maintain good performance even in a scene of slow vehicle motion.
FIG. 4 is a comparison diagram of integrity change curves of background modeling in 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 Hg and the real background image Hg true at the pixel level. To facilitate comparison, the following equation is defined: \ . Ez vd {{BynFs dr) NEPOR = LEN TRE NBFOR Ea Fæsrue © NBFOR (Non-Background pixels to Foreground Objection pixels Ratio) refers to the ratio of pixels having different pixel values in 8g and Bg... to pixels in the foreground image Fg...» and a smaller NBFOR value indicates fewer unreal background pixels remaining in #g, which means higher integrity.
FIG. 4 shows integrity change processes of background extraction of various methods in an entire simulated video. X axis represents the video frame number, and 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 integrity by using fewer frames.
FIG. 5 is a comparison diagram of background modeling processes of the present invention and some existing methods under a real video. Data is acquired from a UA-DETRAC dataset, which has a resolution of 960x540 pixels per frame at 25 frames per second. In a real traffic scene, the performance advantages and disadvantages of a multi-frame image averaging method, a statistical histogram method, a mixed Gaussian background modeling method and the method of the present invention are compared.
As shown in FIG. 5, line a shows real video sequence frames, line b shows a background modeling process of the multi-frame image averaging method, line c shows a background modeling process of the statistical histogram method, line d shows a background modeling process of the mixed Gaussian background modeling method, and line e shows a background 14
Description LU101981 modeling process of the method of the present invention. The method of the present invention can obtain a complete background image when N is 15, uses fewer frames, and is faster in time and higher in integrity than other methods.
The embodiments described above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. The terms and symbols used above are intended to best explain the principles and processes of each embodiment, so that other skilled in the art can understand the embodiments described herein. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the design spirit of the present invention shall fall into the protection scope determined by the claims of the present invention.

Claims (8)

Claims LU101981
1. A traffic video background modeling method, comprising the following steps: step 1: graying original video image frames; step 2: extracting a foreground region of adjacent frames by using an inter-frame difference method and determining a background region; step 3: determining a pixel value of each position in the background region by using a statistical histogram method; step 4: cycling the first three steps in an N-frame video image sequence to reconstruct a background image; and step 5: updating the background by using an update strategy of “first out and end in”.
2. The traffic video background modeling method according to claim 1, wherein the step 1 of graying original video image frames is as follows: assuming the RGB composition of a coordinate {x,¥} pixel to be (R, G, B), assigning weights to all color channels, weighting and summing, and then obtaining a gray value V from equation (D, wherein the value range of each color channel is [0, 255], so the value range of the gray value V is also [0, 255] F = 0,308 + 0596 + 0.118 D.
3. The traffic video background modeling method according to claim 1, wherein step 2 comprises the following sub-steps: step 2.1: for a video frame image sequence fj, &%, «..Fy (N is the total number of frames of a video stream), sequentially differencing every two adjacent images by using an inter-frame difference method, assuming F;-, and F, to be two adjacent frames of video images {2 = K = N}, and calculating the difference according to the gray values to obtain a difference image D by equation @ EN @ step 2.2: selecting a threshold T for binarizing the difference image D to obtain a binarized image B by equation (3), wherein the point having a gray value of 255 is a background point, and the point having a gray value of 0 is a moving point, i.e., a foreground 16
Claims LU101981 point {255, if Die Mae ST ® anna = to, EF Diana) ST step 2.3: extracting a video foreground target according to the threshold T, performing an opening operation and a closing operation on the extracted foreground image by using morphology, and performing multiple combined operations of expansion and erosion to reduce the influence of noise, so that the overall contour of a foreground moving target is clearer; and step 2.4: for each foreground moving target region, calculating its enclosing rectangle as a detection box to mark a foreground region M, wherein if the foreground region M is extracted, the non-M region is the background region B.
4. The traffic video background modeling method according to claim 1, wherein step 3 comprises the following sub-steps: step 3.1: marking all the foreground regions M as -1 to distinguish the gray values in the interval of [0, 255]; step 3.2: establishing a corresponding gray histogram that is not related to the foreground but related to the background for each position {x,¥} in the background region B, counting the occurrence frequency of the gray value of each pixel, and selecting the pixel value p with the most occurrences as the pixel value of the background image at the same coordinate position {x,¥), wherein the selection strategy of the pixel value is represented by equation @ { M {x.y} = Lx, vin dM, Fg =+1_ + Seer FON ee + © - ® (5, [= pi = Mox\Hist | 5} LE {x,y}in Be where Hist, ufr} = KU ++i Far) =p pe [0255] © where in equation ©), Æ{x,w.p} represents the number of occurrences when the gray value of a pixel at the image {,¥} is p, f(x, y} =p represents that the pixel value of the image f, at {x.v} is ©, and Fist, represents a histogram using the gray value # of the 17
Claims LU101981 pixel as a statistical basis at the coordinates {x, w}; and step 3.3: after the pixel value is selected, the foreground region and the background region together forming a background image Bg to be optimized.
5. The traffic video background modeling method according to claim 1, wherein in the iterative process of step 4 within N frames, as N increases, the background positions in the video sequence that are always covered by foreground targets gradually decrease; once a new background region is detected out by the inter-frame difference, this part of region contained in the foreground region is updated as the background region, then a new statistical histogram is formed until all regions are updated, and a complete and neat background image is finally obtained.
6. The traffic video background modeling method according to claim 1, wherein step 5 comprises the following sub-steps: step 5.1: in the corresponding time of N frames, selecting N from a value range of 20 to in the first background modeling, or selecting N from a value range of 10 to 15 in non-first background modeling; step 5.2: taking the N-frame gray image sequence as a #atch, calling the first N frames of images {F,. Fa, Aut as datehy, obtaining a gray histogram H ist, ,. of each pixel position {x.y} by statistics on its corresponding gray value sequence Prsquencetmyt = th Levi Fa 0e vk Fy (=, 53}, and finally obtaining a background image Bg, of aregion without “black holes”; step 5.3: when the (N+1)" frame of image is received in the traffic video background modeling method, inserting Fy+; into &eaich, , removing A, therefrom to obtain Satcha {Fan Frs vo: Fg 543, the gray value sequence corresponding to the gray histogram Hist, being Prequencetest 7 (FageatFs (gd es Fy fev) , and finally obtaining a background image Sg; 18
Claims LU101981 step 5.4: outputting Bg, if Eg. does not have a “black hole” region; otherwise, taking Bgs as an optimization reference object, filling the gray value of &g, at the corresponding position in the “black hole” region to Eg. to obtain a complete background image; and step 5.5: if the video stream does not end, continuing to generate new background images by returning to steps 5.3 and 5.4 until the end of the video stream.
7. A traffic video background modeling system, comprising the following modules: a video capture module configured to provide continuous traffic video stream information, a method integration module configured to package a background modeling method, a calculation module configured to execute program functions and process data, a storage module configured to store an application program, source data and processing results, and a display module configured to display a generated background image.
8. The traffic video background modeling system according to claim 7, wherein the video capture module captures a real-time traffic video stream at a vertical viewing angle of 90° by using a camera fixed on a traffic surveillance pole, a built-in graphics processing unit of the camera processes the captured still images and video image data, and the processed data stream 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 configured to package a traffic video background modeling method with an interface reserved to form a black box, and its input is image data in a correct format; the calculation module implements program calculation and data processing by executing a software program stored in the storage module and calling the image data stored in the storage module; the storage module is configured to store a software program of the traffic video background modeling method, source image data transmitted by the video capture module, and background image results processed by the calculation module; and the display module functions as an image presentation carrier to display input video image information and output background image information.
19
LU101981A 2020-04-12 2020-07-13 Traffic video background modeling method and system LU101981B1 (en)

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
LU101981B1 true LU101981B1 (en) 2021-05-18

Family

ID=71977076

Family Applications (1)

Application Number Title Priority Date Filing Date
LU101981A LU101981B1 (en) 2020-04-12 2020-07-13 Traffic video background modeling method and system

Country Status (3)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643323A (en) * 2021-08-20 2021-11-12 中国矿业大学 Target detection system under dust and fog environment of urban underground comprehensive pipe gallery

Families Citing this family (18)

* 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
CN113596573B (en) * 2021-07-28 2023-04-11 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113807227B (en) * 2021-09-11 2023-07-25 浙江浙能嘉华发电有限公司 Safety monitoring method, device, equipment and storage medium based on image recognition
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
CN115019030B (en) * 2022-03-05 2024-04-09 中国电波传播研究所(中国电子科技集团公司第二十二研究所) Visual detection and identification method for abnormal drilling line flow
CN114951017B (en) * 2022-05-12 2023-05-30 深圳市顺鑫昌文化股份有限公司 Label printing online intelligent detection error-reporting system
CN114863109B (en) * 2022-05-25 2023-05-23 广东飞达交通工程有限公司 Fine recognition method for various targets and elements of traffic scene based on segmentation technology
CN115019508B (en) * 2022-06-13 2023-09-29 华南理工大学 Road monitoring traffic flow simulation method, device, equipment and medium based on machine learning
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
CN115618051B (en) * 2022-12-20 2023-03-21 楠楠聚智信息科技有限责任公司 Internet-based smart campus monitoring video storage method
CN116503388B (en) * 2023-06-25 2023-11-14 广东利元亨智能装备股份有限公司 Defect detection method, device and storage medium
CN117424988B (en) * 2023-12-15 2024-03-15 浙江大学台州研究院 Image processing system and processing method for intelligently managing welding machine
CN117478891B (en) * 2023-12-28 2024-03-15 辽宁云也智能信息科技有限公司 Intelligent management system for building construction
CN117939044B (en) * 2024-03-22 2024-06-04 广东九安智能科技股份有限公司 Video intelligent storage management system suitable for wireless video monitoring system

Family Cites Families (7)

* 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
US9275294B2 (en) * 2011-11-03 2016-03-01 Siemens Aktiengesellschaft Compressed sensing using regional sparsity
CN102609689B (en) * 2012-02-03 2016-12-28 江苏科海智能***有限公司 A kind of video track background modeling method based on multiframe statistics
CN104978722A (en) * 2015-07-06 2015-10-14 天津大学 Multi-exposure image fusion ghosting removing method based on background modeling
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
CN107194949B (en) * 2017-05-18 2019-09-24 华中科技大学 A kind of interactive video dividing method and system matched based on block and enhance Onecut

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643323A (en) * 2021-08-20 2021-11-12 中国矿业大学 Target detection system under dust and fog environment of urban underground comprehensive pipe gallery
CN113643323B (en) * 2021-08-20 2023-10-03 中国矿业大学 Target detection system under urban underground comprehensive pipe rack dust fog environment

Also Published As

Publication number Publication date
CN111539273A (en) 2020-08-14
CN111539273B (en) 2023-05-16
WO2021208275A1 (en) 2021-10-21

Similar Documents

Publication Publication Date Title
LU101981B1 (en) Traffic video background modeling method and system
CN104392468B (en) Based on the moving target detecting method for improving visual background extraction
CN101371274B (en) Edge comparison in video sequence partition
CN103295016B (en) Behavior recognition method based on depth and RGB information and multi-scale and multidirectional rank and level characteristics
CN105513053B (en) One kind is used for background modeling method in video analysis
CN107346547B (en) Monocular platform-based real-time foreground extraction method and device
CN111161313B (en) Multi-target tracking method and device in video stream
CN110827312B (en) Learning method based on cooperative visual attention neural network
CN107403451B (en) Self-adaptive binary characteristic monocular vision odometer method, computer and robot
EP2813973A1 (en) Method and system for processing video image
CN106570885A (en) Background modeling method based on brightness and texture fusion threshold value
CN106327525A (en) Machine room important place border-crossing behavior real-time monitoring method
CN111798470A (en) Crop image entity segmentation method and system applied to intelligent agriculture
CN113763427A (en) Multi-target tracking method based on coarse-fine shielding processing
Hedayati et al. Real-time background subtraction for video surveillance: From research to reality
CN109978916A (en) Vibe moving target detecting method based on gray level image characteristic matching
CN110322479B (en) Dual-core KCF target tracking method based on space-time significance
CN117459661A (en) Video processing method, device, equipment and machine-readable storage medium
CN111738964A (en) Image data enhancement method based on modeling
CN111832508A (en) DIE _ GA-based low-illumination target detection method
CN105208402A (en) Video frame complexity measurement method based on moving object and image analysis
CN113609980A (en) Lane line sensing method and device for automatic driving vehicle
CN113205028A (en) Pedestrian detection method and system based on improved YOLOv3 model
CN111860261A (en) Passenger flow value statistical method, device, equipment and medium
CN104732558A (en) Moving object detection device

Legal Events

Date Code Title Description
FG Patent granted

Effective date: 20210518