|
|
|
@ -931,10 +931,10 @@ CvSeq *cv::ocl::OclCascadeClassifier::oclHaarDetectObjects( oclMat &gimg, CvMemS |
|
|
|
|
std::vector<float> scalev; |
|
|
|
|
for(factor = 1.f;; factor *= scaleFactor) |
|
|
|
|
{ |
|
|
|
|
CvSize winSize = { cvRound(winSize0.width * factor), cvRound(winSize0.height * factor) }; |
|
|
|
|
CvSize winSize( cvRound(winSize0.width * factor), cvRound(winSize0.height * factor) ); |
|
|
|
|
sz.width = cvRound( gimg.cols / factor ) + 1; |
|
|
|
|
sz.height = cvRound( gimg.rows / factor ) + 1; |
|
|
|
|
CvSize sz1 = { sz.width - winSize0.width - 1, sz.height - winSize0.height - 1 }; |
|
|
|
|
CvSize sz1( sz.width - winSize0.width - 1, sz.height - winSize0.height - 1 ); |
|
|
|
|
|
|
|
|
|
if( sz1.width <= 0 || sz1.height <= 0 ) |
|
|
|
|
break; |
|
|
|
@ -1158,9 +1158,7 @@ CvSeq *cv::ocl::OclCascadeClassifier::oclHaarDetectObjects( oclMat &gimg, CvMemS |
|
|
|
|
cvRound(factor * winsize0.height) < gimg.rows - 10; |
|
|
|
|
n_factors++, factor *= scaleFactor ) |
|
|
|
|
{ |
|
|
|
|
CvSize winSize = { cvRound( winsize0.width * factor ), |
|
|
|
|
cvRound( winsize0.height * factor ) |
|
|
|
|
}; |
|
|
|
|
CvSize winSize( cvRound( winsize0.width * factor ), cvRound( winsize0.height * factor ) ); |
|
|
|
|
if( winSize.width < minSize.width || winSize.height < minSize.height ) |
|
|
|
|
{ |
|
|
|
|
continue; |
|
|
|
@ -1320,7 +1318,7 @@ CvSeq *cv::ocl::OclCascadeClassifier::oclHaarDetectObjects( oclMat &gimg, CvMemS |
|
|
|
|
|
|
|
|
|
if( findBiggestObject && rectList.size() ) |
|
|
|
|
{ |
|
|
|
|
CvAvgComp result_comp = {{0, 0, 0, 0}, 0}; |
|
|
|
|
CvAvgComp result_comp = {CvRect(), 0}; |
|
|
|
|
|
|
|
|
|
for( size_t i = 0; i < rectList.size(); i++ ) |
|
|
|
|
{ |
|
|
|
|