24 nargchk(nrhs>=5 && (nrhs%2)==1 && nlhs<=2);
31 for (
int i=5; i<nrhs; i+=2) {
32 string key(rhs[i].toString());
33 if (key ==
"Detector") {
34 if (rhs[i+1].isChar())
36 rhs[i+1].toString(), rhs.
end(), rhs.
end());
37 else if (rhs[i+1].isCell() && rhs[i+1].numel() >= 1) {
40 args[0].toString(), args.
begin() + 1, args.
end());
44 "Invalid detector arguments");
48 "Unrecognized option %s", key.
c_str());
56 keypoints2(rhs[4].toVector<KeyPoint>());
57 float repeatability = -1.0f;
58 int correspCount = -1;
60 repeatability, correspCount, fdetector);
61 plhs[0] =
MxArray(repeatability);
63 plhs[1] =
MxArray(correspCount);
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
struct mxArray_tag mxArray
Forward declaration for mxArray.
void evaluateFeatureDetector(const Mat &img1, const Mat &img2, const Mat &H1to2, std::vector< KeyPoint > *keypoints1, std::vector< KeyPoint > *keypoints2, float &repeatability, int &correspCount, const Ptr< FeatureDetector > &fdetector=Ptr< FeatureDetector >())
cv::Ptr< cv::FeatureDetector > createFeatureDetector(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Factory function for FeatureDetector creation.
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.
Common definitions for the features2d and xfeatures2d modules.
Global constant definitions.