Skip to content

Conversation

servantftransperfect
Copy link
Contributor

This pull request adds support for using depth priors in the structure-from-motion (SfM) expanding pipeline, allowing for improved 3D reconstruction when depth information is available in the tracks. It introduces new parameters to control the use of depth priors and the preference between prior-based and multiview-based reconstruction. The changes affect both the command-line interface and the core triangulation logic, ensuring that depth priors are properly integrated into the triangulation process.

Depth Prior Integration and Control:

  • Added two new boolean parameters, enableDepthPrior and ignoreMultiviewOnPrior, to the SfMExpanding node, the command-line interface, and the ExpansionChunk class, allowing users to enable depth prior usage and control whether prior-based reconstruction is favored over multiview reconstruction. [1] [2] [3] [4] [5] [6]

  • Updated the ExpansionChunk::triangulate method to perform triangulation using both multiview and depth prior information, applying the new parameters to determine the reconstruction strategy and how landmarks are updated or replaced. [1] [2]

Triangulation Logic Enhancements:

  • Extended the SfmTriangulation::process method and its interface to accept a useDepthPrior flag, enabling the selection between standard triangulation and depth-prior-based triangulation for each track. [1] [2] [3]

  • Implemented the SfmTriangulation::processTrackWithPrior method, which reconstructs 3D points directly from available depth priors in the tracks, bypassing the need for parallax and multiview triangulation when the prior is available and enabled. [1] [2] [3]

Version Updates:

  • Bumped the version numbers in both the Python node (meshroom/aliceVision/SfmExpanding.py) and the C++ pipeline (main_sfmExpanding.cpp) to reflect the new features and interface changes. [1] [2]

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

This PR integrates depth priors into the structure-from-motion (SfM) expanding pipeline to improve 3D reconstruction when depth information is available in the tracks. It adds new configuration parameters and implements triangulation logic that can utilize depth priors as an alternative to traditional multiview triangulation.

  • Added two new boolean parameters (enableDepthPrior and ignoreMultiviewOnPrior) to control depth prior usage and preference over multiview reconstruction
  • Implemented processTrackWithPrior method for depth-based triangulation that reconstructs 3D points directly from available depth information
  • Extended triangulation workflow to support both traditional multiview and depth-prior-based reconstruction strategies

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
main_sfmExpanding.cpp Added command-line parameters for depth prior control and updated version
SfmTriangulation.hpp Extended interface to support depth prior triangulation
SfmTriangulation.cpp Implemented depth-based triangulation logic and updated process method
ExpansionChunk.hpp Added setter methods and member variables for depth prior configuration
ExpansionChunk.cpp Updated triangulation workflow to handle both multiview and depth-prior reconstruction
SfmExpanding.py Added Python node parameters and updated version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


//Look if this observation has an associated depth
const auto & refTrackItem = track.featPerView.at(referenceViewId);
if (refTrackItem.depth < 0.0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (refTrackItem.depth < 0.0)
if (refTrackItem.depth <= 0.0)

@servantftransperfect servantftransperfect merged commit d02956c into develop Oct 16, 2025
4 checks passed
@servantftransperfect servantftransperfect deleted the dev/expandDepth branch October 16, 2025 11:46
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.

2 participants