Skip to content

Conversation

servantftransperfect
Copy link
Contributor

@servantftransperfect servantftransperfect commented Sep 29, 2025

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"

  • Added a new parameter method (choices: "classic", "mesh", "depth") to the SfMBootStrapping 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]
  • Introduced an enum EBOOTSTRAPMETHOD and a string-to-enum conversion utility to handle the new method in the C++ pipeline entry point.

Depth-based bootstrapping implementation

  • Added the bootstrapDepth function, which constructs initial camera poses and landmarks using depth information from tracks, and integrates it into the bootstrapping pipeline. [1] [2]
  • Implemented buildSfmDataFromDepthMap in new files TracksDepths.cpp and TracksDepths.hpp, providing utilities to build minimal SfMData objects from depth maps for a given view. [1] [2]
  • Updated CMake and includes to register and use the new depth-based files and logic. [1] [2] [3] [4]

Pair selection using depth information

  • Added findBestPairFromTrackDepths to select the best initial image pair using depth information, with supporting documentation and logic. [1] [2]

Supporting API improvements

  • Added a const overload for getViewSharedPtr in SfMData to facilitate safe access during depth-based operations.

@servantftransperfect servantftransperfect added this to the 3.4.0 milestone Sep 29, 2025
@servantftransperfect servantftransperfect changed the title Bootstrap with prior depth Bootstrap with injected depths from Depthmaps Sep 29, 2025
Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a 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.

if (bestPairId == UndefinedIndexT)
{
ALICEVISION_LOG_INFO("No valid pair");
return EXIT_FAILURE;
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return false instead of EXIT_FAILURE to match the function's return type and be consistent with other error returns in the same function.

Suggested change
return EXIT_FAILURE;
return false;

Copilot uses AI. Check for mistakes.

Comment on lines +54 to +58
* @param otherTreference the relative pose
* @param tracksMap the input map of tracks
* @param tracksPerView tracks grouped by views
* @return true
*/
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name in the documentation (otherTreference) doesn't match the actual parameter name in the function signature. The function doesn't have this parameter.

Suggested change
* @param otherTreference the relative pose
* @param tracksMap the input map of tracks
* @param tracksPerView tracks grouped by views
* @return true
*/
* @param tracksMap the input map of tracks
* @param tracksPerView tracks grouped by views
* @return true
*/

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant