提交 47443d98 编写于 作者: V Vadim Pisarevsky

fixed 2 bugs reported by exvan (ticket #799)

上级 c639b2a8
......@@ -261,7 +261,7 @@ static void process8uC3( BackgroundSubtractorMOG& obj, const Mat& image, Mat& fg
int K = obj.nmixtures;
const float w0 = (float)CV_BGFG_MOG_WEIGHT_INIT;
const float sk0 = (float)(w0/CV_BGFG_MOG_SIGMA_INIT*sqrt(3.));
const float sk0 = (float)(w0/(CV_BGFG_MOG_SIGMA_INIT*sqrt(3.)));
const float var0 = (float)(CV_BGFG_MOG_SIGMA_INIT*CV_BGFG_MOG_SIGMA_INIT);
const float minVar = (float)(obj.noiseSigma*obj.noiseSigma);
MixData<Vec3f>* mptr = (MixData<Vec3f>*)obj.bgmodel.data;
......@@ -442,7 +442,7 @@ icvUpdateGaussianBGModel( IplImage* curr_frame, CvGaussBGModel* bg_model, doubl
mog.nframes = bg_model->countFrames;
mog.history = bg_model->params.win_size;
mog.nmixtures = bg_model->params.n_gauss;
mog.varThreshold = bg_model->params.std_threshold;
mog.varThreshold = bg_model->params.std_threshold*bg_model->params.std_threshold;
mog.backgroundRatio = bg_model->params.bg_threshold;
mog(image, mask, learningRate);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册