BackgroundSubtractorMOG2, learningRate=0 optimization

This commit is contained in:
Tomasz Posłuszny 2014-10-19 23:50:37 +02:00
parent 22ff1e8826
commit 8dd213c829

View File

@ -689,7 +689,7 @@ public:
nmodes = nNewModes; nmodes = nNewModes;
//make new mode if needed and exit //make new mode if needed and exit
if( !fitsPDF ) if( !fitsPDF && alphaT > 0.f )
{ {
// replace the weakest or add a new one // replace the weakest or add a new one
int mode = nmodes == nmixtures ? nmixtures-1 : nmodes++; int mode = nmodes == nmixtures ? nmixtures-1 : nmodes++;