fixed background update in GMM2 algorithm (ticket #1931)
authorVadim Pisarevsky <no@email>
Tue, 15 May 2012 14:25:07 +0000 (14:25 +0000)
committerVadim Pisarevsky <no@email>
Tue, 15 May 2012 14:25:07 +0000 (14:25 +0000)
modules/video/src/bgfg_gaussmix2.cpp

index 5be317e..3c39b33 100644 (file)
@@ -571,7 +571,7 @@ void BackgroundSubtractorMOG2::operator()(InputArray _image, OutputArray _fgmask
                                  bgmodelUsedModes.data, nmixtures, (float)learningRate,
                                  (float)varThreshold,
                                  backgroundRatio, varThresholdGen,
-                                 fVarInit, fVarMin, fVarMax, fCT, fTau,
+                                 fVarInit, fVarMin, fVarMax, -learningRate*fCT, fTau,
                                  bShadowDetection, nShadowDetection));
     }
 }