Ask Your Question
0

OpenCV: how to set the number of octaves in SIFT?

asked 2016-12-24 03:05:53 -0600

lovaj gravatar image

updated 2016-12-24 03:12:58 -0600

The number of octaves is a crucial parameter in the SIFT algorithm. However, according to SIFT documentation in OpenCV you can set only the number of layers per octave (nOctaveLayers) and not the number of octaves used.

So what is the default number of octaves used by SIFT in OpenCV? And how to change that value?

In addition, it's not clear what is an optimal value for the number of layers per octave. According to this article:

paper gives some empirical data which can be summarized as, number of octaves = 4, number of scale levels = 5

However, the default value given to nOctaveLayers is 3.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-12-24 05:07:21 -0600

LBerger gravatar image

updated 2016-12-24 08:54:17 -0600

Only way to set paramaters in SIFT is create method

About octave it is defined in source code here SIFT implementation in OpenCV is based on the codefrom http://robwhess.github.io/opensift/

Best values depend on its context.

reference paper is Distinctive Image Features from Scale - Invariant Keypoints (David G. Lowe International Journal of Computer Vision November 2004, Volume 60, Issue 2, pp 91–110)

Update

Gaussian Pyramid is calculated here. Each layer is blurred (gaussian) of sigma[i]. i is ranged from 0 to nOctaveLayers + 3

Laplacian gaussian pyramid is calculated here. For each layer nOctaveLayers + 2 dog are computed

edit flag offensive delete link more

Comments

Ok, so the number of octaves is dynamically decided. the number of layers instead is still unclear to me. I guess I will have to tune it.

lovaj gravatar imagelovaj ( 2016-12-24 08:39:33 -0600 )edit

I have updated my answer

LBerger gravatar imageLBerger ( 2016-12-24 08:53:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-24 03:05:53 -0600

Seen: 1,904 times

Last updated: Dec 24 '16