29 bool scale_variant = (nrhs>=3 &&
30 rhs[1].isNumeric() && rhs[1].numel()==1 &&
31 rhs[2].isNumeric() && rhs[2].numel()==1);
32 nargchk((nrhs%2) == (scale_variant ? 1 : 0));
36 for (
int i=(scale_variant ? 3 : 2); i<nrhs; i+=2) {
37 string key(rhs[i].toString());
38 if (key ==
"Interpolation")
39 interpolation =
InterpType[rhs[i+1].toString()];
42 "Unrecognized option %s", key.
c_str());
47 double fx = 0, fy = 0;
49 fx = rhs[1].toDouble();
50 fy = rhs[2].toDouble();
53 dsize = rhs[1].toSize();
57 resize(src, dst, dsize, fx, fy, interpolation);
const ConstMap< std::string, int > InterpType
Interpolation type map for option processing.
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.