19 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
22 nargchk((nrhs%2)==0 && nlhs<=1);
25 vector<MxArray> rhs(prhs, prhs+nrhs);
31 for (
int i=0; i<nrhs; i+=2) {
32 string key(rhs[i].toString());
34 ksize = rhs[i+1].toInt();
35 else if (key==
"Sigma")
36 sigma = rhs[i+1].toDouble();
37 else if (key==
"KType")
38 ktype = (rhs[i+1].isChar()) ?
41 mexErrMsgIdAndTxt(
"mexopencv:error",
"Unrecognized option");
45 Mat kernel = getGaussianKernel(ksize, sigma, ktype);
const ConstMap< std::string, int > ClassNameMap
Translates class name used in MATLAB to equivalent OpenCV depth.
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/ouput arguments number check.
Global constant definitions.