19 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
25 vector<MxArray> rhs(prhs, prhs+nrhs);
29 if (rhs[0].isNumeric() && rhs[1].isNumeric()) {
30 Mat src(rhs[0].toMat(CV_32F)),
31 dst(rhs[1].toMat(CV_32F));
32 T = getAffineTransform(src, dst);
34 else if (rhs[0].isCell() && rhs[1].isCell()) {
35 vector<Point2f> src(rhs[0].toVector<Point2f>()),
36 dst(rhs[1].toVector<Point2f>());
37 T = getAffineTransform(src, dst);
40 mexErrMsgIdAndTxt(
"mexopencv:error",
"Invalid arguments");
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/ouput arguments number check.
Global constant definitions.