29 bool separate_variant = (nrhs>=3 && rhs[2].isNumeric());
30 nargchk((nrhs%2) == (separate_variant ? 1 : 0));
37 for (
int i=(separate_variant ? 3 : 2); i<nrhs; i+=2) {
38 string key(rhs[i].toString());
40 dst = rhs[i+1].toMat();
41 else if (key ==
"Interpolation")
42 interpolation = (rhs[i+1].isChar()) ?
43 InterpType[rhs[i+1].toString()] : rhs[i+1].toInt();
44 else if (key ==
"BorderType")
45 borderMode = (rhs[i+1].isChar()) ?
46 BorderType[rhs[i+1].toString()] : rhs[i+1].toInt();
47 else if (key ==
"BorderValue")
48 borderValue = rhs[i+1].toScalar();
51 "Unrecognized option %s", key.
c_str());
59 map2 = rhs[2].toMat(rhs[2].isUint16() ?
CV_16U :
CV_32F);
60 remap(src, dst, map1, map2, interpolation, borderMode, borderValue);
const ConstMap< std::string, int > InterpType
Interpolation type map for option processing.
struct mxArray_tag mxArray
Forward declaration for mxArray.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
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...
const ConstMap< std::string, int > BorderType
Border type map for option processing.
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
Global constant definitions.