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
+2 -2
View File
@@ -487,7 +487,7 @@ imread_( const String& filename, int flags, int hdrtype, Mat* mat=0 )
}
else
{
image = cvCreateImage( size, cvIplDepth(type), CV_MAT_CN(type) );
image = cvCreateImage(cvSize(size), cvIplDepth(type), CV_MAT_CN(type));
temp = cvarrToMat( image );
}
@@ -834,7 +834,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
}
else
{
image = cvCreateImage( size, cvIplDepth(type), CV_MAT_CN(type) );
image = cvCreateImage(cvSize(size), cvIplDepth(type), CV_MAT_CN(type));
temp = cvarrToMat(image);
}
+1 -1
View File
@@ -652,7 +652,7 @@ cvConvertImage( const CvArr* srcarr, CvArr* dstarr, int flags )
uchar *s = src->data.ptr, *d = dst->data.ptr;
int s_step = src->step, d_step = dst->step;
int code = src_cn*10 + dst_cn;
CvSize size(src->cols, src->rows);
CvSize size = {src->cols, src->rows};
if( CV_IS_MAT_CONT(src->type & dst->type) )
{