class CV_EXPORTS_W BackgroundSubtractorMOG : public BackgroundSubtractor
{
public:
//! the default constructor
CV_WRAP BackgroundSubtractorMOG();
//! the full constructor that takes the length of the history, the number of gaussian mixtures, the background ratio parameter and the noise strength
CV_WRAP BackgroundSubtractorMOG(int history, int nmixtures, double backgroundRatio, double noiseSigma=0);
//! the destructor
virtual ~BackgroundSubtractorMOG();
//! the update operator
virtual void operator()(InputArray image, OutputArray fgmask, double learningRate=0);
//! re-initiaization method
virtual void initialize(Size frameSize, int frameType);
virtual AlgorithmInfo* info() const;
protected:
Size frameSize;
int frameType;
Mat bgmodel;
int nframes;
int history;
int nmixtures;
double varThreshold;
double backgroundRatio;
double noiseSigma;
};(1)BackgroundSubtracto
运动跟踪(六):BackgroundSubtractorMOG(),背景差
最新推荐文章于 2025-06-07 10:56:55 发布
本文深入探讨了BackgroundSubtractorMOG算法在运动跟踪中的应用,详细解析其工作原理,包括如何通过混合高斯模型来区分背景与前景,以及在实际场景中的优缺点。同时,提供了实例演示来展示其在运动物体检测上的效果。

最低0.47元/天 解锁文章
21

被折叠的 条评论
为什么被折叠?



