MATLAB File Help: cv.BackgroundSubtractorKNN Index
cv.BackgroundSubtractorKNN

K-nearest neigbours based Background/Foreground Segmentation Algorithm

The class implements the K-nearest neigbours background subtraction described in [Zivkovic2006]. Very efficient if number of foreground pixels is low.

References

[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.

[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
BackgroundSubtractorKNN Creates KNN Background Subtractor 
Property Summary
DetectShadows The shadow detection flag. 
Dist2Threshold The threshold on the squared distance between the pixel and the 
History The number of last frames that affect the background model. 
KNNSamples The number of neighbours, the k in the kNN. 
NSamples The number of data samples in the background model. 
ShadowThreshold The shadow threshold. 
ShadowValue Shadow value is the value used to mark shadows in the foreground 
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 foreground mask 
  gt > (GT) Greater than relation for handles. 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event.