Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::BackgroundSubtractorGMG Class Reference

#include <background_segm.hpp>

Inherits cv::BackgroundSubtractor.

Public Types

typedef Algorithm *(* Constructor )(void)
 
typedef int(Algorithm::* Getter )() const
 
typedef void(Algorithm::* Setter )(int)
 

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 ()
 
 CV_WRAP_AS (apply) virtual void operator()(InputArray image
 the update operator that takes the next video frame and returns the current foreground mask as 8-bit binary image. More...
 
virtual void getBackgroundImage (OutputArray backgroundImage) const
 computes a background image More...
 
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
 
CV_WRAP int getInt (const string &name) const
 
CV_WRAP double getDouble (const string &name) const
 
CV_WRAP bool getBool (const string &name) const
 
CV_WRAP string getString (const string &name) const
 
CV_WRAP Mat getMat (const string &name) const
 
CV_WRAP vector< MatgetMatVector (const string &name) const
 
CV_WRAP 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 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)
 
CV_WRAP void setInt (const string &name, int value)
 
void setInt (const char *name, int value)
 
CV_WRAP void setDouble (const string &name, double value)
 
void setDouble (const char *name, double value)
 
CV_WRAP void setBool (const string &name, bool value)
 
void setBool (const char *name, bool value)
 
CV_WRAP void setString (const string &name, const string &value)
 
void setString (const char *name, const string &value)
 
CV_WRAP void setMat (const string &name, const Mat &value)
 
void setMat (const char *name, const Mat &value)
 
CV_WRAP void setMatVector (const string &name, const vector< Mat > &value)
 
void setMatVector (const char *name, const vector< Mat > &value)
 
CV_WRAP void setAlgorithm (const string &name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const string &name, const Ptr< _Tp > &value)
 
void setAlgorithm (const char *name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const char *name, const Ptr< _Tp > &value)
 
CV_WRAP string paramHelp (const string &name) const
 
int paramType (const char *name) const
 
CV_WRAP int paramType (const string &name) const
 
CV_WRAP void getParams (CV_OUT vector< string > &names) const
 
virtual void write (FileStorage &fs) const
 
virtual void read (const FileNode &fn)
 

Static Public Member Functions

static CV_WRAP void getList (CV_OUT vector< string > &algorithms)
 
static CV_WRAP Ptr< Algorithm_create (const string &name)
 
template<typename _Tp >
static Ptr< _Tp > create (const string &name)
 

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...
 
OutputArray fgmask
 

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.

Member Typedef Documentation

typedef Algorithm*(* cv::Algorithm::Constructor)(void)
inherited
typedef int(Algorithm::* cv::Algorithm::Getter)() const
inherited
typedef void(Algorithm::* cv::Algorithm::Setter)(int)
inherited

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from cv::Algorithm.

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
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
void cv::BackgroundSubtractorGMG::release ( )

Releases all inner buffers.

cv::BackgroundSubtractor::CV_WRAP_AS ( apply  )
inherited

the update operator that takes the next video frame and returns the current foreground mask as 8-bit binary image.

virtual void cv::BackgroundSubtractor::getBackgroundImage ( OutputArray  backgroundImage) const
virtualinherited

computes a background image

Reimplemented in cv::BackgroundSubtractorMOG2.

