c++opencvimage-processingkeypoint

OpenCV connection between keypoint size and octave


I am working with OpenCV keypoints and I got a questions about keyPoint size and octave.

I know that a keyPoint have a coordinate (x,y) and size which simply can be described as a circle with (x,y) center and radius of size.

And I know that there are some octave levels (during which the image is being downsampled by 2) that the keyPoints are being detected.

I have 2 questions about this.

  1. Is there a some relationship between the keypoint size and the octave or sublevel when it is detected?
  2. What is the maximum number of octave levels that image can have? As at every octave level the image is being downsampled by 2 does that mean that the answer is Log(2,image_size)? And what about sublevel ?

Solution

  • 1) Yes, there is (in general) a relationship between the keypoint size (or scale) and the octave and sublevel of detection: the bigger the size/scale, the higher the combined octave and sublevel. But please be aware that this will depend on the choice of key point detector (SIFT, SURF, ...) as well as its implementation. Have a look at David Lowe's paper of SIFT: SIFT for some insights.

    enter image description here

    2) That would indeed in theory be the maximum number of octaves for an image, in practice this will never be used: if I am recalling correctly the OpenCV SIFT detector only uses 2 or 3 octaves with each 3 intermediate scales.