|
virtual bool | getDetectShadows () const =0 |
| Returns the shadow detection flag.
|
|
virtual double | getDist2Threshold () const =0 |
| Returns the threshold on the squared distance between the pixel and the sample.
|
|
virtual int | getHistory () const =0 |
| Returns the number of last frames that affect the background model.
|
|
virtual int | getkNNSamples () const =0 |
| Returns the number of neighbours, the k in the kNN.
|
|
virtual int | getNSamples () const =0 |
| Returns the number of data samples in the background model.
|
|
virtual double | getShadowThreshold () const =0 |
| Returns the shadow threshold.
|
|
virtual int | getShadowValue () const =0 |
| Returns the shadow value.
|
|
virtual void | setDetectShadows (bool detectShadows)=0 |
| Enables or disables shadow detection.
|
|
virtual void | setDist2Threshold (double _dist2Threshold)=0 |
| Sets the threshold on the squared distance.
|
|
virtual void | setHistory (int history)=0 |
| Sets the number of last frames that affect the background model.
|
|
virtual void | setkNNSamples (int _nkNN)=0 |
| Sets the k in the kNN. How many nearest neighbours need to match.
|
|
virtual void | setNSamples (int _nN)=0 |
| Sets the number of data samples in the background model.
|
|
virtual void | setShadowThreshold (double threshold)=0 |
| Sets the shadow threshold.
|
|
virtual void | setShadowValue (int value)=0 |
| Sets the shadow value.
|
|
virtual void | apply (InputArray image, OutputArray fgmask, double learningRate=-1)=0 |
| Computes a foreground mask.
|
|
virtual void | getBackgroundImage (OutputArray backgroundImage) const =0 |
| Computes a background image.
|
|
| Algorithm () |
|
virtual | ~Algorithm () |
|
virtual void | clear () |
| Clears the algorithm state.
|
|
virtual bool | empty () const |
| Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
|
|
virtual String | getDefaultName () const |
|
virtual void | read (const FileNode &fn) |
| Reads algorithm parameters from a file storage.
|
|
virtual void | save (const String &filename) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
|
virtual void | write (FileStorage &fs) const |
| Stores algorithm parameters in a file storage.
|
|
void | write (FileStorage &fs, const String &name) const |
|
K-nearest neighbours - based Background/Foreground Segmentation Algorithm.
The class implements the K-nearest neighbours background subtraction described in [Zivkovic2006] . Very efficient if number of foreground pixels is low.
virtual double cv::BackgroundSubtractorKNN::getShadowThreshold |
( |
| ) |
const |
|
pure virtual |
Returns the shadow threshold.
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara, Detecting Moving Shadows...*, IEEE PAMI,2003.