OpenCV  3.4.16
Open Source Computer Vision
Public Member Functions | List of all members
cv::bgsegm::BackgroundSubtractorGMG Class Referenceabstract

Background Subtractor module based on the algorithm given in [86] . More...

#include <opencv2/bgsegm.hpp>

Inheritance diagram for cv::bgsegm::BackgroundSubtractorGMG:
cv::BackgroundSubtractor cv::Algorithm

Public Member Functions

virtual double getBackgroundPrior () const =0
 Returns the prior probability that each individual pixel is a background pixel. More...
 
virtual double getDecisionThreshold () const =0
 Returns the value of decision threshold. More...
 
virtual double getDefaultLearningRate () const =0
 Returns the learning rate of the algorithm. More...
 
virtual int getMaxFeatures () const =0
 Returns total number of distinct colors to maintain in histogram. More...
 
virtual double getMaxVal () const =0
 Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255. More...
 
virtual double getMinVal () const =0
 Returns the minimum value taken on by pixels in image sequence. Usually 0. More...
 
virtual int getNumFrames () const =0
 Returns the number of frames used to initialize background model. More...
 
virtual int getQuantizationLevels () const =0
 Returns the parameter used for quantization of color-space. More...
 
virtual int getSmoothingRadius () const =0
 Returns the kernel radius used for morphological operations. More...
 
virtual bool getUpdateBackgroundModel () const =0
 Returns the status of background model update. More...
 
virtual void setBackgroundPrior (double bgprior)=0
 Sets the prior probability that each individual pixel is a background pixel. More...
 
virtual void setDecisionThreshold (double thresh)=0
 Sets the value of decision threshold. More...
 
virtual void setDefaultLearningRate (double lr)=0
 Sets the learning rate of the algorithm. More...
 
virtual void setMaxFeatures (int maxFeatures)=0
 Sets total number of distinct colors to maintain in histogram. More...
 
virtual void setMaxVal (double val)=0
 Sets the maximum value taken on by pixels in image sequence. More...
 
virtual void setMinVal (double val)=0
 Sets the minimum value taken on by pixels in image sequence. More...
 
virtual void setNumFrames (int nframes)=0
 Sets the number of frames used to initialize background model. More...
 
virtual void setQuantizationLevels (int nlevels)=0
 Sets the parameter used for quantization of color-space. More...
 
virtual void setSmoothingRadius (int radius)=0
 Sets the kernel radius used for morphological operations. More...
 
virtual void setUpdateBackgroundModel (bool update)=0
 Sets the status of background model update. More...
 
- Public Member Functions inherited from cv::BackgroundSubtractor
virtual void apply (InputArray image, OutputArray fgmask, double learningRate=-1)=0
 Computes a foreground mask. More...
 
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

Background Subtractor module based on the algorithm given in [86] .

Takes a series of images and returns a sequence of mask (8UC1) images of the same size, where 255 indicates Foreground and 0 represents Background. This class implements an algorithm described in "Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation," A. Godbehere, A. Matsukawa, K. Goldberg, American Control Conference, Montreal, June 2012.

Member Function Documentation

◆ getBackgroundPrior()

virtual double cv::bgsegm::BackgroundSubtractorGMG::getBackgroundPrior ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getBackgroundPrior() -> retval

Returns the prior probability that each individual pixel is a background pixel.

◆ getDecisionThreshold()

virtual double cv::bgsegm::BackgroundSubtractorGMG::getDecisionThreshold ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getDecisionThreshold() -> retval

Returns the value of decision threshold.

Decision value is the value above which pixel is determined to be FG.

◆ getDefaultLearningRate()

virtual double cv::bgsegm::BackgroundSubtractorGMG::getDefaultLearningRate ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getDefaultLearningRate() -> retval

Returns the learning rate of the algorithm.

It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from histograms.

◆ getMaxFeatures()

virtual int cv::bgsegm::BackgroundSubtractorGMG::getMaxFeatures ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getMaxFeatures() -> retval

Returns total number of distinct colors to maintain in histogram.

◆ getMaxVal()

virtual double cv::bgsegm::BackgroundSubtractorGMG::getMaxVal ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getMaxVal() -> retval

Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.

◆ getMinVal()

virtual double cv::bgsegm::BackgroundSubtractorGMG::getMinVal ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getMinVal() -> retval

Returns the minimum value taken on by pixels in image sequence. Usually 0.

◆ getNumFrames()

virtual int cv::bgsegm::BackgroundSubtractorGMG::getNumFrames ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getNumFrames() -> retval

Returns the number of frames used to initialize background model.

◆ getQuantizationLevels()

virtual int cv::bgsegm::BackgroundSubtractorGMG::getQuantizationLevels ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getQuantizationLevels() -> retval

Returns the parameter used for quantization of color-space.

It is the number of discrete levels in each channel to be used in histograms.

◆ getSmoothingRadius()

virtual int cv::bgsegm::BackgroundSubtractorGMG::getSmoothingRadius ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getSmoothingRadius() -> retval

Returns the kernel radius used for morphological operations.

◆ getUpdateBackgroundModel()

virtual bool cv::bgsegm::BackgroundSubtractorGMG::getUpdateBackgroundModel ( ) const
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.getUpdateBackgroundModel() -> retval

Returns the status of background model update.

◆ setBackgroundPrior()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setBackgroundPrior ( double  bgprior)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setBackgroundPrior(bgprior) -> None

Sets the prior probability that each individual pixel is a background pixel.

◆ setDecisionThreshold()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setDecisionThreshold ( double  thresh)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setDecisionThreshold(thresh) -> None

Sets the value of decision threshold.

◆ setDefaultLearningRate()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setDefaultLearningRate ( double  lr)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setDefaultLearningRate(lr) -> None

Sets the learning rate of the algorithm.

◆ setMaxFeatures()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setMaxFeatures ( int  maxFeatures)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setMaxFeatures(maxFeatures) -> None

Sets total number of distinct colors to maintain in histogram.

◆ setMaxVal()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setMaxVal ( double  val)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setMaxVal(val) -> None

Sets the maximum value taken on by pixels in image sequence.

◆ setMinVal()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setMinVal ( double  val)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setMinVal(val) -> None

Sets the minimum value taken on by pixels in image sequence.

◆ setNumFrames()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setNumFrames ( int  nframes)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setNumFrames(nframes) -> None

Sets the number of frames used to initialize background model.

◆ setQuantizationLevels()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setQuantizationLevels ( int  nlevels)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setQuantizationLevels(nlevels) -> None

Sets the parameter used for quantization of color-space.

◆ setSmoothingRadius()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setSmoothingRadius ( int  radius)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setSmoothingRadius(radius) -> None

Sets the kernel radius used for morphological operations.

◆ setUpdateBackgroundModel()

virtual void cv::bgsegm::BackgroundSubtractorGMG::setUpdateBackgroundModel ( bool  update)
pure virtual
Python:
cv.bgsegm_BackgroundSubtractorGMG.setUpdateBackgroundModel(update) -> None

Sets the status of background model update.


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