string cv::Algorithm::name ( ) const
inherited
template<typename _Tp >
ParamType< _Tp >::member_type cv::Algorithm::get ( const string name) const
inherited
template<typename _Tp >
ParamType< _Tp >::member_type cv::Algorithm::get ( const char *  name) const
inherited
CV_WRAP int cv::Algorithm::getInt ( const string name) const
inherited
CV_WRAP double cv::Algorithm::getDouble ( const string name) const
inherited
CV_WRAP bool cv::Algorithm::getBool ( const string name) const
inherited
CV_WRAP string cv::Algorithm::getString ( const string name) const
inherited
CV_WRAP Mat cv::Algorithm::getMat ( const string name) const
inherited
CV_WRAP vector<Mat> cv::Algorithm::getMatVector ( const string name) const
inherited
CV_WRAP Ptr<Algorithm> cv::Algorithm::getAlgorithm ( const string name) const
inherited
void cv::Algorithm::set ( const string name,
int  value 
)
inherited
void cv::Algorithm::set ( const string name,
double  value 
)
inherited
void cv::Algorithm::set ( const string name,
bool  value 
)
inherited
void cv::Algorithm::set ( const string name,
const string value 
)
inherited
void cv::Algorithm::set ( const string name,
const Mat value 
)
inherited
void cv::Algorithm::set ( const string name,
const vector< Mat > &  value 
)
inherited
void cv::Algorithm::set ( const string name,
const Ptr< Algorithm > &  value 
)
inherited
template<typename _Tp >
void cv::Algorithm::set ( const string name,
const Ptr< _Tp > &  value 
)
inherited
void cv::Algorithm::set ( const char *  name,
int  value 
)
inherited
void cv::Algorithm::set ( const char *  name,
double  value 
)
inherited
void cv::Algorithm::set ( const char *  name,
bool  value 
)
inherited
void cv::Algorithm::set ( const char *  name,
const string value 
)
inherited
void cv::Algorithm::set ( const char *  name,
const Mat value 
)
inherited
void cv::Algorithm::set ( const char *  name,
const vector< Mat > &  value 
)
inherited
void cv::Algorithm::set ( const char *  name,
const Ptr< Algorithm > &  value 
)
inherited
template<typename _Tp >
void cv::Algorithm::set ( const char *  name,
const Ptr< _Tp > &  value 
)
inherited
CV_WRAP void cv::Algorithm::setInt ( const string name,
int  value 
)
inherited
void cv::Algorithm::setInt ( const char *  name,
int  value 
)
inherited
CV_WRAP void cv::Algorithm::setDouble ( const string name,
double  value 
)
inherited
void cv::Algorithm::setDouble ( const char *  name,
double  value 
)
inherited
CV_WRAP void cv::Algorithm::setBool ( const string name,
bool  value 
)
inherited
void cv::Algorithm::setBool ( const char *  name,
bool  value 
)
inherited
CV_WRAP void cv::Algorithm::setString ( const string name,
const string value 
)
inherited
void cv::Algorithm::setString ( const char *  name,
const string value 
)
inherited
CV_WRAP void cv::Algorithm::setMat ( const string name,
const Mat value 
)
inherited
void cv::Algorithm::setMat ( const char *  name,
const Mat value 
)
inherited
CV_WRAP void cv::Algorithm::setMatVector ( const string name,
const vector< Mat > &  value 
)
inherited
void cv::Algorithm::setMatVector ( const char *  name,
const vector< Mat > &  value 
)
inherited
CV_WRAP void cv::Algorithm::setAlgorithm ( const string name,
const Ptr< Algorithm > &  value 
)
inherited
template<typename _Tp >
void cv::Algorithm::setAlgorithm ( const string name,
const Ptr< _Tp > &  value 
)
inherited
void cv::Algorithm::setAlgorithm ( const char *  name,
const Ptr< Algorithm > &  value 
)
inherited
template<typename _Tp >
void cv::Algorithm::setAlgorithm ( const char *  name,
const Ptr< _Tp > &  value 
)
inherited
CV_WRAP string cv::Algorithm::paramHelp ( const string name) const
inherited
int cv::Algorithm::paramType ( const char *  name) const
inherited
CV_WRAP int cv::Algorithm::paramType ( const string name) const
inherited
CV_WRAP void cv::Algorithm::getParams ( CV_OUT vector< string > &  names) const
inherited
virtual void cv::Algorithm::write ( FileStorage fs) const
virtualinherited
virtual void cv::Algorithm::read ( const FileNode fn)
virtualinherited
static CV_WRAP void cv::Algorithm::getList ( CV_OUT vector< string > &  algorithms)
staticinherited
static CV_WRAP Ptr<Algorithm> cv::Algorithm::_create ( const string name)
staticinherited
template<typename _Tp >
Ptr< _Tp > cv::Algorithm::create ( const string name)
staticinherited

Member Data Documentation

int cv::BackgroundSubtractorGMG::maxFeatures

Total number of distinct colors to maintain in histogram.

double cv::BackgroundSubtractorGMG::learningRate

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

int cv::BackgroundSubtractorGMG::numInitializationFrames

Number of frames of video to use to initialize histograms.

int cv::BackgroundSubtractorGMG::quantizationLevels

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

double cv::BackgroundSubtractorGMG::backgroundPrior

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

double cv::BackgroundSubtractorGMG::decisionThreshold

Value above which pixel is determined to be FG.

int cv::BackgroundSubtractorGMG::smoothingRadius

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

bool cv::BackgroundSubtractorGMG::updateBackgroundModel

Perform background model update.

OutputArray cv::BackgroundSubtractor::fgmask
inherited

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