Background Modeling or Foreground Detection (Background Generation And Foreground Detection) ViBe Algorithm

ViBe算法:ViBe - a powerful technique for background detection and subtraction in video sequences

Algorithm official website: http://www2.ulg.ac.be/telecom/research/vibe/

describe:

ViBe is a pixel-level video background modeling or foreground detection algorithm, which is better than several well-known algorithms and occupies less hardware memory.

 

Code:

The algorithm execution efficiency test program, programs and c/c++ files under windows and linux operating systems can be downloaded from the author's official website, as follows:

 



Windows and Linux users: a benchmarking program to evaluate the time needed by ViBe on your platform and on your own sequences! Download an archive zip archive [15 MB] to evaluate the time needed by ViBe on your platform (Windows or Linux [Wine]), and on your own sequences. A program for Windows and Linux. Download an archive zip archive [16 MB] to use ViBe on Windows (or under Wine in Linux).
The program allows you to: (1) save the result for your own images, (2) change the few parameters of ViBe to experiment with, and (3) reproduce our results. Linux: link a C/C++ object file to your own code. We provide the object (compiled) code of ViBe for non-commercial applications. Under Linux, download the32 bits zip file, or the 64 bits zip file. Details on this page.

 

 

Of course, when using the ViBe algorithm, you should follow the license on the algorithm's official website.

The main advantages of the algorithm:

Less memory occupation, one pixel needs to be compared once, occupying one byte of memory;

no parameter method;

It can be directly applied in the product, with good software and hardware compatibility;

Outperforms mixed Gaussian, parametric methods, SACON, etc.;

Pixel-level algorithm, the key step of preprocessing in video processing;

The background model is initialized in time;

Has good noise immunity.

 

references:

 

 

 

Performance

  • An independant evaluation is available in S. Brutzer, B. Hoferlin, and G. Heidemann. Evaluation of background subtraction techniques for video surveillance. In IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), pages 1937-1944, Colorado Spring, USA, June 2011. 
    In their conclusions, they claim: "Considering these aspects, Barnich is a strong favorite, since it is simple and almost parameterless."

 

 

The challenges faced by the background difference method to realize moving object detection are: it must adapt to changes in the environment (such as changes in illumination caused by changes in image chromaticity); camera shake causes picture shake (such as movement when holding a camera to take pictures); dense in the image Appearing objects (such as densely occurring objects such as leaves or tree trunks, must be correctly detected); must be able to correctly detect changes in background objects (for example, a newly stopped car must be classified as a background object in time, and there is a static start Moving objects also need to be detected in time). Ghost area often appears in object detection. Ghost area means that when an originally stationary object starts to move, the back static difference detection algorithm may incorrectly detect the area originally covered by the object as moving, and this area becomes Ghost, of course, the original moving object becomes stationary will also introduce the Ghost area, the Ghost area must be eliminated as soon as possible in the detection. An example of a Ghost area is shown in Fig. 1. In the figure, it can be found that compared with the original image, there are two more human shapes in the detection result, which is Ghost.

Fig 1

Detailed explanation of ViBe algorithm:

 

ViBe detection method

         ViBe is a detection method proposed in this paper, which has many differences and advantages compared to other methods. The specific idea is to store a sample set for each pixel, the sample value in the sample set is the pixel value of the pixel in the past and the pixel value of its neighbors, and then compare each new pixel value with the sample set to judge Whether it belongs to the background point. The model mainly includes three aspects: the working principle of the model; the initialization method of the model; the update strategy of the model.

How the model works

Background objects are stationary or very slowly moving objects, while foreground objects correspond to moving objects. So we can see object detection as a classification problem, that is, to determine whether a pixel belongs to a background point. In the ViBe model, the background model stores a sample set for each background point, and then compares each new pixel value with the sample set to determine whether it belongs to the background point. It can be known that if a new observation belongs to the background point, it should be relatively close to the sampled value in the sample set.

Specifically, we denote v(x): the pixel value at point x; M(x)={V1, V2,...VN} is the background sample set at x (the sample set size is N); SR(v( x)): an area with a radius centered at x, if M(x) [{SR(v(x))∩ {v1,v2, . . . , vN}}] is greater than a given threshold #min , then it is considered that the x point belongs to the background point.

Model initialization method

