37 bool separate_variant = (nrhs>=2 && rhs[1].isNumeric());
38 nargchk((nrhs%2) == (separate_variant ? 0 : 1));
42 bool nninterpolation =
false;
43 for (
int i=(separate_variant ? 2 : 1); i<nrhs; i+=2) {
44 string key(rhs[i].toString());
45 if (key ==
"DstMap1Type")
46 dstmap1type = (rhs[i+1].isChar()) ?
47 DstM1Type[rhs[i+1].toString()] : rhs[i+1].toInt();
48 else if (key ==
"NNInterpolation")
49 nninterpolation = rhs[i+1].toBool();
52 "Unrecognized option %s", key.
c_str());
57 map2, dstmap1, dstmap2;
59 map2 = rhs[1].toMat(rhs[1].isUint16() ?
CV_16U :
CV_32F);
60 convertMaps(map1, map2, dstmap1, dstmap2, dstmap1type, nninterpolation);
struct mxArray_tag mxArray
Forward declaration for mxArray.
LIBMWMEX_API_EXTERN_C void mexErrMsgIdAndTxt(const char *identifier, const char *err_msg,...)
Issue formatted error message with corresponding error identifier and return to MATLAB prompt...
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.
const ConstMap< string, int > DstM1Type
Map type specification.
std::map wrapper with one-line initialization and lookup method.