Add relative poses to DatabaseCache and update the signature of global mapper. #3960
Merged
Conversation
ahojnnes
approved these changes
Jan 7, 2026
| const bool ignore_watermarks, | ||
| const std::unordered_set<std::string>& image_names) { | ||
| const std::unordered_set<std::string>& image_names, | ||
| const bool load_relative_pose) { |
Contributor
There was a problem hiding this comment.
Maybe it's now time to introduce options class DatabaseCache { struct Options { ... }; };
Contributor
Author
There was a problem hiding this comment.
Nice idea. This is done. To align the pybind interfaces with C++, we would have to introduce breaking changes there. Updated the PR description.
ahojnnes
approved these changes
Jan 7, 2026
Contributor
Author
|
The regression issues actually happened here. If every camera is calibrated, the view graph calibration will directly return true without re-estimating relative poses, leaving all cam2_from_cam1 empty. Will send in a fix. |
B1ueber2y
added a commit
that referenced
this pull request
Jan 8, 2026
…e. (#3966) Fix regression issues from #3960. This was due to the fact that relative pose re-estimation only works on pairs that are newly calibrated. So if every camera is calibrated, the relative pose wont be decomposed without this fix. This actually reveals another inconsistency from #3943. If it is the calibrated case, the original code will just skip relative pose re-estimation so that the default colmap two-view geometry is respected, rather than the one in the re-estimation.
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.
Breaking change: Now the static methods of DatabaseCache, including Create, CreateFromCache, and Load, take a DatabaseCache::Options object rather than scattered arguments.
Replace database_ member with database_cache_ throughout the global mapper logic except for GlobalPipeline, which requires view graph calibrator to live outside the pipeline logic.