Enhance pose filtering and bundle adjustment with new parameters#2141
Enhance pose filtering and bundle adjustment with new parameters#2141CedricThebault wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
poseFilterto operate perimageGroupimage sequences and optionally constrain filtering based on reprojection error growth. - Add a
maxIterationCountparameter 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.
fdcafd5 to
5db01ae
Compare
5db01ae to
386b6fe
Compare
386b6fe to
423ed74
Compare
…ations and the scale factor in order not to increase the reprojection error more than a given ratio
423ed74 to
e319ce3
Compare
|



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
SfM Temporal Filtering Enhancements
SfMTemporalFilteringnode, allowing users to limit reprojection error during filtering. New parameters includelimitReprojError,maxErrorIncreasePos,maxErrorIncreaseRot,minIterationCount, andminScaleFactor, all of which provide finer control over the filtering process. The command-line interface and node UI have been updated accordingly.Bundle Adjustment and Solver Iteration Control
maxIterationCountparameter 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.IterationInfos) that logs the cost and cost change at each iteration, and ensured that solver progress is updated every iteration.Version Updates
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.