mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
don't use constructors for C API structures
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ void CV_MeanShiftTest::run_func(void)
|
||||
int CV_MeanShiftTest::validate_test_results( int /*test_case_idx*/ )
|
||||
{
|
||||
int code = cvtest::TS::OK;
|
||||
CvPoint2D32f c;
|
||||
Point2f c;
|
||||
double m = MAX(box0.size.width, box0.size.height), delta;
|
||||
|
||||
if( cvIsNaN(comp.area) || cvIsInf(comp.area) || comp.area <= 0 )
|
||||
|
||||
@@ -120,7 +120,7 @@ void CV_OptFlowPyrLKTest::run( int )
|
||||
/* read first image */
|
||||
sprintf( filename, "%soptflow/%s", ts->get_data_path().c_str(), "rock_1.bmp" );
|
||||
imgI2 = cv::imread( filename, cv::IMREAD_UNCHANGED );
|
||||
imgI = imgI2;
|
||||
imgI = cvIplImage(imgI2);
|
||||
|
||||
if( imgI2.empty() )
|
||||
{
|
||||
@@ -132,7 +132,7 @@ void CV_OptFlowPyrLKTest::run( int )
|
||||
/* read second image */
|
||||
sprintf( filename, "%soptflow/%s", ts->get_data_path().c_str(), "rock_2.bmp" );
|
||||
imgJ2 = cv::imread( filename, cv::IMREAD_UNCHANGED );
|
||||
imgJ = imgJ2;
|
||||
imgJ = cvIplImage(imgJ2);
|
||||
|
||||
if( imgJ2.empty() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user