24 nargchk(nrhs>=5 && (nrhs%2)==1 && nlhs<=1);
30 bool withRotation =
false;
31 bool withScale =
false;
32 double thresholdFactor = 6.0;
33 for (
int i=5; i<nrhs; i+=2) {
34 string key(rhs[i].toString());
35 if (key ==
"WithRotation")
36 withRotation = rhs[i+1].toBool();
37 else if (key ==
"WithScale")
38 withScale = rhs[i+1].toBool();
39 else if (key ==
"ThresholdFactor")
40 thresholdFactor = rhs[i+1].toDouble();
43 "Unrecognized option %s", key.
c_str());
47 Size size1(rhs[0].toSize()),
48 size2(rhs[2].toSize());
50 keypoints2(rhs[3].toVector<KeyPoint>());
53 matchGMS(size1, size2, keypoints1, keypoints2, matches1to2, matchesGMS,
54 withRotation, withScale, thresholdFactor);
void matchGMS(const Size &size1, const Size &size2, const std::vector< KeyPoint > &keypoints1, const std::vector< KeyPoint > &keypoints2, const std::vector< DMatch > &matches1to2, std::vector< DMatch > &matchesGMS, const bool withRotation=false, const bool withScale=false, const double thresholdFactor=6.0)
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.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.