cv.BackgroundSubtractorMOG2 - MATLAB File Help Go to online doc for cv.BackgroundSubtractorMOG2
cv.BackgroundSubtractorMOG2

Gaussian Mixture-based Background/Foreground Segmentation Algorithm

The class implements the Gaussian mixture model background subtraction described in [Zivkovic2004] and [Zivkovic2006].

The code is very fast and performs also shadow detection. Number of Gausssian components is adapted per pixel.

The algorithm similar to the standard Stauffer&Grimson algorithm with additional selection of the number of the Gaussian components based on [Zivkovic04recursiveunsupervised].

References

[Zivkovic2004]:

Zoran Zivkovic. "Improved adaptive gaussian mixture model for background subtraction". In Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on, volume 2, pages 28-31. IEEE, 2004. PDF.

[Zivkovic2006]:

Zoran Zivkovic and Ferdinand van der Heijden. "Efficient adaptive density estimation per image pixel for the task of background subtraction". Pattern recognition letters, 27(7):773-780, 2006. PDF.

[Zivkovic04recursiveunsupervised]:

Zoran Zivkovic and Ferdinand van der Heijden, "Recursive unsupervised learning of finite mixture models", IEEE Trans. on Pattern Analysis and Machine Intelligence, vol.26, no.5, pages 651-656, 2004. PDF.

[Prati03detectingmoving]:

Andrea Prati, Ivana Mikic, Mohan M. Trivedi, Rita Cucchiara. "Detecting Moving Shadows: Algorithms and Evaluation", IEEE PAMI, 2003.

See also
Class Details
Superclasses handle
Sealed false
Construct on load false
Constructor Summary
BackgroundSubtractorMOG2 Creates MOG2 Background Subtractor 
Property Summary
BackgroundRatio The "background ratio" parameter of the algorithm. 
ComplexityReductionThreshold The complexity reduction threshold. 
DetectShadows The shadow detection flag. 
History The number of last frames that affect the background model. 
NMixtures The number of gaussian components in the background model. 
ShadowThreshold The shadow threshold. 
ShadowValue The shadow value. 
VarInit The initial variance of gaussian components. default 15 
VarMax Maximum variance. default 5*15 
VarMin Minimmum variance. default 4 
VarThreshold The variance threshold for the pixel-model match. 
VarThresholdGen The variance threshold for the pixel-model match used for new 
id Object ID 
Method Summary
  addlistener Add listener for event. 
  apply Updates the background model and computes the foreground mask 
  delete Destructor 
  eq == (EQ) Test handle equality. 
  findobj Find objects matching specified conditions. 
  findprop Find property of MATLAB handle object. 
  ge >= (GE) Greater than or equal relation for handles. 
  getBackgroundImage Computes a background image 
  gt > (GT) Greater than relation for handles. 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  listener Add listener for event without binding the listener to the source object. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event. 
Event Summary
ObjectBeingDestroyed Notifies listeners that a particular object has been destroyed.