Skip to content

Make view graph calibration a stand-alone estimator module on colmap::Database and add CLI. #3951

Merged
B1ueber2y merged 20 commits intomainfrom
shaohui/migrate_vgc
Jan 6, 2026
Merged

Make view graph calibration a stand-alone estimator module on colmap::Database and add CLI. #3951
B1ueber2y merged 20 commits intomainfrom
shaohui/migrate_vgc

Conversation

@B1ueber2y
Copy link
Copy Markdown
Contributor

@B1ueber2y B1ueber2y commented Jan 5, 2026

This PR includes:

  • Make view graph calibration work on database instead of reconstruction and ViewGraph. Add CLI.
  • Move view graph calibration into colmap/estimators. Add nominal tests that can pass with the current cost functor.
  • Move view graph calibration out of the global mapper into GlobalPipeline, to be further moved out as a stand-alone module inside automatic reconstructor in the future.
  • With the simplified global mapper, we can remove the dependency of global mapper in the tests of rotation averaging and gravity refinement and move them to glomap/estimators.

@B1ueber2y B1ueber2y marked this pull request as draft January 5, 2026 17:45
if (!problem.HasParameterBlock(&(focals[camera_id]))) continue;

num_cameras++;
problem.SetParameterLowerBound(&(focals[camera_id]), 0, 1e-3);
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.

Extract 1-e3 as a constexpr?

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.

Surprised we are not setting an upper bound.

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.

Also wondering whether it makes sense to bound the parameter using options.min_focal_length_ratio/options.max_focal_length_ratio?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Lets for now extract 1e-3 as a constexpr and keep it as it is, to keep the logic equivalent, as bounding the parameter directly may end up not reverting those diverged focals (not sure if there are any). Maybe this can be resolved by checking whether the focal lengths are exactly at the boundary after optimization, but this needs some studies and goes beyond the scope of this PR.

@B1ueber2y B1ueber2y requested a review from ahojnnes January 6, 2026 13:40
@B1ueber2y B1ueber2y merged commit 372d3a9 into main Jan 6, 2026
14 checks passed
@B1ueber2y B1ueber2y deleted the shaohui/migrate_vgc branch January 6, 2026 15:41
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