0

I am beginner in OpenCV. I have problem implement FAST algoritmus in Vsual Studio with version OpenCV 3.0. I have tried following implementation in c++:

src = imread("../images/right.jpg", CV_LOAD_IMAGE_GRAYSCALE);
Ptr<FastFeatureDetector> detector = FastFeatureDetector::create(TRESHOLD);
vector<KeyPoint> keypointsD;

with (but both realizations are BAD)

detector->detect(src, keypointsD);
drawKeypoints(src, keypointsD, output);
imshow(window_name, output);

or

FAST(src, keypointsD, TRESHOLD, true); //fast detector
drawKeypoints(src, keypointsD, output);
imshow(window_name, output);

Can you help me with any example or what Do I do bad?

Marosko89
  • 1
  • 1
  • 4

1 Answers1

0

Are you sure, that you have to make an detector? I have the following Example which is compiling:

Mat src; Mat tmp; Mat dst;
vector<KeyPoint> keypoints;

src = imread(imageName, -1);
FAST(src,keypoints,0,false);

if(keypoints.size() > 0){
cout << keypoints.size() << endl;

Sure it is just a snippet of my code, actually I take a Image and downscale it with a factor with a do while loop until keypoints.size <= 0. But It has everything that you need I think. When I compile my code it gives me the Numbers of Keypoints it found.

Example:

83742
42064
23470
13255
7290
3877
1947
915
404
151
74
24
Marcel T
  • 659
  • 1
  • 7
  • 28