Completely separate C and C++ API of OpenCV core
This commit is contained in:
@@ -94,7 +94,7 @@ CV_EXPORTS void add(const Mat& a, double alpha, const Mat& b, double beta,
|
||||
CV_EXPORTS void multiply(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
||||
CV_EXPORTS void divide(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
||||
|
||||
CV_EXPORTS void convert(const Mat& src, Mat& dst, int dtype, double alpha=1, double beta=0);
|
||||
CV_EXPORTS void convert(const Mat& src, cv::OutputArray dst, int dtype, double alpha=1, double beta=0);
|
||||
CV_EXPORTS void copy(const Mat& src, Mat& dst, const Mat& mask=Mat(), bool invertMask=false);
|
||||
CV_EXPORTS void set(Mat& dst, const Scalar& gamma, const Mat& mask=Mat());
|
||||
|
||||
@@ -111,9 +111,9 @@ CV_EXPORTS void patchZeros( Mat& mat, double level );
|
||||
|
||||
CV_EXPORTS void transpose(const Mat& src, Mat& dst);
|
||||
CV_EXPORTS void erode(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
||||
int borderType=IPL_BORDER_CONSTANT, const Scalar& borderValue=Scalar());
|
||||
int borderType=0, const Scalar& borderValue=Scalar());
|
||||
CV_EXPORTS void dilate(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
||||
int borderType=IPL_BORDER_CONSTANT, const Scalar& borderValue=Scalar());
|
||||
int borderType=0, const Scalar& borderValue=Scalar());
|
||||
CV_EXPORTS void filter2D(const Mat& src, Mat& dst, int ddepth, const Mat& kernel,
|
||||
Point anchor, double delta, int borderType,
|
||||
const Scalar& borderValue=Scalar());
|
||||
@@ -541,18 +541,6 @@ CV_EXPORTS void smoothBorder(Mat& img, const Scalar& color, int delta = 3);
|
||||
|
||||
} //namespace cvtest
|
||||
|
||||
// fills c with zeros
|
||||
CV_EXPORTS void cvTsZero( CvMat* c, const CvMat* mask=0 );
|
||||
|
||||
// copies a to b (whole matrix or only the selected region)
|
||||
CV_EXPORTS void cvTsCopy( const CvMat* a, CvMat* b, const CvMat* mask=0 );
|
||||
|
||||
// converts one array to another
|
||||
CV_EXPORTS void cvTsConvert( const CvMat* src, CvMat* dst );
|
||||
|
||||
CV_EXPORTS void cvTsGEMM( const CvMat* a, const CvMat* b, double alpha,
|
||||
const CvMat* c, double beta, CvMat* d, int flags );
|
||||
|
||||
#define CV_TEST_MAIN(resourcesubdir) \
|
||||
int main(int argc, char **argv) \
|
||||
{ \
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user