24 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=1);
31 double sigmaColor = 25.0;
32 double sigmaSpace = 10.0;
34 for (
int i=2; i<nrhs; i+=2) {
35 string key(rhs[i].toString());
36 if (key ==
"Diameter")
38 else if (key ==
"SigmaColor")
39 sigmaColor = rhs[i+1].toDouble();
40 else if (key ==
"SigmaSpace")
41 sigmaSpace = rhs[i+1].toDouble();
42 else if (key ==
"BorderType")
46 "Unrecognized option %s", key.
c_str());
54 d, sigmaColor, sigmaSpace, borderType);
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
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...
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.
void jointBilateralFilter(InputArray joint, InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType=BORDER_DEFAULT)