23 nargchk(nrhs>=3 && (nrhs%2)==1 && nlhs<=1);
30 int templateWindowSize = 7;
31 int searchWindowSize = 21;
33 for (
int i=3; 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());
56 int imgToDenoiseIndex = rhs[1].toInt();
57 int temporalWindowSize = rhs[2].toInt();
60 temporalWindowSize, h, templateWindowSize, searchWindowSize, normType);
struct mxArray_tag mxArray
Forward declaration for mxArray.
void fastNlMeansDenoisingMulti(InputArrayOfArrays srcImgs, OutputArray dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, int templateWindowSize=7, int searchWindowSize=21)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
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.
const ConstMap< std::string, int > NormType
Norm type map for option processing.