Skip to content

Make view graph calibration a standalone module#4143

Merged
ahojnnes merged 4 commits into
mainfrom
user/jsch/vgc-standalone
Feb 26, 2026
Merged

Make view graph calibration a standalone module#4143
ahojnnes merged 4 commits into
mainfrom
user/jsch/vgc-standalone

Conversation

@ahojnnes

Copy link
Copy Markdown
Contributor

No description provided.

@ahojnnes ahojnnes marked this pull request as ready for review February 25, 2026 18:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ahojnnes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the view graph calibration process in COLMAP, making it a distinct and independent module. Previously integrated within the GlobalPipeline, calibration is now automatically executed by the AutomaticReconstructionController when initiating a global reconstruction. The GlobalPipeline itself has been streamlined to focus solely on mapping, with added checks to warn users if camera focal length priors are insufficient, guiding them to use the dedicated view_graph_calibrator if needed. This change improves modularity and clarifies the responsibilities of different components within the reconstruction pipeline.

Highlights

  • Modularity: View graph calibration is now a standalone module, decoupled from the GlobalPipeline.
  • Automatic Execution: The AutomaticReconstructionController now automatically invokes view graph calibration when using the global mapper.
  • Global Pipeline Behavior: The GlobalPipeline no longer performs calibration internally but instead checks for sufficient focal length priors and issues warnings if they are lacking.
  • Documentation and Options: Documentation and command-line options have been updated to reflect these changes and guide users on the new workflow.
  • Camera Prior Flag: The has_prior_focal_length flag in Camera objects is now explicitly set by the view graph calibration process.
Changelog
  • doc/cli.rst
    • Updated global_mapper description to advise running view_graph_calibrator if focal length priors are poor.
    • Clarified view_graph_calibrator's role as a prerequisite for global_mapper when intrinsics are unknown.
  • src/colmap/controllers/automatic_reconstruction.cc
    • Included view_graph_calibration.h.
    • Added a call to CalibrateViewGraph within the GLOBAL mapping case, passing relevant options.
  • src/colmap/controllers/global_pipeline.cc
    • Introduced helper functions HasInsufficientPriorFocalLengths and WarnInsufficientPriorFocalLengths.
    • Removed the internal execution of view graph calibration from GlobalPipeline::Run().
    • Added checks and warnings for insufficient focal length priors at the start and end of GlobalPipeline::Run().
  • src/colmap/controllers/global_pipeline.h
    • Removed the include for view_graph_calibration.h.
    • Removed skip_view_graph_calibration and view_graph_calibration options from GlobalPipelineOptions.
  • src/colmap/controllers/global_pipeline_test.cc
    • Included view_graph_calibration.h.
    • Modified GlobalPipeline tests to explicitly call CalibrateViewGraph before pipeline execution.
  • src/colmap/controllers/option_manager.cc
    • Removed command-line options related to skip_view_graph_calibration and view_graph_calibration from GlobalMapper settings.
  • src/colmap/estimators/view_graph_calibration.cc
    • Set camera.has_prior_focal_length to true for cameras whose focal lengths are calibrated.
  • src/colmap/estimators/view_graph_calibration_test.cc
    • Set camera.has_prior_focal_length to false before calibration in tests.
    • Added an assertion to verify camera.has_prior_focal_length is true after successful calibration.
  • src/colmap/scene/camera.h
    • Updated the comment for has_prior_focal_length to include view graph calibration as a source for good priors.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request successfully refactors the view graph calibration into a standalone module, decoupling it from the global mapper. This is a good architectural improvement that enhances modularity. The changes are consistent across the documentation, application logic, and tests. I have one minor suggestion to avoid a redundant warning message.

Comment thread src/colmap/controllers/global_pipeline.cc
Comment thread src/colmap/estimators/view_graph_calibration_test.cc

@B1ueber2y B1ueber2y 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.

Thank you!

Comment thread src/colmap/controllers/global_pipeline.cc Outdated
Comment thread src/colmap/estimators/view_graph_calibration_test.cc
Comment thread src/colmap/estimators/view_graph_calibration_test.cc
@ahojnnes ahojnnes merged commit 65301f4 into main Feb 26, 2026
15 of 23 checks passed
@ahojnnes ahojnnes deleted the user/jsch/vgc-standalone branch February 26, 2026 09:53
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.

3 participants