a big patch; use special proxy types (Input/OutputArray, Input/OutputArrayOfArrays) for passing in vectors, matrices etc.

This commit is contained in:
Vadim Pisarevsky
2011-04-17 13:14:45 +00:00
parent 335370a7c0
commit abeeb40d46
94 changed files with 10831 additions and 9631 deletions

View File

@@ -195,13 +195,17 @@ static void copyMakeConstBorder_8u( const uchar* src, size_t srcstep, Size srcro
memcpy(dst + (i + srcroi.height)*dststep, constBuf, dstroi.width);
}
}
void copyMakeBorder( const Mat& src, Mat& dst, int top, int bottom,
int left, int right, int borderType, const Scalar& value )
void cv::copyMakeBorder( const InputArray& _src, OutputArray _dst, int top, int bottom,
int left, int right, int borderType, const Scalar& value )
{
Mat src = _src.getMat();
CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 );
dst.create( src.rows + top + bottom, src.cols + left + right, src.type() );
_dst.create( src.rows + top + bottom, src.cols + left + right, src.type() );
Mat dst = _dst.getMat();
if( borderType != BORDER_CONSTANT )
copyMakeBorder_8u( src.data, src.step, src.size(),
dst.data, dst.step, dst.size(),
@@ -215,8 +219,6 @@ void copyMakeBorder( const Mat& src, Mat& dst, int top, int bottom,
top, left, (int)src.elemSize(), (uchar*)buf );
}
}
}
CV_IMPL void