Documente Academic
Documente Profesional
Documente Cultură
Guassian Mixture Model for Foreground Segmentation ViBe: A Universal Background Subtraction Algorithm
Problem Statement
At each sample time t, estimate the most likely state k (Background or Foreground) from a set of observations sampled from pixel values X which are samples of some random variable X. The pixel value process X is modelled by a mixture of K guassian densities with parameter set (k)
is the total parameter set = * P(k1),. P(kn), 1,2,.n} Where P(k) = w(k) is probability of each state and (k) = {(k),(k)}
Bayess Theorem: Probability of Current state given Current Pixel Sample and Parameter Set. The State k which maximizes P(k|X,) is called Match in, it is the Maximum A Posteriori Estimate k = argmax(k) w(k) f X|k(X|k,(k))
The procedure of demarcation of background and foreground starts with the relation : w(k)/(k) is proportional to w(k)f X|k Where w(k) is the probability of occurrence of state k, which will be greater for Background states and (k) will be lower as Background does not vary much. The first B of ranked states whose accumulated Probability is greater than T are deemed as background
Segmentation of Foreground
These Equations assume stationary processes k and X and a fixed number of observations N.
Practical Algorithm
Instead of calculating
Stauffer and Grimson Algorithm defines a pixel match with the background if the pixel lies between = 2.5 of the mean of one of Guassian distributions. Which can be stated as :
Practical Algorithm
Faster Implementation
Practical Algorithm
Each Background pixel x is modeled by a collection of N background sample values taken in Previous Frames
In order to classify a new pixel v(x) the Euclidean distance is calculated between v(x) and samples of model m(x). If this distance is less for a number of samples lying in model sample m(x) set as a threshold (cardinality = 2), then the pixel belongs to background.
Cardinality = 2
Assumption : Neighbouring pixels share similar temporal distribution. Populating the pixel models with values found in the spatial neighbourhood of each pixel taken randomly. Random selection of samples in 8-connected neighbourhood of each pixel. Assuming t = 0 the first frame and NG(x) the spatial neighborhood of a pixel location x
Here, if the cardinality of m(x) is greater than the neighborhood, there is a possibility that a given Pixel v(y) is selected several times.
How to incorporate Foreground Pixel in a Background Model over period of time. Two distinct Update policies are:-
Conservative Policy: Never includes a Foreground pixel in Background Blind Update Policy: Samples added to background whether they belong to Foreground or not.
Adopted Conservative Policy, exploit spatial information to inject information regarding background evolution into background pixel models masked locally by foreground.
Memory-less Update Policy which ensures smooth decaying lifespan of samples stored in background pixel models Random Time Sub sampling to extend the time window covered by the background pixel models A Mechanism that propagates background pixel samples spatially to ensure spatial consistency.
Randomly discard pixel sample from Model based on Uniform Distribution. In this way the systematic removal of old sample first is avoided. Mathematically, the probability of a sample present at time t being preserved after update of pixel model is given by: ( N-1)/N For a fraction of time dt this probability can be written as :
It is not necessary to update the each background pixel model for each new frame. Instead the background is updated based on the value of a Random Variable, mostly selected to be 16. In practice when a pixel value has been classified as belonging to background, a random process determines whether this value is used to update the corresponding pixel model or not.
Time SubSampling
To provide a way of updating the background pixel model that are hidden by foreground. Count the number of times a pixel has been classified as foreground.
If this number reaches a given threshold for a particular pixel location, the current pixel value at that location is inserted into background.
Assumption: Neighboring Background Pixels share a similar temporal distribution A new background sample of a pixel should also update the models of the neighboring pixels.
Background models hidden by foreground will be updated with background samples from neighboring pixel locations from time to time.
For a 4 or 8 connected NG(x), if it is decided to update the model m(x) set by inserting pixel v(x), the same pixel is used to update the Neighborhood NG(x) based on Uniform Law.