The class implements the following algorithm: "Improved adaptive Gausian mixture model for background subtraction" Z.Zivkovic International Conference Pattern Recognition, UK, August, 2004. More...
#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 | |
| BackgroundSubtractorMOG2 () | |
| the default constructor | |
| BackgroundSubtractorMOG2 (int history, float varThreshold, bool bShadowDetection=true) | |
| the full constructor that takes the length of the history, the number of gaussian mixtures, the background ratio parameter and the noise strength | |
| virtual | ~BackgroundSubtractorMOG2 () |
| the destructor | |
| virtual void | operator() (InputArray image, OutputArray fgmask, double learningRate=-1) |
| the update operator | |
| virtual void | getBackgroundImage (OutputArray backgroundImage) const |
| computes a background image which are the mean of all background gaussians | |
| virtual void | initialize (Size frameSize, int frameType) |
| re-initiaization method | |
| virtual AlgorithmInfo * | info () const |
| 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. | |
| 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< Mat > | getMatVector (const string &name) const |
| CV_WRAP Ptr< Algorithm > | getAlgorithm (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 | |
| OutputArray | fgmask |
| OutputArray double | learningRate = 0) |
Protected Attributes | |
| Size | frameSize |
| int | frameType |
| Mat | bgmodel |
| Mat | bgmodelUsedModes |
| int | nframes |
| int | history |
| int | nmixtures |
| double | varThreshold |
| here it is the maximum allowed number of mixture components. Actual number is determined dynamically per pixel | |
| float | backgroundRatio |
| float | varThresholdGen |
| float | fVarInit |
| float | fVarMin |
| float | fVarMax |
| float | fCT |
| bool | bShadowDetection |
| unsigned char | nShadowDetection |
| float | fTau |
The class implements the following algorithm: "Improved adaptive Gausian mixture model for background subtraction" Z.Zivkovic International Conference Pattern Recognition, UK, August, 2004.
typedef Algorithm*(* cv::Algorithm::Constructor)(void) [inherited] |
typedef int(Algorithm::* cv::Algorithm::Getter)() const [inherited] |
typedef void(Algorithm::* cv::Algorithm::Setter)(int) [inherited] |
the default constructor
| cv::BackgroundSubtractorMOG2::BackgroundSubtractorMOG2 | ( | int | history, |
| float | varThreshold, | ||
| bool | bShadowDetection = true |
||
| ) |
the full constructor that takes the length of the history, the number of gaussian mixtures, the background ratio parameter and the noise strength
| virtual cv::BackgroundSubtractorMOG2::~BackgroundSubtractorMOG2 | ( | ) | [virtual] |
the destructor
| virtual void cv::BackgroundSubtractorMOG2::operator() | ( | InputArray | image, |
| OutputArray | fgmask, | ||
| double | learningRate = -1 |
||
| ) | [virtual] |
the update operator
| virtual void cv::BackgroundSubtractorMOG2::getBackgroundImage | ( | OutputArray | backgroundImage | ) | const [virtual] |
computes a background image which are the mean of all background gaussians
Reimplemented from cv::BackgroundSubtractor.
| virtual void cv::BackgroundSubtractorMOG2::initialize | ( | Size | frameSize, |
| int | frameType | ||
| ) | [virtual] |
re-initiaization method
| virtual AlgorithmInfo* cv::BackgroundSubtractorMOG2::info | ( | ) | const [virtual] |
Reimplemented from cv::Algorithm.
| 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.
| string cv::Algorithm::name | ( | ) | const [inherited] |
| ParamType< _Tp >::member_type cv::Algorithm::get | ( | const string & | name | ) | const [inherited] |
| 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] |
| 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] |
| 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] |
| void cv::Algorithm::setAlgorithm | ( | const string & | name, |
| const Ptr< _Tp > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setAlgorithm | ( | const char * | name, |
| const Ptr< Algorithm > & | value | ||
| ) | [inherited] |
| 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 [virtual, inherited] |
| virtual void cv::Algorithm::read | ( | const FileNode & | fn | ) | [virtual, inherited] |
| static CV_WRAP void cv::Algorithm::getList | ( | CV_OUT vector< string > & | algorithms | ) | [static, inherited] |
| static CV_WRAP Ptr<Algorithm> cv::Algorithm::_create | ( | const string & | name | ) | [static, inherited] |
| Ptr< _Tp > cv::Algorithm::create | ( | const string & | name | ) | [static, inherited] |
Reimplemented in cv::DescriptorMatcher, cv::AdjusterAdapter, cv::Feature2D, cv::DescriptorExtractor, and cv::FeatureDetector.
Size cv::BackgroundSubtractorMOG2::frameSize [protected] |
int cv::BackgroundSubtractorMOG2::frameType [protected] |
Mat cv::BackgroundSubtractorMOG2::bgmodel [protected] |
Mat cv::BackgroundSubtractorMOG2::bgmodelUsedModes [protected] |
int cv::BackgroundSubtractorMOG2::nframes [protected] |
int cv::BackgroundSubtractorMOG2::history [protected] |
int cv::BackgroundSubtractorMOG2::nmixtures [protected] |
double cv::BackgroundSubtractorMOG2::varThreshold [protected] |
here it is the maximum allowed number of mixture components. Actual number is determined dynamically per pixel
float cv::BackgroundSubtractorMOG2::backgroundRatio [protected] |
float cv::BackgroundSubtractorMOG2::varThresholdGen [protected] |
float cv::BackgroundSubtractorMOG2::fVarInit [protected] |
float cv::BackgroundSubtractorMOG2::fVarMin [protected] |
float cv::BackgroundSubtractorMOG2::fVarMax [protected] |
float cv::BackgroundSubtractorMOG2::fCT [protected] |
bool cv::BackgroundSubtractorMOG2::bShadowDetection [protected] |
unsigned char cv::BackgroundSubtractorMOG2::nShadowDetection [protected] |
float cv::BackgroundSubtractorMOG2::fTau [protected] |
OutputArray cv::BackgroundSubtractor::fgmask [inherited] |
OutputArray double cv::BackgroundSubtractor::learningRate = 0) [inherited] |
Reimplemented in cv::BackgroundSubtractorGMG.