【发布时间】:2011-12-13 19:54:24
【问题描述】:
我一直在尝试运行 FAST 算法(现在是 OpenCV 库的一部分),但出现与链接器相关的错误。我使用了与在这里找到的代码类似的代码:
https://code.ros.org/trac/opencv/browser/trunk/opencv/tests/cv/src/fast.cpp?rev=2300
这是我的代码:
//Proyecto de pruebas como toma de contacto de nuevo con OpenCV
#include "cv.h"
#include "highgui.h"
#include "cvaux.h"
#include <stdio.h>
using namespace cv;
using namespace std;
char imageName[]="C:/Users/jbarbadillo/Desktop/2.JPG";
int main(int argc, char** argv){
// Ptr<T> is safe ref-conting pointer class
Ptr<IplImage> imagen1=cvLoadImage(imageName,1);
Mat img(imagen1);
if( !img.data ) // check if the image has been loaded properly
return -1;
namedWindow("test",1);
imshow("test",img);
int threshold = 30;
bool nonmaxSupression = true;
vector<KeyPoint> keypoints1;
FAST(img, keypoints1, threshold);
waitKey();
}
我认为这个问题与关键点有关,但我不明白它是如何工作的。如果有人知道我为什么会收到错误,那就太好了。谢谢。
【问题讨论】:
-
下次请提供错误