29 nargchk((nrhs%2)==0 && nlhs<=2);
40 for (
int i=0; i<nrhs; i+=2) {
41 string key(rhs[i].toString());
43 dx = rhs[i+1].toInt();
45 dy = rhs[i+1].toInt();
46 else if (key ==
"KSize")
47 ksize = (rhs[i+1].isChar()) ?
48 KSizeMap[rhs[i+1].toString()] : rhs[i+1].toInt();
49 else if (key ==
"Normalize")
51 else if (key ==
"KType")
52 ktype = (rhs[i+1].isChar()) ?
56 "Unrecognized option %s", key.
c_str());
const ConstMap< std::string, int > ClassNameMap
Translates class name used in MATLAB to equivalent OpenCV depth.
const ConstMap< string, int > KSizeMap
KSize map for option processing.
void getDerivKernels(OutputArray kx, OutputArray ky, int dx, int dy, int ksize, bool normalize=false, int ktype=CV_32F)
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...
static Vec< _Tp, cn > normalize(const Vec< _Tp, cn > &v)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
Global constant definitions.
std::map wrapper with one-line initialization and lookup method.