Normalize line endings and whitespace
This commit is contained in:

committed by
Andrey Kamaev

parent
0442bca235
commit
81f826db2b
@@ -69,7 +69,7 @@ cvSetIPLAllocators( Cv_iplCreateImageHeader createHeader,
|
||||
{
|
||||
int count = (createHeader != 0) + (allocateData != 0) + (deallocate != 0) +
|
||||
(createROI != 0) + (cloneImage != 0);
|
||||
|
||||
|
||||
if( count != 0 && count != 5 )
|
||||
CV_Error( CV_StsBadArg, "Either all the pointers should be null or "
|
||||
"they all should be non-null" );
|
||||
@@ -144,7 +144,7 @@ cvInitMatHeader( CvMat* arr, int rows, int cols,
|
||||
|
||||
if( rows < 0 || cols <= 0 )
|
||||
CV_Error( CV_StsBadSize, "Non-positive cols or rows" );
|
||||
|
||||
|
||||
type = CV_MAT_TYPE( type );
|
||||
arr->type = type | CV_MAT_MAGIC_VAL;
|
||||
arr->rows = rows;
|
||||
@@ -185,7 +185,7 @@ cvReleaseMat( CvMat** array )
|
||||
if( *array )
|
||||
{
|
||||
CvMat* arr = *array;
|
||||
|
||||
|
||||
if( !CV_IS_MAT_HDR_Z(arr) && !CV_IS_MATND_HDR(arr) )
|
||||
CV_Error( CV_StsBadFlag, "" );
|
||||
|
||||
@@ -280,7 +280,7 @@ cvCreateMatNDHeader( int dims, const int* sizes, int type )
|
||||
"non-positive or too large number of dimensions" );
|
||||
|
||||
CvMatND* arr = (CvMatND*)cvAlloc( sizeof(*arr) );
|
||||
|
||||
|
||||
cvInitMatNDHeader( arr, dims, sizes, type, 0 );
|
||||
arr->hdr_refcount = 1;
|
||||
return arr;
|
||||
@@ -331,19 +331,19 @@ cvGetMatND( const CvArr* arr, CvMatND* matnd, int* coi )
|
||||
{
|
||||
if( !((CvMatND*)arr)->data.ptr )
|
||||
CV_Error( CV_StsNullPtr, "The matrix has NULL data pointer" );
|
||||
|
||||
|
||||
result = (CvMatND*)arr;
|
||||
}
|
||||
else
|
||||
{
|
||||
CvMat stub, *mat = (CvMat*)arr;
|
||||
|
||||
|
||||
if( CV_IS_IMAGE_HDR( mat ))
|
||||
mat = cvGetMat( mat, &stub, coi );
|
||||
|
||||
if( !CV_IS_MAT_HDR( mat ))
|
||||
CV_Error( CV_StsBadArg, "Unrecognized or unsupported array type" );
|
||||
|
||||
|
||||
if( !mat->data.ptr )
|
||||
CV_Error( CV_StsNullPtr, "Input array has NULL data pointer" );
|
||||
|
||||
@@ -370,7 +370,7 @@ that needs to have the same size, but 8uC1 or 8sC1 type).
|
||||
Returns number of dimensions to iterate through:
|
||||
0 means that all arrays are continuous,
|
||||
1 means that all arrays are vectors of continuous arrays etc.
|
||||
and the size of largest common continuous part of the arrays
|
||||
and the size of largest common continuous part of the arrays
|
||||
*/
|
||||
CV_IMPL int
|
||||
cvInitNArrayIterator( int count, CvArr** arrs,
|
||||
@@ -395,7 +395,7 @@ cvInitNArrayIterator( int count, CvArr** arrs,
|
||||
{
|
||||
const CvArr* arr = i < count ? arrs[i] : mask;
|
||||
CvMatND* hdr;
|
||||
|
||||
|
||||
if( !arr )
|
||||
{
|
||||
if( i < count )
|
||||
@@ -420,7 +420,7 @@ cvInitNArrayIterator( int count, CvArr** arrs,
|
||||
if( hdr->dims != hdr0->dims )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
"Number of dimensions is the same for all arrays" );
|
||||
|
||||
|
||||
if( i < count )
|
||||
{
|
||||
switch( flags & (CV_NO_DEPTH_CHECK|CV_NO_CN_CHECK))
|
||||
@@ -566,7 +566,7 @@ cvCreateSparseMat( int dims, const int* sizes, int type )
|
||||
|
||||
arr->hashsize = CV_SPARSE_HASH_SIZE0;
|
||||
size = arr->hashsize*sizeof(arr->hashtable[0]);
|
||||
|
||||
|
||||
arr->hashtable = (void**)cvAlloc( size );
|
||||
memset( arr->hashtable, 0, size );
|
||||
|
||||
@@ -584,7 +584,7 @@ cvReleaseSparseMat( CvSparseMat** array )
|
||||
if( *array )
|
||||
{
|
||||
CvSparseMat* arr = *array;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT_HDR(arr) )
|
||||
CV_Error( CV_StsBadFlag, "" );
|
||||
|
||||
@@ -606,7 +606,7 @@ cvCloneSparseMat( const CvSparseMat* src )
|
||||
CV_Error( CV_StsBadArg, "Invalid sparse array header" );
|
||||
|
||||
CvSparseMat* dst = cvCreateSparseMat( src->dims, src->size, src->type );
|
||||
cvCopy( src, dst );
|
||||
cvCopy( src, dst );
|
||||
return dst;
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@ icvGetNodePtr( CvSparseMat* mat, const int* idx, int* _type,
|
||||
void** newtable;
|
||||
int newsize = MAX( mat->hashsize*2, CV_SPARSE_HASH_SIZE0);
|
||||
int newrawsize = newsize*sizeof(newtable[0]);
|
||||
|
||||
|
||||
CvSparseMatIterator iterator;
|
||||
assert( (newsize & (newsize - 1)) == 0 );
|
||||
|
||||
@@ -802,7 +802,7 @@ cvCreateData( CvArr* arr )
|
||||
|
||||
if( mat->rows == 0 || mat->cols == 0 )
|
||||
return;
|
||||
|
||||
|
||||
if( mat->data.ptr != 0 )
|
||||
CV_Error( CV_StsError, "Data is already allocated" );
|
||||
|
||||
@@ -826,7 +826,7 @@ cvCreateData( CvArr* arr )
|
||||
|
||||
if( !CvIPL.allocateData )
|
||||
{
|
||||
img->imageData = img->imageDataOrigin =
|
||||
img->imageData = img->imageDataOrigin =
|
||||
(char*)cvAlloc( (size_t)img->imageSize );
|
||||
}
|
||||
else
|
||||
@@ -851,7 +851,7 @@ cvCreateData( CvArr* arr )
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
int i;
|
||||
size_t total_size = CV_ELEM_SIZE(mat->type);
|
||||
|
||||
|
||||
if( mat->dim[0].size == 0 )
|
||||
return;
|
||||
|
||||
@@ -873,7 +873,7 @@ cvCreateData( CvArr* arr )
|
||||
total_size = size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mat->refcount = (int*)cvAlloc( total_size +
|
||||
sizeof(int) + CV_MALLOC_ALIGN );
|
||||
mat->data.ptr = (uchar*)cvAlignPtr( mat->refcount + 1, CV_MALLOC_ALIGN );
|
||||
@@ -896,7 +896,7 @@ cvSetData( CvArr* arr, void* data, int step )
|
||||
if( CV_IS_MAT_HDR( arr ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
|
||||
|
||||
int type = CV_MAT_TYPE(mat->type);
|
||||
pix_size = CV_ELEM_SIZE(type);
|
||||
min_step = mat->cols*pix_size;
|
||||
@@ -918,7 +918,7 @@ cvSetData( CvArr* arr, void* data, int step )
|
||||
else if( CV_IS_IMAGE_HDR( arr ))
|
||||
{
|
||||
IplImage* img = (IplImage*)arr;
|
||||
|
||||
|
||||
pix_size = ((img->depth & 255) >> 3)*img->nChannels;
|
||||
min_step = img->width*pix_size;
|
||||
|
||||
@@ -947,7 +947,7 @@ cvSetData( CvArr* arr, void* data, int step )
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
int i;
|
||||
int64 cur_step;
|
||||
|
||||
|
||||
if( step != CV_AUTOSTEP )
|
||||
CV_Error( CV_BadStep,
|
||||
"For multidimensional array only CV_AUTOSTEP is allowed here" );
|
||||
@@ -1097,7 +1097,7 @@ cvGetDims( const CvArr* arr, int* sizes )
|
||||
if( CV_IS_MAT_HDR( arr ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
|
||||
|
||||
dims = 2;
|
||||
if( sizes )
|
||||
{
|
||||
@@ -1120,7 +1120,7 @@ cvGetDims( const CvArr* arr, int* sizes )
|
||||
{
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
dims = mat->dims;
|
||||
|
||||
|
||||
if( sizes )
|
||||
{
|
||||
int i;
|
||||
@@ -1132,7 +1132,7 @@ cvGetDims( const CvArr* arr, int* sizes )
|
||||
{
|
||||
CvSparseMat* mat = (CvSparseMat*)arr;
|
||||
dims = mat->dims;
|
||||
|
||||
|
||||
if( sizes )
|
||||
memcpy( sizes, mat->size, dims*sizeof(sizes[0]));
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ cvGetDimSize( const CvArr* arr, int index )
|
||||
else if( CV_IS_MATND_HDR( arr ))
|
||||
{
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
|
||||
|
||||
if( (unsigned)index >= (unsigned)mat->dims )
|
||||
CV_Error( CV_StsOutOfRange, "bad dimension index" );
|
||||
|
||||
@@ -1193,7 +1193,7 @@ cvGetDimSize( const CvArr* arr, int index )
|
||||
else if( CV_IS_SPARSE_MAT_HDR( arr ))
|
||||
{
|
||||
CvSparseMat* mat = (CvSparseMat*)arr;
|
||||
|
||||
|
||||
if( (unsigned)index >= (unsigned)mat->dims )
|
||||
CV_Error( CV_StsOutOfRange, "bad dimension index" );
|
||||
|
||||
@@ -1350,7 +1350,7 @@ cvGetCols( const CvArr* arr, CvMat* submat, int start_col, int end_col )
|
||||
|
||||
if( !submat )
|
||||
CV_Error( CV_StsNullPtr, "" );
|
||||
|
||||
|
||||
cols = mat->cols;
|
||||
if( (unsigned)start_col >= (unsigned)cols ||
|
||||
(unsigned)end_col > (unsigned)cols )
|
||||
@@ -1385,7 +1385,7 @@ cvGetDiag( const CvArr* arr, CvMat* submat, int diag )
|
||||
{
|
||||
CvMat* res = 0;
|
||||
CvMat stub, *mat = (CvMat*)arr;
|
||||
int len, pix_size;
|
||||
int len, pix_size;
|
||||
|
||||
if( !CV_IS_MAT( mat ))
|
||||
mat = cvGetMat( mat, &stub );
|
||||
@@ -1407,7 +1407,7 @@ cvGetDiag( const CvArr* arr, CvMat* submat, int diag )
|
||||
if( diag >= 0 )
|
||||
{
|
||||
len = mat->cols - diag;
|
||||
|
||||
|
||||
if( len <= 0 )
|
||||
CV_Error( CV_StsOutOfRange, "" );
|
||||
|
||||
@@ -1417,7 +1417,7 @@ cvGetDiag( const CvArr* arr, CvMat* submat, int diag )
|
||||
else
|
||||
{
|
||||
len = mat->rows + diag;
|
||||
|
||||
|
||||
if( len <= 0 )
|
||||
CV_Error( CV_StsOutOfRange, "" );
|
||||
|
||||
@@ -1526,7 +1526,7 @@ cvRawDataToScalar( const void* data, int flags, CvScalar* scalar )
|
||||
int cn = CV_MAT_CN( flags );
|
||||
|
||||
assert( scalar && data );
|
||||
|
||||
|
||||
if( (unsigned)(cn - 1) >= 4 )
|
||||
CV_Error( CV_StsOutOfRange, "The number of channels must be 1, 2, 3 or 4" );
|
||||
|
||||
@@ -1646,7 +1646,7 @@ cvPtr1D( const CvArr* arr, int idx, int* _type )
|
||||
|
||||
if( _type )
|
||||
*_type = type;
|
||||
|
||||
|
||||
// the first part is mul-free sufficient check
|
||||
// that the index is within the matrix
|
||||
if( (unsigned)idx >= (unsigned)(mat->rows + mat->cols - 1) &&
|
||||
@@ -1720,7 +1720,7 @@ cvPtr1D( const CvArr* arr, int idx, int* _type )
|
||||
int i, n = m->dims;
|
||||
CV_DbgAssert( n <= CV_MAX_DIM_HEAP );
|
||||
int _idx[CV_MAX_DIM_HEAP];
|
||||
|
||||
|
||||
for( i = n - 1; i >= 0; i-- )
|
||||
{
|
||||
int t = idx / m->size[i];
|
||||
@@ -1811,7 +1811,7 @@ cvPtr2D( const CvArr* arr, int y, int x, int* _type )
|
||||
{
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
|
||||
if( mat->dims != 2 ||
|
||||
if( mat->dims != 2 ||
|
||||
(unsigned)y >= (unsigned)(mat->dim[0].size) ||
|
||||
(unsigned)x >= (unsigned)(mat->dim[1].size) )
|
||||
CV_Error( CV_StsOutOfRange, "index is out of range" );
|
||||
@@ -1843,7 +1843,7 @@ cvPtr3D( const CvArr* arr, int z, int y, int x, int* _type )
|
||||
{
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
|
||||
if( mat->dims != 3 ||
|
||||
if( mat->dims != 3 ||
|
||||
(unsigned)z >= (unsigned)(mat->dim[0].size) ||
|
||||
(unsigned)y >= (unsigned)(mat->dim[1].size) ||
|
||||
(unsigned)x >= (unsigned)(mat->dim[2].size) )
|
||||
@@ -1879,7 +1879,7 @@ cvPtrND( const CvArr* arr, const int* idx, int* _type,
|
||||
CV_Error( CV_StsNullPtr, "NULL pointer to indices" );
|
||||
|
||||
if( CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = icvGetNodePtr( (CvSparseMat*)arr, idx,
|
||||
ptr = icvGetNodePtr( (CvSparseMat*)arr, idx,
|
||||
_type, create_node, precalc_hashval );
|
||||
else if( CV_IS_MATND( arr ))
|
||||
{
|
||||
@@ -1913,7 +1913,7 @@ cvGet1D( const CvArr* arr, int idx )
|
||||
CvScalar scalar = {{0,0,0,0}};
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ) && CV_IS_MAT_CONT( ((CvMat*)arr)->type ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -1990,7 +1990,7 @@ cvGet3D( const CvArr* arr, int z, int y, int x )
|
||||
int idx[] = { z, y, x };
|
||||
ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
if( ptr )
|
||||
cvRawDataToScalar( ptr, type, &scalar );
|
||||
return scalar;
|
||||
@@ -2063,7 +2063,7 @@ cvGetReal2D( const CvArr* arr, int y, int x )
|
||||
double value = 0;
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -2110,7 +2110,7 @@ cvGetReal3D( const CvArr* arr, int z, int y, int x )
|
||||
int idx[] = { z, y, x };
|
||||
ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
if( ptr )
|
||||
{
|
||||
if( CV_MAT_CN( type ) > 1 )
|
||||
@@ -2130,7 +2130,7 @@ cvGetRealND( const CvArr* arr, const int* idx )
|
||||
double value = 0;
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = cvPtrND( arr, idx, &type );
|
||||
else
|
||||
@@ -2154,7 +2154,7 @@ cvSet1D( CvArr* arr, int idx, CvScalar scalar )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ) && CV_IS_MAT_CONT( ((CvMat*)arr)->type ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -2185,7 +2185,7 @@ cvSet2D( CvArr* arr, int y, int x, CvScalar scalar )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -2214,7 +2214,7 @@ cvSet3D( CvArr* arr, int z, int y, int x, CvScalar scalar )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = cvPtr3D( arr, z, y, x, &type );
|
||||
else
|
||||
@@ -2232,7 +2232,7 @@ cvSetND( CvArr* arr, const int* idx, CvScalar scalar )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = cvPtrND( arr, idx, &type );
|
||||
else
|
||||
@@ -2246,7 +2246,7 @@ cvSetReal1D( CvArr* arr, int idx, double value )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ) && CV_IS_MAT_CONT( ((CvMat*)arr)->type ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -2280,7 +2280,7 @@ cvSetReal2D( CvArr* arr, int y, int x, double value )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( CV_IS_MAT( arr ))
|
||||
{
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
@@ -2314,7 +2314,7 @@ cvSetReal3D( CvArr* arr, int z, int y, int x, double value )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = cvPtr3D( arr, z, y, x, &type );
|
||||
else
|
||||
@@ -2335,7 +2335,7 @@ cvSetRealND( CvArr* arr, const int* idx, double value )
|
||||
{
|
||||
int type = 0;
|
||||
uchar* ptr;
|
||||
|
||||
|
||||
if( !CV_IS_SPARSE_MAT( arr ))
|
||||
ptr = cvPtrND( arr, idx, &type );
|
||||
else
|
||||
@@ -2385,7 +2385,7 @@ cvGetMat( const CvArr* array, CvMat* mat,
|
||||
{
|
||||
if( !src->data.ptr )
|
||||
CV_Error( CV_StsNullPtr, "The matrix has NULL data pointer" );
|
||||
|
||||
|
||||
result = (CvMat*)src;
|
||||
}
|
||||
else if( CV_IS_IMAGE_HDR(src) )
|
||||
@@ -2453,7 +2453,7 @@ cvGetMat( const CvArr* array, CvMat* mat,
|
||||
CvMatND* matnd = (CvMatND*)src;
|
||||
int i;
|
||||
int size1 = matnd->dim[0].size, size2 = 1;
|
||||
|
||||
|
||||
if( !src->data.ptr )
|
||||
CV_Error( CV_StsNullPtr, "Input array has NULL data pointer" );
|
||||
|
||||
@@ -2537,7 +2537,7 @@ cvReshapeMatND( const CvArr* arr,
|
||||
refcount = mat->refcount;
|
||||
hdr_refcount = mat->hdr_refcount;
|
||||
}
|
||||
|
||||
|
||||
if( !CV_IS_MAT( mat ))
|
||||
mat = cvGetMat( mat, &header, &coi, 1 );
|
||||
|
||||
@@ -2586,7 +2586,7 @@ cvReshapeMatND( const CvArr* arr,
|
||||
header.step &= new_rows > 1 ? -1 : 0;
|
||||
header.refcount = refcount;
|
||||
header.hdr_refcount = hdr_refcount;
|
||||
|
||||
|
||||
if( sizeof_header == sizeof(CvMat) )
|
||||
*(CvMat*)_header = header;
|
||||
else
|
||||
@@ -2603,7 +2603,7 @@ cvReshapeMatND( const CvArr* arr,
|
||||
|
||||
if( sizeof_header != sizeof(CvMatND))
|
||||
CV_Error( CV_StsBadSize, "The output header should be CvMatND" );
|
||||
|
||||
|
||||
if( !new_sizes )
|
||||
{
|
||||
if( !CV_IS_MATND( arr ))
|
||||
@@ -2636,12 +2636,12 @@ cvReshapeMatND( const CvArr* arr,
|
||||
CvMatND* mat = (CvMatND*)arr;
|
||||
int i, size1, size2;
|
||||
int step;
|
||||
|
||||
|
||||
if( new_cn != 0 )
|
||||
CV_Error( CV_StsBadArg,
|
||||
"Simultaneous change of shape and number of channels is not supported. "
|
||||
"Do it by 2 separate calls" );
|
||||
|
||||
|
||||
if( !CV_IS_MATND( mat ))
|
||||
{
|
||||
cvGetMatND( mat, &stub, &coi );
|
||||
@@ -2786,7 +2786,7 @@ cvGetImage( const CvArr* array, IplImage* img )
|
||||
if( !CV_IS_IMAGE_HDR(src) )
|
||||
{
|
||||
const CvMat* mat = (const CvMat*)src;
|
||||
|
||||
|
||||
if( !CV_IS_MAT_HDR(mat))
|
||||
CV_Error( CV_StsBadFlag, "" );
|
||||
|
||||
@@ -2962,7 +2962,7 @@ cvReleaseImageHeader( IplImage** image )
|
||||
{
|
||||
IplImage* img = *image;
|
||||
*image = 0;
|
||||
|
||||
|
||||
if( !CvIPL.deallocate )
|
||||
{
|
||||
cvFree( &img->roi );
|
||||
@@ -2986,7 +2986,7 @@ cvReleaseImage( IplImage ** image )
|
||||
{
|
||||
IplImage* img = *image;
|
||||
*image = 0;
|
||||
|
||||
|
||||
cvReleaseData( img );
|
||||
cvReleaseImageHeader( &img );
|
||||
}
|
||||
@@ -3004,15 +3004,15 @@ cvSetImageROI( IplImage* image, CvRect rect )
|
||||
rect.x < image->width && rect.y < image->height &&
|
||||
rect.x + rect.width >= (int)(rect.width > 0) &&
|
||||
rect.y + rect.height >= (int)(rect.height > 0) );
|
||||
|
||||
|
||||
rect.width += rect.x;
|
||||
rect.height += rect.y;
|
||||
|
||||
|
||||
rect.x = std::max(rect.x, 0);
|
||||
rect.y = std::max(rect.y, 0);
|
||||
rect.width = std::min(rect.width, image->width);
|
||||
rect.height = std::min(rect.height, image->height);
|
||||
|
||||
|
||||
rect.width -= rect.x;
|
||||
rect.height -= rect.y;
|
||||
|
||||
@@ -3061,7 +3061,7 @@ cvGetImageROI( const IplImage* img )
|
||||
img->roi->width, img->roi->height );
|
||||
else
|
||||
rect = cvRect( 0, 0, img->width, img->height );
|
||||
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
@@ -3160,7 +3160,7 @@ cvCheckTermCriteria( CvTermCriteria criteria, double default_eps,
|
||||
"Iterations flag is set and maximum number of iterations is <= 0" );
|
||||
crit.max_iter = criteria.max_iter;
|
||||
}
|
||||
|
||||
|
||||
if( (criteria.type & CV_TERMCRIT_EPS) != 0 )
|
||||
{
|
||||
if( criteria.epsilon < 0 )
|
||||
@@ -3182,9 +3182,9 @@ cvCheckTermCriteria( CvTermCriteria criteria, double default_eps,
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
|
||||
template<> void Ptr<CvMat>::delete_obj()
|
||||
{ cvReleaseMat(&obj); }
|
||||
{ cvReleaseMat(&obj); }
|
||||
|
||||
template<> void Ptr<IplImage>::delete_obj()
|
||||
{ cvReleaseImage(&obj); }
|
||||
|
Reference in New Issue
Block a user