Commit e40567ea authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3352 from alucarded:BackgroundSubtractorMOG2_optimization

parents 54b59c3c 8dd213c8
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment