Updated by Alexander Shishkov about 13 years ago
the function getPointOctave(...) is used to compute the octave in which the keypoint was detected. In OpenCV [[OpenCV]] 2.3.1, this function gets wrong answer.
The reason is that it starts the search from octave=1 to octave=nOctaves-1, thus it miss the first octave(octave=0). Since the layer=0 is not used to detect the keypoint, the layer search also should be from layer=1 to layer=nOctaves.
The wrong code in OpenCV [[OpenCV]] 2.3.1 is:
for( octave = 1; octave < params.nOctaves; octave++ )
for( layer = 0; layer < params.nOctaveLayers; layer++ )
...
And the right code should be:
for( octave = 0; octave < params.nOctaves; octave++ )
for( layer = 1; layer < params.nOctaveLayers+1; layer++ )
The reason is that it starts the search from octave=1 to octave=nOctaves-1, thus it miss the first octave(octave=0). Since the layer=0 is not used to detect the keypoint, the layer search also should be from layer=1 to layer=nOctaves.
The wrong code in OpenCV [[OpenCV]] 2.3.1 is:
for( octave = 1; octave < params.nOctaves; octave++ )
for( layer = 0; layer < params.nOctaveLayers; layer++ )
...
And the right code should be:
for( octave = 0; octave < params.nOctaves; octave++ )
for( layer = 1; layer < params.nOctaveLayers+1; layer++ )