Updated by Alexander Shishkov almost 13 years ago
the function getPointOctave(...) is used to compute the octave in which the keypoint was detected. In 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 2.3.1 is:
<pre><code class="cpp">
for( octave = 1; octave < params.nOctaves; octave++ )
for( layer = 0; layer < params.nOctaveLayers; layer++ )
...
</code></pre>
And the right code should be:
<pre><code class="cpp">
for( octave = 0; octave < params.nOctaves; octave++ )
for( layer = 1; layer < params.nOctaveLayers+1; layer++ )
</code></pre>
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 2.3.1 is:
<pre><code class="cpp">
for( octave = 1; octave < params.nOctaves; octave++ )
for( layer = 0; layer < params.nOctaveLayers; layer++ )
...
</code></pre>
And the right code should be:
<pre><code class="cpp">
for( octave = 0; octave < params.nOctaves; octave++ )
for( layer = 1; layer < params.nOctaveLayers+1; layer++ )
</code></pre>