Completely separate C and C++ API of OpenCV core

This commit is contained in:
Andrey Kamaev
2013-03-29 12:59:55 +04:00
parent 715fa3303e
commit 2b1ef95415
46 changed files with 201 additions and 183 deletions

View File

@@ -259,16 +259,17 @@ cvTsFloodFill( CvMat* _img, CvPoint seed_pt, CvScalar new_val,
if( CV_MAT_DEPTH(_img->type) == CV_8U || CV_MAT_DEPTH(_img->type) == CV_32S )
{
tmp = cvCreateMat( rows, cols, CV_MAKETYPE(CV_32F,CV_MAT_CN(_img->type)) );
cvTsConvert(_img, tmp);
cvtest::convert(cvarrToMat(_img), cvarrToMat(tmp), -1);
}
mask = cvCreateMat( rows + 2, cols + 2, CV_16UC1 );
if( _mask )
cvTsConvert( _mask, mask );
cvtest::convert(cvarrToMat(_mask), cvarrToMat(mask), -1);
else
{
cvTsZero( mask );
Mat m_mask = cvarrToMat(mask);
cvtest::set( m_mask, Scalar::all(0), Mat() );
cvRectangle( mask, cvPoint(0,0), cvPoint(mask->cols-1,mask->rows-1), Scalar::all(1.), 1, 8, 0 );
}
@@ -481,7 +482,7 @@ _exit_:
if( tmp != _img )
{
if( !mask_only )
cvTsConvert(tmp, _img);
cvtest::convert(cvarrToMat(tmp), cvarrToMat(_img), -1);
cvReleaseMat( &tmp );
}