c++ - Instance of overloaded function in OpenCV -


hello trying implement fast feature detector code,in initial phase of following errors

(1)no instance of overloaded function "cv::fastfeaturedetector::detect" matches argument list

(2)"keypointstopoints" undefined

please me.

#include <stdio.h> #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/nonfree/nonfree.hpp" using namespace cv; int main() {   mat img1 = imread("0000.jpg", 1);   mat img2 = imread("0001.jpg", 1);  // detect keypoints in left , right images fastfeaturedetector detector(50); vector<keypoint> left_keypoints,right_keypoints; detector.detect(img1, left_keypoints); detector.detect(img2, right_keypoints); vector<point2f>left_points; keypointstopoints(left_keypoints,left_points); vector<point2f>right_points(left_points.size());   return 0;  } 

the problem in line:

vector<keypoint> left_keypoints,right_keypoints; 

c++ case-sensitive, sees vector different vector (what should be). why vector work beyond me, have expected error earlier.

cv::fastfeaturedetector::detect knows how work vector, not vector, try fix bug , try again.

also, keypointstopoints not exist in opencv library (unless program yourself), make sure use keypoint::convert(const vector<keypoint>&, vector<point2f>&) conversion.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -