Ask Your Question
0

SIFT Octave bug

asked 2013-04-21 11:25:25 -0500

yes123 gravatar image

updated 2013-04-21 11:25:52 -0500

I am using SIFT matching. For each keypoint I am printing its octave value, something like this:

cout << myKeypoint.octave;

This prints value too high, Example:

Octave value:10420482
Octave value:10420482
Octave value:11337985
Octave value:10944771
Octave value:2294529
Octave value:11535105
Octave value:11535105
Octave value:14549506
Octave value:9634305
Octave value:590082
Octave value:2032385
Octave value:12517889
Octave value:15335681
Octave value:11010817
Octave value:11731457
Octave value:10944769
Octave value:6488322
Octave value:983809
Octave value:3670784
edit retag flag offensive close merge delete

Comments

Have you used SIFT keypoints? Which OpenCV version? And more important: Is your image large enough at all? The values look like that the octave-value hasn't been set at all. Double check everything, and if you are really sure it is a bug: write an example-code and submit the bug to http://code.opencv.org/projects/opencv/issues/new

Guanta gravatar imageGuanta ( 2013-04-21 13:43:07 -0500 )edit

I have last stable from sourceforge: 2.4.5. Also i am pretty sure it's a bug because if i use for example ORB the values are fine (about 1 to 4 )

yes123 gravatar imageyes123 ( 2013-04-21 18:16:13 -0500 )edit

Also I have found a strange bitmask operation to get the octave in another question: http://answers.opencv.org/question/9392/bug-sift-mask/ can't get the point thou

yes123 gravatar imageyes123 ( 2013-04-21 18:18:25 -0500 )edit

At least you can circumvent it, see: http://code.opencv.org/issues/2987

Guanta gravatar imageGuanta ( 2013-06-21 16:36:07 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-30 04:05:51 -0500

nimpy gravatar image

It is not a bug, it's a feature. :) The reason why keypoint.octave has a weird value is because it carries the information on:

  • the actual octave in the least significant byte of the keypoint.octave field
  • the layer of that octave in the second least significant byte of the keypoint.octave field
  • something else that gets packed into the third least significant byte by the SIFT keypoint detection, but doesn't get used by the SIFT descriptor

keypoint.octave gets unpacked into the variables octave, layer, and scale (scale is just 1/2^octave) with the method unpackOctave (see OpenCV implementation).

To get a visual understanding of variables octave and layer, this image might help:

image description

(I've explained this in an answer on Stack Overflow.)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-21 11:25:25 -0500

Seen: 591 times

Last updated: Apr 21 '13