23 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
30 int templateWindowSize = 7;
31 int searchWindowSize = 21;
33 for (
int i=1; i<nrhs; i+=2) {
34 string key(rhs[i].toString());
36 h = rhs[i+1].toVector<
float>();
37 else if (key ==
"TemplateWindowSize")
38 templateWindowSize = rhs[i+1].toInt();
39 else if (key ==
"SearchWindowSize")
40 searchWindowSize = rhs[i+1].toInt();
41 else if (key ==
"NormType")
42 normType =
NormType[rhs[i+1].toString()];
45 "Unrecognized option %s", key.
c_str());
51 templateWindowSize, searchWindowSize, normType);
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...
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.
void fastNlMeansDenoising(InputArray src, OutputArray dst, float h, int search_window=21, int block_size=7, Stream &stream=Stream::Null())
const ConstMap< std::string, int > NormType
Norm type map for option processing.