43 #ifndef __OPENCV_BACKGROUND_SEGM_HPP__
44 #define __OPENCV_BACKGROUND_SEGM_HPP__
86 #define CV_BG_MODEL_FGD 0
87 #define CV_BG_MODEL_MOG 1
88 #define CV_BG_MODEL_FGD_SIMPLE 2
94 double learningRate );
96 #define CV_BG_STAT_MODEL_FIELDS() \
98 CvReleaseBGStatModel release; \
99 CvUpdateBGStatModel update; \
100 IplImage* background; \
101 IplImage* foreground; \
104 CvMemStorage* storage; \
105 CvSeq* foreground_regions
138 #define CV_BGFG_FGD_LC 128
139 #define CV_BGFG_FGD_N1C 15
140 #define CV_BGFG_FGD_N2C 25
142 #define CV_BGFG_FGD_LCC 64
143 #define CV_BGFG_FGD_N1CC 25
144 #define CV_BGFG_FGD_N2CC 40
147 #define CV_BGFG_FGD_ALPHA_1 0.1f
152 #define CV_BGFG_FGD_ALPHA_2 0.005f
155 #define CV_BGFG_FGD_ALPHA_3 0.1f
157 #define CV_BGFG_FGD_DELTA 2
159 #define CV_BGFG_FGD_T 0.9f
161 #define CV_BGFG_FGD_MINAREA 15.f
163 #define CV_BGFG_FGD_BG_UPDATE_TRESH 0.5f
251 #define CV_BGFG_MOG_MAX_NGAUSSIANS 500
254 #define CV_BGFG_MOG_BACKGROUND_THRESHOLD 0.7
255 #define CV_BGFG_MOG_STD_THRESHOLD 2.5
256 #define CV_BGFG_MOG_WINDOW_SIZE 200
257 #define CV_BGFG_MOG_NGAUSSIANS 5
258 #define CV_BGFG_MOG_WEIGHT_INIT 0.05
259 #define CV_BGFG_MOG_SIGMA_INIT 30
260 #define CV_BGFG_MOG_MINAREA 15.f
263 #define CV_BGFG_MOG_NCOLORS 3
332 CvArr* fgmask,
CvRect roi CV_DEFAULT(cvRect(0,0,0,0)) );
335 CvRect roi CV_DEFAULT(cvRect(0,0,0,0)),
339 float perimScale CV_DEFAULT(4.f),
362 double learningRate=0);
382 CV_WRAP BackgroundSubtractorMOG(
int history,
int nmixtures,
double backgroundRatio,
double noiseSigma=0);
384 virtual ~BackgroundSubtractorMOG();
386 virtual void operator()(
const Mat& image,
Mat& fgmask,
double learningRate=0);
389 virtual void initialize(
Size frameSize,
int frameType);