From 8dd213c829081d4b005a5fbb7f2b6aed6418c175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Pos=C5=82uszny?= Date: Sun, 19 Oct 2014 23:50:37 +0200 Subject: [PATCH] BackgroundSubtractorMOG2, learningRate=0 optimization --- modules/video/src/bgfg_gaussmix2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/video/src/bgfg_gaussmix2.cpp b/modules/video/src/bgfg_gaussmix2.cpp index 11adb74c55..e2d875517d 100644 --- a/modules/video/src/bgfg_gaussmix2.cpp +++ b/modules/video/src/bgfg_gaussmix2.cpp @@ -689,7 +689,7 @@ public: nmodes = nNewModes; //make new mode if needed and exit - if( !fitsPDF ) + if( !fitsPDF && alphaT > 0.f ) { // replace the weakest or add a new one int mode = nmodes == nmixtures ? nmixtures-1 : nmodes++;