OpenCV  3.4.12
Open Source Computer Vision
Public Member Functions | List of all members
cv::cuda::BackgroundSubtractorMOG2 Class Referenceabstract

Gaussian Mixture-based Background/Foreground Segmentation Algorithm. More...

#include <opencv2/cudabgsegm.hpp>

Inheritance diagram for cv::cuda::BackgroundSubtractorMOG2:
cv::BackgroundSubtractorMOG2 cv::BackgroundSubtractor cv::Algorithm

Public Member Functions

virtual void apply (InputArray image, OutputArray fgmask, double learningRate, Stream &stream)=0
 
virtual void getBackgroundImage (OutputArray backgroundImage, Stream &stream) const =0
 
- Public Member Functions inherited from cv::BackgroundSubtractorMOG2
virtual void apply (InputArray image, OutputArray fgmask, double learningRate=-1) CV_OVERRIDE=0
 Computes a foreground mask. More...
 
virtual double getBackgroundRatio () const =0
 Returns the "background ratio" parameter of the algorithm. More...
 
virtual double getComplexityReductionThreshold () const =0
 Returns the complexity reduction threshold. More...
 
virtual bool getDetectShadows () const =0
 Returns the shadow detection flag. More...
 
virtual int getHistory () const =0
 Returns the number of last frames that affect the background model. More...
 
virtual int getNMixtures () const =0
 Returns the number of gaussian components in the background model. More...
 
virtual double getShadowThreshold () const =0
 Returns the shadow threshold. More...
 
virtual int getShadowValue () const =0
 Returns the shadow value. More...
 
virtual double getVarInit () const =0
 Returns the initial variance of each gaussian component. More...
 
virtual double getVarMax () const =0
 
virtual double getVarMin () const =0
 
virtual double getVarThreshold () const =0
 Returns the variance threshold for the pixel-model match. More...
 
virtual double getVarThresholdGen () const =0
 Returns the variance threshold for the pixel-model match used for new mixture component generation. More...
 
virtual void setBackgroundRatio (double ratio)=0
 Sets the "background ratio" parameter of the algorithm. More...
 
virtual void setComplexityReductionThreshold (double ct)=0
 Sets the complexity reduction threshold. More...
 
virtual void setDetectShadows (bool detectShadows)=0
 Enables or disables shadow detection. More...
 
virtual void setHistory (int history)=0
 Sets the number of last frames that affect the background model. More...
 
virtual void setNMixtures (int nmixtures)=0
 Sets the number of gaussian components in the background model. More...
 
virtual void setShadowThreshold (double threshold)=0
 Sets the shadow threshold. More...
 
virtual void setShadowValue (int value)=0
 Sets the shadow value. More...
 
virtual void setVarInit (double varInit)=0
 Sets the initial variance of each gaussian component. More...
 
virtual void setVarMax (double varMax)=0
 
virtual void setVarMin (double varMin)=0
 
virtual void setVarThreshold (double varThreshold)=0
 Sets the variance threshold for the pixel-model match. More...
 
virtual void setVarThresholdGen (double varThresholdGen)=0
 Sets the variance threshold for the pixel-model match used for new mixture component generation. More...
 
- Public Member Functions inherited from cv::BackgroundSubtractor
virtual void getBackgroundImage (OutputArray backgroundImage) const =0
 Computes a background image. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 
- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Detailed Description

Gaussian Mixture-based Background/Foreground Segmentation Algorithm.

The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [251] .

See also
BackgroundSubtractorMOG2

Member Function Documentation

◆ apply()

virtual void cv::cuda::BackgroundSubtractorMOG2::apply ( InputArray  image,
OutputArray  fgmask,
double  learningRate,
Stream stream 
)
pure virtual

◆ getBackgroundImage()

virtual void cv::cuda::BackgroundSubtractorMOG2::getBackgroundImage ( OutputArray  backgroundImage,
Stream stream 
) const
pure virtual

The documentation for this class was generated from the following file: