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

@@ -272,10 +272,13 @@ convertTo(const _Tp* src, void* dst, int dtype, size_t total, double alpha, doub
}
}
void convert(const Mat& src, Mat& dst, int dtype, double alpha, double beta)
void convert(const Mat& src, cv::OutputArray _dst, int dtype, double alpha, double beta)
{
if (dtype < 0) dtype = _dst.depth();
dtype = CV_MAKETYPE(CV_MAT_DEPTH(dtype), src.channels());
dst.create(src.dims, &src.size[0], dtype);
_dst.create(src.dims, &src.size[0], dtype);
Mat dst = _dst.getMat();
if( alpha == 0 )
{
set( dst, Scalar::all(beta) );
@@ -2935,15 +2938,3 @@ MatComparator::operator()(const char* expr1, const char* expr2,
}
}
void cvTsConvert( const CvMat* src, CvMat* dst )
{
Mat _src = cvarrToMat(src), _dst = cvarrToMat(dst);
cvtest::convert(_src, _dst, _dst.depth());
}
void cvTsZero( CvMat* dst, const CvMat* mask )
{
Mat _dst = cvarrToMat(dst), _mask = mask ? cvarrToMat(mask) : Mat();
cvtest::set(_dst, Scalar::all(0), _mask);
}