I have just a little problem with the right resource. I am using opencv 2.4.8 and I couldn't find the right resource for knnMatch(). I tried the following which didn't work:
#include "opencv2/core/core.hpp" #include <opencv2/nonfree/features2d.hpp> #include "opencv2/nonfree/nonfree.hpp" #include <opencv2/ml/ml.hpp> //#include "opencv2/features2d/features2d.hpp" //#include <opencv2/legacy/legacy.hpp>
Can someone say me the right resource? Also google didn't help me.
tried to find the 3 nearest matches for two descriptors with keypoints:
Ptr<DescriptorMatcher> matcher; matcher.knnMatch(descriptorsLeft, descriptorsRight,3);