Merge pull request #3352 from alucarded:BackgroundSubtractorMOG2_optimization

This commit is contained in:
Vadim Pisarevsky
2014-10-22 01:55:23 +00:00

View File

@@ -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++;