Fix SIFT wrong octave indices + typo #6184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6173
Description
Fixes the bug discovered by @longjoke. Extremas are saved in the extrema_pos list as seperate arrays for each octave. By using
np.concatenate([np.full(len(p), i) for i, p in enumerate(extrema_pos)])
, an array with the corresponding octave index of each extrema is created. If no extremas are found in an octave, nothing is appended to extrema_pos. This can to lead to wrong octave indices in a case where an octave has no keypoints, but the following does.It's fixed by appending an empty array to extrema_pos, if no extremas are found in an octave.
I'm not sure, if it's possible that this case occurs.
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.