I am trying to use the Flann matcher for matching features between images. Following are few lines of code:
vector<MatchesInfo> matches;
Ptr<FlannBasedMatcher> matcher(new flann::LshIndexParams(20, 10, 2));
matcher.knnMatch(afeatures.descriptors, bfeatures.descriptors, matches, 2);
This generates the following error:
class "cv::Ptr" has no member "knnMatch"
What am I doing wrong?