OpenCV  2.4.13.5
Open Source Computer Vision
cv::BackgroundSubtractorGMG Class Reference

#include <background_segm.hpp>

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

Public Member Functions

 BackgroundSubtractorGMG ()
 
virtual ~BackgroundSubtractorGMG ()
 
virtual AlgorithmInfoinfo () const
 
void initialize (cv::Size frameSize, double min, double max)
 
virtual void operator() (InputArray image, OutputArray fgmask, double learningRate=-1.0)
 
void release ()
 
- Public Member Functions inherited from cv::BackgroundSubtractor
virtual ~BackgroundSubtractor ()
 the virtual destructor More...
 
virtual void getBackgroundImage (OutputArray backgroundImage) const
 computes a background image More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
string name () const
 
template<typename _Tp >
ParamType< _Tp >::member_type get (const string &name) const
 
template<typename _Tp >
ParamType< _Tp >::member_type get (const char *name) const
 
int getInt (const string &name) const
 
double getDouble (const string &name) const
 
bool getBool (const string &name) const
 
string getString (const string &name) const
 
Mat getMat (const string &name) const
 
vector< MatgetMatVector (const string &name) const
 
Ptr< AlgorithmgetAlgorithm (const string &name) const
 
void set (const string &name, int value)
 
void set (const string &name, double value)
 
void set (const string &name, bool value)
 
void set (const string &name, const string &value)
 
void set (const string &name, const Mat &value)
 
void set (const string &name, const vector< Mat > &value)
 
void set (const string &name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void set (const string &name, const Ptr< _Tp > &value)
 
void setInt (const string &name, int value)
 
void setDouble (const string &name, double value)
 
void setBool (const string &name, bool value)
 
void setString (const string &name, const string &value)
 
void setMat (const string &name, const Mat &value)
 
void setMatVector (const string &name, const vector< Mat > &value)
 
void setAlgorithm (const string &name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const string &name, const Ptr< _Tp > &value)
 
void set (const char *name, int value)
 
void set (const char *name, double value)
 
void set (const char *name, bool value)
 
void set (const char *name, const string &value)
 
void set (const char *name, const Mat &value)
 
void set (const char *name, const vector< Mat > &value)
 
void set (const char *name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void set (const char *name, const Ptr< _Tp > &value)
 
void setInt (const char *name, int value)
 
void setDouble (const char *name, double value)
 
void setBool (const char *name, bool value)
 
void setString (const char *name, const string &value)
 
void setMat (const char *name, const Mat &value)
 
void setMatVector (const char *name, const vector< Mat > &value)
 
void setAlgorithm (const char *name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const char *name, const Ptr< _Tp > &value)
 
string paramHelp (const string &name) const
 
int paramType (const char *name) const
 
int paramType (const string &name) const
 
void getParams (CV_OUT vector< string > &names) const
 
virtual void write (FileStorage &fs) const
 
virtual void read (const FileNode &fn)
 

Public Attributes

int maxFeatures
 Total number of distinct colors to maintain in histogram. More...
 
double learningRate
 Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms. More...
 
int numInitializationFrames
 Number of frames of video to use to initialize histograms. More...
 
int quantizationLevels
 Number of discrete levels in each channel to be used in histograms. More...
 
double backgroundPrior
 Prior probability that any given pixel is a background pixel. A sensitivity parameter. More...
 
double decisionThreshold
 Value above which pixel is determined to be FG. More...
 
int smoothingRadius
 Smoothing radius, in pixels, for cleaning up FG image. More...
 
bool updateBackgroundModel
 Perform background model update. More...
 

Additional Inherited Members

- Public Types inherited from cv::Algorithm
typedef Algorithm *(* Constructor) (void)
 
typedef int(Algorithm::* Getter) () const
 
typedef void(Algorithm::* Setter) (int)
 
- Static Public Member Functions inherited from cv::Algorithm
static void getList (CV_OUT vector< string > &algorithms)
 
static Ptr< Algorithm_create (const string &name)
 
template<typename _Tp >
static Ptr< _Tp > create (const string &name)
 

Detailed Description

Background Subtractor module. 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.

Constructor & Destructor Documentation

§ BackgroundSubtractorGMG()

cv::BackgroundSubtractorGMG::BackgroundSubtractorGMG ( )

§ ~BackgroundSubtractorGMG()

virtual cv::BackgroundSubtractorGMG::~BackgroundSubtractorGMG ( )
virtual

Member Function Documentation

§ info()

virtual AlgorithmInfo* cv::BackgroundSubtractorGMG::info ( ) const
virtual

Reimplemented from cv::Algorithm.

§ initialize()

void cv::BackgroundSubtractorGMG::initialize ( cv::Size  frameSize,
double  min,
double  max 
)

Validate parameters and set up data structures for appropriate image size. Must call before running on data.

Parameters
frameSizeinput frame size
minminimum value taken on by pixels in image sequence. Usually 0
maxmaximum value taken on by pixels in image sequence. e.g. 1.0 or 255

§ operator()()

virtual void cv::BackgroundSubtractorGMG::operator() ( InputArray  image,
OutputArray  fgmask,
double  learningRate = -1.0 
)
virtual

Performs single-frame background subtraction and builds up a statistical background image model.

Parameters
imageInput image
fgmaskOutput mask image representing foreground and background pixels
learningRateDetermines how quickly features are "forgotten" from histograms

Reimplemented from cv::BackgroundSubtractor.

§ release()

void cv::BackgroundSubtractorGMG::release ( )

Releases all inner buffers.

Member Data Documentation

§ backgroundPrior

double cv::BackgroundSubtractorGMG::backgroundPrior

Prior probability that any given pixel is a background pixel. A sensitivity parameter.

§ decisionThreshold

double cv::BackgroundSubtractorGMG::decisionThreshold

Value above which pixel is determined to be FG.

§ learningRate

double cv::BackgroundSubtractorGMG::learningRate

Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms.

§ maxFeatures

int cv::BackgroundSubtractorGMG::maxFeatures

Total number of distinct colors to maintain in histogram.

§ numInitializationFrames

int cv::BackgroundSubtractorGMG::numInitializationFrames

Number of frames of video to use to initialize histograms.

§ quantizationLevels

int cv::BackgroundSubtractorGMG::quantizationLevels

Number of discrete levels in each channel to be used in histograms.

§ smoothingRadius

int cv::BackgroundSubtractorGMG::smoothingRadius

Smoothing radius, in pixels, for cleaning up FG image.

§ updateBackgroundModel

bool cv::BackgroundSubtractorGMG::updateBackgroundModel

Perform background model update.


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