15 (
"TYPE_5_8", cv::FastFeatureDetector::TYPE_5_8)
16 (
"TYPE_7_12", cv::FastFeatureDetector::TYPE_7_12)
17 (
"TYPE_9_16", cv::FastFeatureDetector::TYPE_9_16);
27 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
30 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
33 vector<MxArray> rhs(prhs, prhs+nrhs);
37 bool nonmaxSupression =
true;
38 int type = cv::FastFeatureDetector::TYPE_9_16;
39 for (
int i=1; i<nrhs; i+=2) {
40 string key(rhs[i].toString());
41 if (key ==
"Threshold")
42 threshold = rhs[i+1].toInt();
43 else if (key ==
"NonmaxSuppression")
44 nonmaxSupression = rhs[i+1].toBool();
45 else if (key ==
"Type")
48 mexErrMsgIdAndTxt(
"mexopencv:error",
49 "Unrecognized option %s",key.c_str());
53 Mat image(rhs[0].toMat(CV_8U));
54 vector<KeyPoint> keypoints;
55 FAST(image, keypoints, threshold, nonmaxSupression, type);
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/ouput arguments number check.
Global constant definitions.
std::map wrapper with one-line initialization and lookup method.
const ConstMap< std::string, int > FASTTypeMap
FAST types.