23 nargchk((nrhs%2)==0 && nlhs<=1);
31 double theta =
CV_PI*0.25;
34 double psi =
CV_PI*0.5;
36 for (
int i=0; i<nrhs; i+=2) {
37 string key(rhs[i].toString());
39 ksize = rhs[i+1].toSize();
40 else if (key ==
"Sigma")
41 sigma = rhs[i+1].toDouble();
42 else if (key ==
"Theta")
43 theta = rhs[i+1].toDouble();
44 else if (key ==
"Lambda")
45 lambd = rhs[i+1].toDouble();
46 else if (key ==
"Gamma")
47 gamma = rhs[i+1].toDouble();
48 else if (key ==
"Psi")
49 psi = rhs[i+1].toDouble();
50 else if (key ==
"KType")
51 ktype = (rhs[i+1].isChar()) ?
55 "Unrecognized option %s", key.
c_str());
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.
Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi=CV_PI *0.5, int ktype=CV_64F)
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...
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
Global constant definitions.