c++ - OpenCV - Method 'knnMatch' could not be resolved -


i have little problem right resource. using opencv 2.4.8 , couldn't find right resource knnmatch(). tried following 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 me right resource? google didn't me.

tried find 3 nearest matches 2 descriptors keypoints:

ptr<descriptormatcher> matcher;  matcher.knnmatch(descriptorsleft, descriptorsright,3); 

you're using ptr<descriptormatcher> should dereference in order call method...

matcher.knnmatch(descriptorsleft, descriptorsright,3); //error matcher->knnmatch(descriptorsleft, descriptorsright,3); // should better 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -