23 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
34 for (
int i=1; i<nrhs; i+=2) {
35 string key(rhs[i].toString());
37 kernel = rhs[i+1].toMat(
CV_8U);
38 else if (key ==
"Anchor")
39 anchor = rhs[i+1].toPoint();
40 else if (key ==
"Iterations")
41 iterations = rhs[i+1].toInt();
42 else if (key ==
"BorderType")
44 else if (key ==
"BorderValue")
45 borderValue = rhs[i+1].toScalar();
48 "Unrecognized option %s", key.
c_str());
53 dilate(src, dst, kernel, anchor, iterations, borderType, borderValue);
struct mxArray_tag mxArray
Forward declaration for mxArray.
void dilate(InputArray src, OutputArray dst, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar &borderValue=morphologyDefaultBorderValue())
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.
static Scalar morphologyDefaultBorderValue()
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.