Background modeling (ii) VIBE background modeling algorithm __ algorithm

Source: Internet
Author: User

The detailed contents of the vibe algorithm are described in the following two papers of Olivier Barnich:

Vibe:a powerful Random technique to Estimate the Background in Video sequences

VIBE:A Universal background subtraction algorithm for video sequences

Online already has the source code provided by the author, but need to apply, I did not apply. It is not difficult to see the content of the thesis algorithm, the following is my combination of the above two papers on my understanding of the vibe algorithm.

The VIBE algorithm is the abbreviation for "Visual Background Extractor". It is a pixel-level video background modeling algorithm. According to some test data on the Internet, the VIBE algorithm has the following advantages: (1) low memory consumption;

(2) The computation quantity is small, (3) The performance is better than the mixed Gaussian model, (4) The background model can be initialized quickly, (5) The faster ghost region eliminates speed.

See vibe algorithm incredibly have so many advantages, is not a kind of excitement, eager to feel. The first time I heard of this algorithm was exactly this feeling. Needless to say, let us uncover the fog of the vibe algorithm and see where it is.

Vibe Algorithm Analysis:

Aside from vibe, what is the simplest way to extract the foreground object? Yes, the frame difference method. I have not learned the image processing time, I knew to use the video adjacent two frames subtracts the absolute value to obtain the motion target (two frame image subtraction, the background is removed, the remaining natural is the motion target). So what's the difference between vibe? In fact, the vibe essence is the same as the frame difference method: Compare the value of the current pixel with the value of the previous frame to determine if it is a background point. Said a bit around the mouth, the following vibe algorithm principle is divided into three parts: (1) algorithm model initialization, (2) The pixel classification process (Vibe Principle Core), (3) model update strategy. The thesis begins with section (2) and I start with the initialization of the (1) algorithm model.

initialization of the model

Assuming that each frame of the image we are dealing with is m x N pixels, x represents a pixel of a frame image. Model to create a sample set for each pixel in M x N, the sample set of x pixels can be expressed as s (x) ={P1, p2, p3 ... pn}, the size of each sample set is N,n how this value is determined, temporarily without tube, generally is experimental, the thesis takes n=20. So the total size of the sample set is m x N x N. The role of the sample set will be described later. The initialization of the model is to initialize the sample set, which is typically initialized at the first frame of the video. Each pixel has n sets of samples, the method of initializing the sample set is not unique, the most straightforward method is initialized according to the fields of pixel x and pixel x, that is, we randomly assign X's value and several domain values of x to the corresponding n samples of x.

the process of classifying pixels

Initialization is over, and we're about to start my work.: Determines the foreground image for each frame. The frame difference method is actually the image of the previous frame as the background image, the current frame minus the value of a frame is the foreground image, vibe the current frame is the same as the frame difference method, then vibe "background image" is what. Smart you must have thought of, that is, we mentioned above the sample set, we are to be based on the current frame pixel values and the sample set of pixel values to be compared to the current frame of a pixel value is not the foreground image of the pixel value. It sounds pretty complicated, and it boils down to one thing: how to compare.

Assuming the current frame is T-Frame, PT (x) represents the pixel value of the X-pixel of the T-frame image. Borrow a picture from the paper to explain it (the symbols used in the diagram are slightly different from what I used), as shown in Figure 1. The following illustration is based on a pixel analysis of X point. The P1 to P6 in the figure are the values of the X-pixel sample set, and PT (x) is the current pixel value. What is the horizontal C1 and ordinate C2 in the figure? I was puzzled the first time I read the paper. We assume that the image we process each pixel is in RGB format, that is, a pixel value is represented by r,g,b three values, then the coordinates of Figure 1 actually also hides the C3, that is, C1,C2,C3 represents exactly three channel values, if it is a grayscale image, the following diagram will be drawn into one-dimensional line. Next we select a radius r (as shown in Figure 1, R), in the range of the PT (x) value radius r distance (this distance is the Cartesian coordinate distance, coordinates is the RGB channel value) The sample value is P2,P4, the total number of sample values in the radius r range is counted as #, then the figure #=2. When #< #min的值时, the x pixel is marked as the foreground pixel. By processing all the pixels in turn, you can draw the foreground image. Where #min This value is also pre-set, the value given in the paper is 2.

Figure 1

update policy for models

After the above analysis, we must have a question in mind, that is, how the sample value with the new. After the sample value is initialized, it must not be constant, each frame of the image, it is necessary to update it, and what is the new strategy? In fact, not every time with a new sample value, the method in the paper is to adopt a probability method, the specific update strategy: each frame to the current pixel up to update only one sample value, the probability of update is 1/w. If the update is to be updated, then the updated sample value is randomly extracted. Also, in addition to updating the current pixel, there is a 1/w update probability with the new current pixel's neighborhood value, and the new method is the same as the current pixel. This paragraph said some of the abstract, in fact, in addition to updating the current pixel sample values, but also to update the neighborhood of the sample values, but whether the update is a certain probability.

Above is the simple analysis of the vibe algorithm, write a relatively hasty, will be slowly modified later, then there is time, I will upload the algorithm code I wrote, so easy to understand.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.