36 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=1);
48 for (
int i=2; i<nrhs; i+=2) {
49 string key(rhs[i].toString());
53 else if (key ==
"Anchor")
54 anchor = rhs[i+1].toPoint();
55 else if (key ==
"Iterations")
56 iterations = rhs[i+1].toInt();
57 else if (key ==
"BorderType")
59 else if (key ==
"BorderValue")
60 borderValue = rhs[i+1].toScalar();
63 "Unrecognized option %s", key.
c_str());
69 borderType, borderValue);
void morphologyEx(InputArray src, OutputArray dst, int op, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar &borderValue=morphologyDefaultBorderValue())
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...
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.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.
static Scalar morphologyDefaultBorderValue()
const ConstMap< string, int > MorphType
Type map for morphological operation for option processing.
std::map wrapper with one-line initialization and lookup method.