OpenCV  4.1.0
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. 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.
 
virtual double getDecisionThreshold () const =0
 Returns the value of decision threshold.
 
virtual double getDefaultLearningRate () const =0
 Returns the learning rate of the algorithm.
 
virtual int getMaxFeatures () const =0
 Returns total number of distinct colors to maintain in histogram.
 
virtual double getMaxVal () const =0
 Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.
 
virtual double getMinVal () const =0
 Returns the minimum value taken on by pixels in image sequence. Usually 0.
 
virtual int getNumFrames () const =0
 Returns the number of frames used to initialize background model.
 
virtual int getQuantizationLevels () const =0
 Returns the parameter used for quantization of color-space.
 
virtual int getSmoothingRadius () const =0
 Returns the kernel radius used for morphological operations.
 
virtual bool getUpdateBackgroundModel () const =0
 Returns the status of background model update.
 
virtual void setBackgroundPrior (double bgprior)=0
 Sets the prior probability that each individual pixel is a background pixel.
 
virtual void setDecisionThreshold (double thresh)=0
 Sets the value of decision threshold.
 
virtual void setDefaultLearningRate (double lr)=0
 Sets the learning rate of the algorithm.
 
virtual void setMaxFeatures (int maxFeatures)=0
 Sets total number of distinct colors to maintain in histogram.
 
virtual void setMaxVal (double val)=0
 Sets the maximum value taken on by pixels in image sequence.
 
virtual void setMinVal (double val)=0
 Sets the minimum value taken on by pixels in image sequence.
 
virtual void setNumFrames (int nframes)=0
 Sets the number of frames used to initialize background model.
 
virtual void setQuantizationLevels (int nlevels)=0
 Sets the parameter used for quantization of color-space.
 
virtual void setSmoothingRadius (int radius)=0
 Sets the kernel radius used for morphological operations.
 
virtual void setUpdateBackgroundModel (bool update)=0
 Sets the status of background model update.
 
- Public Member Functions inherited from cv::BackgroundSubtractor
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.
 
- 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 (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindingsThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

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

Detailed Description

Background Subtractor module based on the algorithm given in.

Gold2012 .

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

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

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

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

Returns the value of decision threshold.

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

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

Returns the learning rate of the algorithm.

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

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

Returns total number of distinct colors to maintain in histogram.

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

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

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

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

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

Returns the number of frames used to initialize background model.

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

Returns the parameter used for quantization of color-space.

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

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

Returns the kernel radius used for morphological operations.

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

Returns the status of background model update.

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

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

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

Sets the value of decision threshold.

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

Sets the learning rate of the algorithm.

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

Sets total number of distinct colors to maintain in histogram.

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

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

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

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

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

Sets the number of frames used to initialize background model.

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

Sets the parameter used for quantization of color-space.

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

Sets the kernel radius used for morphological operations.

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

Sets the status of background model update.


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