don't use constructors for C API structures

This commit is contained in:
Alexander Alekhin
2018-09-06 14:34:16 +03:00
parent ad146e5a6b
commit 8a3c394d6a
70 changed files with 547 additions and 578 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ cvMeanShift( const void* imgProb, CvRect windowIn,
if( comp )
{
comp->rect = window;
comp->rect = cvRect(window);
comp->area = cvRound(cv::sum(img(window))[0]);
}
@@ -76,13 +76,13 @@ cvCamShift( const void* imgProb, CvRect windowIn,
if( comp )
{
comp->rect = window;
comp->rect = cvRect(window);
cv::Rect roi = rr.boundingRect() & cv::Rect(0, 0, img.cols, img.rows);
comp->area = cvRound(cv::sum(img(roi))[0]);
}
if( box )
*box = rr;
*box = cvBox2D(rr);
return rr.size.width*rr.size.height > 0.f ? 1 : -1;
}