Repository navigation
Fix StereoFromMotion words3D indexing for RGB-only input - #1798
Merged
matlabbe merged 6 commits intoOct 19, 2026
Merged
Conversation
…ller2018/rtabmap into Miller2018-fix/stereofrommotion-words3d-indexing
Miller2018
dismissed
matlabbe’s stale review
October 18, 2026 21:28
The merge-base changed after approval.
matlabbe
previously approved these changes
Oct 18, 2026
matlabbe
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix StereoFromMotion 3D-word indexing on RGB-only input
Fixes #1797.
Problem
With
Mem/StereoFromMotion=trueon RGB-only input,Memory::createSignaturefilledwords3Dvia
push_backwhile iterating thewordsmultimap (word-id order), sowords3D[i]did notbelong to kptIdx
i. Every consumer (DBDriverSqlite3.cpp:4624,RegistrationVis) indexeswords3Dby kptIdx, so loop-closure PnP always produced 0 inliers(
Not enough inliers 0/20 (matches=N)), making loop closure unusable.Fix
In the
words3DWasEmptybranch, pre-sizewords3Dtowords.size()with NaN, then use thesame
words3D[iter->second] = jter->secondwrite as the non-empty branch. No behavior changefor RGB-D/stereo input (non-empty path untouched).
Validation
loop 3→63 PnP goes 0/97 → 48/65 inliers (0.65 px reprojection); the run logged
Not enough inliers 0/20 (matches=43)before the fix.masterand0.23.7(git apply --check).