Initialization is the process of building a background model. The initialization of the general detection algorithm requires a video sequence of a certain length to complete, which usually takes several seconds. This huge real-time detection of movies is not suitable for real-time photography with a handheld camera. The initialization of ViBe can be completed with only one frame of image. ViBe initialization is the process of filling the sample set of pixels, but since it is impossible to include the spatiotemporal distribution information of pixels in one frame of image, we make use of the similar spatiotemporal distribution characteristics of similar pixels, specifically: for a pixel, Randomly select the pixel value of its neighbor point as its model sample value. M0(x) = {v0(y | y ∈NG(x))}, t=0 At the initial moment, NG(x) is the neighbor point. The advantage of this initialization method is that it is more sensitive to noise, has a small amount of calculation, and can quickly detect moving objects. The disadvantage is that it is easy to introduce ghost areas.

Model update strategy

The update of the background model is to enable the background model to adapt to the continuous changes of the background, such as changes in lighting, changes in background objects, and so on. Conservative update strategy: Foreground points will never be used to fill the background model, which can cause deadlock. For example, if a static area is incorrectly detected as moving during initialization, it will always be treated as a motion under this strategy. Moving objects are treated; Blind strategy: not sensitive to deadlock, the foreground and background can be used to update the background model, the disadvantage is that slow moving objects will be integrated into the background and cannot be detected. The update strategy adopted in this method is conservative update strategy + foreground point counting method. Foreground point count: Count the pixels, if a pixel is detected as the foreground for N consecutive times, it will be updated as the background point.

Random subsampling: it is not necessary to update the sample value of each pixel in the background model in each new video frame, when a pixel is classified as a background point, it has a probability of 1/ φ to update the background model.

The specific update method: each background point has a probability of 1/φ to update its own model sample value, and also has a probability of 1/φ to update the model sample value of its neighbors. Updating the sample values ​​of neighbors takes advantage of the spatial propagation characteristics of pixel values, and the background model gradually spreads out, which is also conducive to faster identification of ghost regions. At the same time, when the current scenic spot count reaches a critical value, it will become the background, and there is a probability of 1/φ to update its own model sample value.

When selecting the sample value in the sample set to be replaced, we randomly select a sample value to update, which can ensure the smooth life cycle of the sample value. Because it is a random update, the probability that such a sample value will not be updated at time t is (N-1)/N, assuming that the time is continuous, then the probability that the sample value is still retained after the time of dt has passed is

can also write, 

 

This indicates that whether or not a sample value is replaced in the model is independent of time t and that a random strategy is appropriate.

ViBe experimental results

         In the experiment, we compared with some other detection algorithms in terms of detection accuracy and calculation amount of the algorithm. The experiment shows that the detection effect of our method is obviously much better, and the effect of illumination changes and camera shake is very stable. , and the computational complexity is very small and the memory footprint is small, which makes the method suitable for embedding in hand-held cameras. Some specific experimental results and data are as follows

Fig.2 Comparison of detection effects

 

Fig.3 Movement of the camera

 

Fig.4 Ghost area ablation, bright floor in the picture

  

 

                                           Fig.5 Detection accuracy rate Fig.6 Algorithm processing speed

Summarize

In this paper, we propose a new back-static error algorithm - ViBe, which has three differences compared to the previous ones. First, we propose a new classification model. Secondly, we introduce how to initialize ViBe. It only needs one frame of image to complete the initialization, while other algorithms usually need to wait for several seconds to complete the initialization, which requires high real-time requirements embedded in the camera and some relatively short videos. Sequences are helpful. Finally, we propose our own update strategy. Compared with other algorithms that save the sample value in the model for a fixed time, we use random replacement to update the sample value, which has been proven to ensure an exponentially decaying smooth life of the sample value. period, and the background model can be well adapted to the changes of the video scene, so as to achieve a better detection effect.

A series of experiments show that compared with other detection algorithms, the ViBe method has the characteristics of less computation, less memory usage, faster processing speed, better detection effect, faster Ghost region ablation speed and stable and reliable response to noise, and it is very It is suitable for embedded cameras and other situations that require low computational cost and low memory footprint.

Effect picture:

 

Corresponding code download address:

http://pan.baidu.com/share/link?shareid=409860&uk=3373051938

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325525892&siteId=291194637