-
-
Notifications
You must be signed in to change notification settings - Fork 850
Bootstrap with injected depths from Depthmaps #1994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
12f4da3
to
f8c3bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f8c3bbf
to
5966172
Compare
5966172
to
9e91e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
requiredParams.add_options() | ||
("input,i", po::value<std::string>(&sfmDataFilename)->required(), "SfMData file.") | ||
("output,o", po::value<std::string>(&sfmDataOutputFilename)->required(), "SfMData output file.") | ||
("method", po::value<std::string>(&methodString)->required(), "Method choice.") |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The parameter description 'Method choice.' is too vague. Consider providing more descriptive text like 'Bootstrapping method: classic (epipolar geometry), mesh (3D mesh constraints), or depth (depth map information)'.
("method", po::value<std::string>(&methodString)->required(), "Method choice.") | |
("method", po::value<std::string>(&methodString)->required(), "Bootstrapping method: classic (epipolar geometry), mesh (3D mesh constraints), or depth (depth map information).") |
Copilot uses AI. Check for mistakes.
|
||
if (!firstViewFilters.empty()) | ||
{ | ||
ALICEVISION_LOG_ERROR("No known pose for mesh"); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message 'No known pose for mesh' is unclear. It should explain that mesh bootstrapping requires empty view filters or provide guidance on the expected configuration.
ALICEVISION_LOG_ERROR("No known pose for mesh"); | |
ALICEVISION_LOG_ERROR("Mesh bootstrapping requires empty view filters. Please ensure that no view filters are set when using mesh bootstrapping."); |
Copilot uses AI. Check for mistakes.
|
||
sfm::SfmResection resection; | ||
resection.setMaxIterations(1024); | ||
resection.setResectionMaxError(std::numeric_limits<double>::infinity()); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting resection max error to infinity removes error constraints entirely. Consider using a reasonable upper bound or making this configurable to maintain stability and prevent degenerate solutions.
resection.setResectionMaxError(std::numeric_limits<double>::infinity()); | |
// Use a reasonable finite reprojection error threshold (in pixels) instead of infinity. | |
// Consider making this value configurable if needed. | |
resection.setResectionMaxError(4.0); |
Copilot uses AI. Check for mistakes.
resection.setMaxIterations(50000); | ||
resection.setResectionMaxError(std::numeric_limits<double>::infinity()); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using infinity for max error and 50000 iterations are magic numbers that should be defined as named constants or made configurable parameters for better maintainability.
Copilot uses AI. Check for mistakes.
This is a first bootstrapping solution for depthmaps. It is very basic at the moment and should be improved over time !
This pull request introduces a new "depth" bootstrapping method to the Structure-from-Motion (SfM) pipeline, alongside the existing "classic" and "mesh" methods. It adds the necessary infrastructure to handle depth-based bootstrapping, including new C++ logic, Python interface updates, and supporting utilities for constructing SfM data from depth maps. The changes are grouped below by theme.
New bootstrapping method: "depth"
method
(choices: "classic", "mesh", "depth") to theSfMBootStrapping
node in the Python interface, allowing users to select the bootstrapping approach. The mesh file parameter is now only enabled if the "mesh" method is selected. [1] [2]EBOOTSTRAPMETHOD
and a string-to-enum conversion utility to handle the new method in the C++ pipeline entry point.Depth-based bootstrapping implementation
bootstrapDepth
function, which constructs initial camera poses and landmarks using depth information from tracks, and integrates it into the bootstrapping pipeline. [1] [2]buildSfmDataFromDepthMap
in new filesTracksDepths.cpp
andTracksDepths.hpp
, providing utilities to build minimal SfMData objects from depth maps for a given view. [1] [2]Pair selection using depth information
findBestPairFromTrackDepths
to select the best initial image pair using depth information, with supporting documentation and logic. [1] [2]Supporting API improvements
getViewSharedPtr
inSfMData
to facilitate safe access during depth-based operations.