5

I am trying to write an implementation of SIFT, just as an excercise. However, I'm running into problems that I haven't been able to figure out yet. As far as I can tell, what I'm getting is the opposite of SIFT: it finds uninteresting, flat areas of the image. I'm using the VXL.

Anyway, my understanding of the early stages of SIFT are as follows:

  1. Build a guassian pyramid

  2. Using this pyramid, get a difference-of-gaussians pyramid

  3. Find all local extrema to get potential keypoints

  4. Doesn't matter, since I don't get this far.

I have a pastebin of my code, if someone would be willing to help, I would be eternally grateful. So far, this is what my algorithm spits out, with a magenta pixel at the location of every detected "keypoint".

Finally, standard disclaimer, my apologies if I did something wrong or violated some rules of conduct.

  • What is TOL? It looks like your tests at line 418, 419 could be incorrect. –  Jul 27 '12 at 23:38
  • your pastebin is invalid anymore. But you probably need to take the absolute value of the DoG before the finding local extrema! Good luck – bendervader Sep 01 '12 at 05:08

2 Answers2

0

You could see if the opencv implementation of sift has the same behaviour: http://docs.opencv.org/modules/nonfree/doc/feature_detection.html#sift

Bull
  • 11,771
  • 9
  • 42
  • 53
0

For anyone who has this problem: I believe that's because you got the blur constant wrong. I made the mistake too.

BLUR_i+1_oct(j) = BLUR_i_oct(j)*BLUR_STEP_CONSTANT;
BLUR_0_oct(j+1) = 2*BLUR_0_oct(j);

for example sigma = 1.5, blur should be:

1 -> 1.5 -> 1.5^2 -> 1.5^3 -> 1.5^4
2 -> 2*1.5 -> ...
minhnhat93
  • 141
  • 1
  • 2
  • 13