# cv::BackgroundSubtractorMOG Class Reference

`#include <background_segm.hpp>`

Inheritance diagram for cv::BackgroundSubtractorMOG:

List of all members.

## Public Member Functions

CV_WRAP | BackgroundSubtractorMOG ()
| the default constructor
CV_WRAP | BackgroundSubtractorMOG (int history, int nmixtures, double backgroundRatio, double noiseSigma=0)
| the full constructor that takes the length of the history, the number of gaussian mixtures, the background ratio parameter and the noise strength
virtual void | initialize (Size frameSize, int frameType)
| re-initiaization method
virtual void | operator() (const Mat &image, Mat &fgmask, double learningRate=0)
| the update operator
virtual | ~BackgroundSubtractorMOG ()
| the destructor

## Public Attributes

double | backgroundRatio
Mat | bgmodel
Size | frameSize
int | frameType
int | history
int | nframes
int | nmixtures
double | noiseSigma
double | varThreshold

## Detailed Description

Gaussian Mixture-based Backbround/Foreground Segmentation Algorithm

The class implements the following algorithm: "An improved adaptive background mixture model for real-time tracking with shadow detection" P. KadewTraKuPong and R. Bowden, Proc. 2nd European Workshp on Advanced Video-Based Surveillance Systems, 2001." http://personal.ee.surrey.ac.uk/Personal/R.Bowden/publications/avbs01/avbs01.pdf

## Constructor & Destructor Documentation

CV_WRAP cv::BackgroundSubtractorMOG::BackgroundSubtractorMOG | ( | ) |

the default constructor

CV_WRAP cv::BackgroundSubtractorMOG::BackgroundSubtractorMOG | ( | int | history,
|  | int | nmixtures,
|  | double | backgroundRatio,
|  | double | noiseSigma = `0`
| ) |  |

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::BackgroundSubtractorMOG::~BackgroundSubtractorMOG | ( | ) | `[virtual]`

the destructor

## Member Function Documentation

virtual void cv::BackgroundSubtractorMOG::initialize | ( | Size | frameSize,
|  | int | frameType
| ) |  | `[virtual]`

re-initiaization method

virtual void cv::BackgroundSubtractorMOG::operator() | ( | const Mat & | image,
|  | Mat & | fgmask,
|  | double | learningRate = `0`
| ) |  | `[virtual]`

the update operator

## Member Data Documentation

double cv::BackgroundSubtractorMOG::backgroundRatio

Mat cv::BackgroundSubtractorMOG::bgmodel

Size cv::BackgroundSubtractorMOG::frameSize

int cv::BackgroundSubtractorMOG::frameType

int cv::BackgroundSubtractorMOG::history

int cv::BackgroundSubtractorMOG::nframes

int cv::BackgroundSubtractorMOG::nmixtures

double cv::BackgroundSubtractorMOG::noiseSigma

double cv::BackgroundSubtractorMOG::varThreshold

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

- /usr/ports/pobj/OpenCV-2.2.0/OpenCV-2.2.0/modules/video/include/opencv2/video/background_segm.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines