26 bool vect_variant = (rhs[1].numel() == 4);
27 nargchk(vect_variant ? ((nrhs%2)==0) : (nrhs>=5 && (nrhs%2)!=0));
31 bool isolated =
false;
33 for (
int i=(vect_variant ? 2 : 5); i<nrhs; i+=2) {
34 string key(rhs[i].toString());
35 if (key ==
"BorderType")
37 else if (key ==
"Isolated")
38 isolated = rhs[i+1].toBool();
39 else if (key ==
"Value")
40 value = rhs[i+1].toScalar();
43 "Unrecognized option %s", key.
c_str());
60 bottom = rhs[2].toInt();
61 left = rhs[3].toInt();
62 right = rhs[4].toInt();
struct mxArray_tag mxArray
Forward declaration for mxArray.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
void copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar &value=Scalar())
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.