3
votes

I have been trying to run the FAST algorithm (now part of OpenCV libraries) but I get an error related to the linker. I used similar code to one I found here:

https://code.ros.org/trac/opencv/browser/trunk/opencv/tests/cv/src/fast.cpp?rev=2300

And here is my code:

//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();    
} 

I think that the problem is related to keypoints, but I don't understand exactly how it works. If anybody knows why am I getting the error would be nice. Thanks.

1
next time, please provide the errorINS

1 Answers

4
votes

Well, tha problem was that I hadn't "cvaux.lib" in project properties/linker/input. I had the other important libraries but not this one, which is related to cvfast, because in the toturial I followed the didn't put the library. Now it works fine, be careful with libraries and includes!