OpenCV  5.0.0alpha
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::cuda::BackgroundSubtractorMOG2 Class Referenceabstract

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

#include <opencv2/cudabgsegm.hpp>

Collaboration diagram for cv::cuda::BackgroundSubtractorMOG2:

Public Member Functions

virtual void apply (InputArray image, OutputArray fgmask, double learningRate, Stream &stream)=0
 
void getBackgroundImage (GpuMat &backgroundImage, Stream &stream)
 
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.
 
virtual double getBackgroundRatio () const =0
 Returns the "background ratio" parameter of the algorithm.
 
virtual double getComplexityReductionThreshold () const =0
 Returns the complexity reduction threshold.
 
virtual bool getDetectShadows () const =0
 Returns the shadow detection flag.
 
virtual int getHistory () const =0
 Returns the number of last frames that affect the background model.
 
virtual int getNMixtures () const =0
 Returns the number of gaussian components in the background model.
 
virtual double getShadowThreshold () const =0
 Returns the shadow threshold.
 
virtual int getShadowValue () const =0
 Returns the shadow value.
 
virtual double getVarInit () const =0
 Returns the initial variance of each gaussian component.
 
virtual double getVarMax () const =0
 
virtual double getVarMin () const =0
 
virtual double getVarThreshold () const =0
 Returns the variance threshold for the pixel-model match.
 
virtual double getVarThresholdGen () const =0
 Returns the variance threshold for the pixel-model match used for new mixture component generation.
 
virtual void setBackgroundRatio (double ratio)=0
 Sets the "background ratio" parameter of the algorithm.
 
virtual void setComplexityReductionThreshold (double ct)=0
 Sets the complexity reduction threshold.
 
virtual void setDetectShadows (bool detectShadows)=0
 Enables or disables shadow detection.
 
virtual void setHistory (int history)=0
 Sets the number of last frames that affect the background model.
 
virtual void setNMixtures (int nmixtures)=0
 Sets the number of gaussian components 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 setVarInit (double varInit)=0
 Sets the initial variance of each gaussian component.
 
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.
 
virtual void setVarThresholdGen (double varThresholdGen)=0
 Sets the variance threshold for the pixel-model match used for new mixture component generation.
 
- Public Member Functions inherited from cv::BackgroundSubtractor
virtual void getBackgroundImage (OutputArray backgroundImage) const =0
 Computes a background image.
 
- Public Member Functions inherited from cv::Algorithm
 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
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage.
 
void write (FileStorage &fs, const String &name) const
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 Loads algorithm from the file.
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String.
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 Reads algorithm from the file node.
 
- 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 [326] .

See also
BackgroundSubtractorMOG2

Member Function Documentation

◆ apply()

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

◆ getBackgroundImage() [1/2]

void cv::cuda::BackgroundSubtractorMOG2::getBackgroundImage ( GpuMat & backgroundImage,
Stream & stream )
inline

◆ getBackgroundImage() [2/2]

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

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