Commit e0b40c26 authored by Maria Dimashova's avatar Maria Dimashova

fixed CascadeClassifier::detectMultiScale when TBB

parent 88636906
...@@ -898,10 +898,10 @@ void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& object ...@@ -898,10 +898,10 @@ void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& object
int yStep = factor > 2. ? 1 : 2; int yStep = factor > 2. ? 1 : 2;
#ifdef HAVE_TBB #ifdef HAVE_TBB
const int PTS_PER_THREAD = 100; const int PTS_PER_THREAD = 1000;
stripCount = max(((sz1.height*sz1.width)/(yStep*yStep) + PTS_PER_THREAD/2)/PTS_PER_THREAD, 1); stripCount = ((sz1.width/yStep)*(sz1.height + yStep-1)/yStep + PTS_PER_THREAD/2)/PTS_PER_THREAD;
stripSize = (sz1.height + stripCount - 1)/stripCount; stripCount = std::min(std::max(stripCount, 1), 100);
stripSize = (stripSize/yStep)*yStep; stripSize = (((sz1.height + stripCount - 1)/stripCount + yStep-1)/yStep)*yStep;
#else #else
stripCount = 1; stripCount = 1;
stripSize = sz1.height; stripSize = sz1.height;
......
...@@ -50,7 +50,7 @@ const char* blacklist[] = ...@@ -50,7 +50,7 @@ const char* blacklist[] =
"calibrate-camera-artificial", //ticket 472 "calibrate-camera-artificial", //ticket 472
//"calibrate-camera-cpp", //ticket 564 //"calibrate-camera-cpp", //ticket 564
//"calibrate-stereo-c", //ticket 565 //"calibrate-stereo-c", //ticket 565
"cascade-detector", //ticket 432 //"cascade-detector", //ticket 432
"chessboard-detector", //ticket 569 "chessboard-detector", //ticket 569
"chessboard-subpixel", //ticket 473 "chessboard-subpixel", //ticket 473
"color-luv", //ticket 502 "color-luv", //ticket 502
......
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