你好,我想实现快速特征检测器的代码,在它的初始阶段,我得到了以下错误比如在OpenCV的重载函数
(1)没有重载函数“CV :: FastFeatureDetector的实例: :检测”相匹配的参数列表
(2) “KeyPointsToPoints” 未定义
请帮助我。
#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 the left and 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;
}
你的OpenCV版本的文档对'cv :: FastFeatureDetector :: detect'说了些什么? – juanchopanza 2013-05-09 13:37:28