Commit 4da91f9e authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #6861 from teng88:patch-1

parents 89c9e7c2 25b044e6
......@@ -310,6 +310,7 @@ bool CvCascadeClassifier::updateTrainingSet( double minimumAcceptanceRatio, doub
int proNumNeg = cvRound( ( ((double)numNeg) * ((double)posCount) ) / numPos ); // apply only a fraction of negative samples. double is required since overflow is possible
int negCount = fillPassedSamples( posCount, proNumNeg, false, minimumAcceptanceRatio, negConsumed );
if ( !negCount )
if ( !(negConsumed > 0 && ((double)negCount+1)/(double)negConsumed <= minimumAcceptanceRatio) )
return false;
curNumSamples = posCount + negCount;
......
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