Skip to content

Commit

Permalink
Fix race condition for Cascade Classifier when TBB enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
5kg committed Dec 28, 2012
1 parent 5f41971 commit e331787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/objdetect/src/cascadedetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,9 @@ class CascadeClassifierInvoker : public ParallelLoopBody
{
mtx->lock();
rectangles->push_back(Rect(cvRound(x*scalingFactor), cvRound(y*scalingFactor), winSize.width, winSize.height));
mtx->unlock();
rejectLevels->push_back(-result);
levelWeights->push_back(gypWeight);
mtx->unlock();
}
}
else if( result > 0 )
Expand Down

0 comments on commit e331787

Please sign in to comment.