Replaced most of the usages of parallel_for with that of parallel_for_.
This should allow many algorithms to take advantage of more parallelization technologies.
This commit is contained in:
@@ -1165,15 +1165,10 @@ void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& object
|
||||
|
||||
int stripCount, stripSize;
|
||||
|
||||
#ifdef HAVE_TBB
|
||||
const int PTS_PER_THREAD = 1000;
|
||||
stripCount = ((processingRectSize.width/yStep)*(processingRectSize.height + yStep-1)/yStep + PTS_PER_THREAD/2)/PTS_PER_THREAD;
|
||||
stripCount = std::min(std::max(stripCount, 1), 100);
|
||||
stripSize = (((processingRectSize.height + stripCount - 1)/stripCount + yStep-1)/yStep)*yStep;
|
||||
#else
|
||||
stripCount = 1;
|
||||
stripSize = processingRectSize.height;
|
||||
#endif
|
||||
|
||||
if( !detectSingleScale( scaledImage, stripCount, processingRectSize, stripSize, yStep, factor, candidates,
|
||||
rejectLevels, levelWeights, outputRejectLevels ) )
|
||||
|
Reference in New Issue
Block a user