Skip to content

Enhance pose filtering and bundle adjustment with new parameters#2141

Open
CedricThebault wants to merge 4 commits into
developfrom
dev/imageGroupTempFilter
Open

Enhance pose filtering and bundle adjustment with new parameters#2141
CedricThebault wants to merge 4 commits into
developfrom
dev/imageGroupTempFilter

Conversation

@CedricThebault

Copy link
Copy Markdown
Member

This pull request introduces several improvements and new features to the Structure-from-Motion (SfM) temporal filtering and bundle adjustment modules, focusing on enhanced configurability, improved logging, and better control over solver iterations and reprojection error management. The most significant changes are grouped below by theme.

Add support for imageGroup to SfM Temporal Filtering

  • The pose filter is now only applied on image sequences imageGroups.

SfM Temporal Filtering Enhancements

  • Added advanced parameters to the SfMTemporalFiltering node, allowing users to limit reprojection error during filtering. New parameters include limitReprojError, maxErrorIncreasePos, maxErrorIncreaseRot, minIterationCount, and minScaleFactor, all of which provide finer control over the filtering process. The command-line interface and node UI have been updated accordingly.
  • Updated the pose filter utility to support the new filtering options, including error-limited filtering and new reprojection error computation utilities.

Bundle Adjustment and Solver Iteration Control

  • Introduced a maxIterationCount parameter to the expanding SfM pipeline, allowing users to limit the number of solver iterations in bundle adjustment. This is exposed in the command-line interface and propagated through the pipeline.
  • Improved bundle adjustment logging by adding a custom Ceres solver iteration callback (IterationInfos) that logs the cost and cost change at each iteration, and ensured that solver progress is updated every iteration.

Version Updates

  • Bumped version numbers for SfMTemporalFiltering, SfmExpanding, and their corresponding main pipeline files to reflect the new features and command-line changes.

These changes collectively provide users with more robust and flexible tools for SfM workflows, particularly in controlling the quality and stability of camera pose filtering and bundle adjustment processes.

@CedricThebault CedricThebault added this to the 3.4.0 milestone Jun 18, 2026
@CedricThebault CedricThebault requested a review from Copilot June 18, 2026 08:16

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request enhances AliceVision's SfM pipeline by introducing options to limit reprojection error during temporal filtering and adding a maximum iteration count parameter to SfM expanding. It also implements a custom logging callback in Ceres bundle adjustment to track solver progress. The review feedback highlights several performance and code quality improvements, such as capturing large objects by reference in lambda expressions to avoid expensive copies, using standard library functions (std::abs, std::round) from <cmath> to prevent truncation and ensure compliance, removing redundant .clear() calls on newly declared vectors, fixing a typo in the Python description, and removing a redundant standalone function declaration in poseFilter.hpp.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread meshroom/aliceVision/SfMTemporalFiltering.py Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.hpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances AliceVision’s SfM temporal pose filtering and expanding pipeline bundle adjustment by adding new configuration parameters (reprojection-error-limited filtering and solver iteration caps) and improving solver progress reporting/logging.

Changes:

  • Extend poseFilter to operate per imageGroup image sequences and optionally constrain filtering based on reprojection error growth.
  • Add a maxIterationCount parameter to the SfM expanding pipeline and propagate it into Ceres bundle adjustment options.
  • Add a Ceres iteration callback and adjust solver logging/progress update behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/software/pipeline/main_sfmTemporalFiltering.cpp Adds CLI parameters for reprojection-error-limited temporal filtering and updates version.
src/software/pipeline/main_sfmExpanding.cpp Adds CLI parameter to cap BA solver iterations and updates version.
src/aliceVision/sfm/utils/poseFilter.hpp Updates poseFilter API and adds reprojection error utilities declarations.
src/aliceVision/sfm/utils/poseFilter.cpp Implements imageGroup-aware filtering and reprojection-error-limited filtering logic.
src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp Adds setter/storage for max BA iteration count.
src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp Plumbs max iteration count into Ceres options.
src/aliceVision/sfm/bundle/BundleAdjustmentCeres.hpp Adds a Ceres iteration callback interface for logging.
src/aliceVision/sfm/bundle/BundleAdjustmentCeres.cpp Hooks callback into Solve, tweaks solver logging/progress settings.
meshroom/aliceVision/SfMTemporalFiltering.py Adds UI params and CLI wiring for reprojection-error-limited filtering; bumps node version.
meshroom/aliceVision/SfmExpanding.py Adds UI param for max solver iterations; bumps node version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/software/pipeline/main_sfmTemporalFiltering.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.hpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/bundle/BundleAdjustmentCeres.cpp
Comment thread meshroom/aliceVision/SfMTemporalFiltering.py Outdated
Comment thread src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 5 comments.

Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/bundle/BundleAdjustmentCeres.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 11 out of 11 changed files in this pull request and generated 8 comments.

Comment thread src/aliceVision/sfm/utils/poseFilter.hpp Outdated
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread src/aliceVision/sfm/bundle/BundleAdjustmentCeres.cpp
Comment thread src/aliceVision/sfm/utils/poseFilter.hpp
Comment thread src/aliceVision/sfm/utils/poseFilter.cpp
Comment thread meshroom/aliceVision/SfMTemporalFiltering.py Outdated
Comment thread meshroom/aliceVision/SfMTemporalFiltering.py Outdated
…ations and the scale factor in order not to increase the reprojection error more than a given ratio
@CedricThebault CedricThebault force-pushed the dev/imageGroupTempFilter branch from 423ed74 to e319ce3 Compare June 22, 2026 14:08
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants