Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add mapper selection (incremental/global/hierarchical) to the GUI#4487

Merged
ahojnnes merged 4 commits into
maincolmap/colmap:mainfrom
user/jsch/mapper-guicolmap/colmap:user/jsch/mapper-guiCopy head branch name to clipboard
Jul 2, 2026
Merged

Add mapper selection (incremental/global/hierarchical) to the GUI#4487
ahojnnes merged 4 commits into
maincolmap/colmap:mainfrom
user/jsch/mapper-guicolmap/colmap:user/jsch/mapper-guiCopy head branch name to clipboard

Conversation

@ahojnnes

@ahojnnes ahojnnes commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Previously the COLMAP GUI could only run the incremental mapper. This PR adds a drop-down in the reconstruction options to select the incremental, global, or hierarchical mapper, with rendering behavior appropriate to each.

Behavior

  • Incremental — unchanged live rendering (per initial pair / image / sub-model).
  • Global — renders after global positioning and after each refinement (each bundle-adjustment iteration and retriangulation). Pause/Step are supported between stages.
  • Hierarchical — renders only the final merged reconstruction (clusters reconstruct in separate managers). Pause/Step are disabled.

The reconstruction options dialog now switches the displayed option tabs based on the selected mapper, exposing dedicated global and hierarchical option panels (the hierarchical page reuses the incremental tabs, since each cluster is reconstructed with the incremental options, plus a tab for the clustering/worker options).

Implementation notes

  • MainWindow::mapper_controller_ is now a polymorphic std::unique_ptr<Thread>; CreateControllers() builds the selected pipeline and wires the appropriate render callbacks.
  • Added an optional progress callback to GlobalMapper::Solve / IterativeBundleAdjustment, and a GlobalPipeline::MODEL_UPDATE_CALLBACK. The global pipeline now adds its reconstruction to the manager up front and renders intermediate states (this also removes a full reconstruction copy that previously happened at the end).
  • Promoted HierarchicalPipeline::Options to a top-level HierarchicalPipelineOptions (mirroring GlobalPipelineOptions) and registered it in OptionManager via AddHierarchicalMapperOptions(), shared by the GUI and the hierarchical_mapper CLI. Note: the hierarchical_mapper CLI flags are now HierarchicalMapper.*-prefixed (was --num_workers, --image_overlap, --leaf_max_num_images), consistent with Mapper.* / GlobalMapper.*.
  • Added OptionsWidget::AddOptionIntUnlimited to handle INT_MAX "unlimited" sentinels (e.g. track_required_tracks_per_view, keep_max_num_tracks), shown/edited as -1, fixing a QSpinBox overflow.

The mapper selection itself is a GUI-session setting (not written to the project .ini), consistent with how the global mapper options are handled.

Testing

image

Previously the GUI could only run the incremental mapper. This adds a
drop-down in the reconstruction options to select the incremental, global,
or hierarchical mapper, with rendering behavior appropriate to each:

- Incremental: unchanged live rendering (per pair / image / sub-model).
- Global: renders after global positioning and after each refinement
  (BA iteration and retriangulation), supporting pause/step between stages.
- Hierarchical: renders only the final merged reconstruction; pause/step
  are disabled.

The options dialog now switches the displayed option tabs based on the
selected mapper, exposing dedicated global and hierarchical options.

Supporting changes:
- Add optional progress callback to GlobalMapper::Solve and
  IterativeBundleAdjustment; expose GlobalPipeline::MODEL_UPDATE_CALLBACK.
- Promote HierarchicalPipeline::Options to a top-level
  HierarchicalPipelineOptions and register it in OptionManager via
  AddHierarchicalMapperOptions (shared by the GUI and CLI). The
  hierarchical_mapper CLI flags are now HierarchicalMapper.*-prefixed.
- Add OptionsWidget::AddOptionIntUnlimited for INT_MAX "unlimited"
  sentinels, fixing QSpinBox overflow.
Comment thread src/colmap/exe/sfm.cc
Comment thread src/colmap/sfm/global_mapper.cc
Comment thread src/colmap/ui/reconstruction_options_widget.h
Comment thread src/colmap/ui/main_window.cc Outdated
@ahojnnes ahojnnes added the breaking Indicates a breaking change. label Jul 2, 2026
@ahojnnes
ahojnnes merged commit 255c6b7 into main Jul 2, 2026
14 checks passed
@ahojnnes
ahojnnes deleted the user/jsch/mapper-gui branch July 2, 2026 09:55
@ahojnnes ahojnnes mentioned this pull request Jul 17, 2026
3 tasks
ahojnnes added a commit that referenced this pull request Jul 17, 2026
Prepares the **4.1.1** patch release by cherry-picking important
bug/build fixes that landed on `main` since `4.1.0`, plus one
previously-unmerged fix. Features, refactors, algorithm changes,
benchmarks, docs-site infra, and dependency upgrades from `main` are
intentionally excluded.

### Included fixes

**Bug / correctness**
- Fix feature matching slowdown from process-global omp critical in
RANSAC (#4553) — restores the ~4–6x matching perf regressed in 4.1.0
- Fix: rescale already-undistorted images when `max_image_size` is
provided (#4512)
- Load mapper database lazily instead of at GUI startup (#4501) *(see
note below)*
- Show image/point viewer metadata when images are missing on disk
(#4546)

**Build / packaging**
- Fix missing SVG icons in Windows binaries (#4496)
- Fix Caspar CUDA build with MSVC forced includes (#4481)
- Fail Caspar build early on CUDA arch < 7.0 (#4495)
- Fix glog color support version detection (#4479)

**GUI**
- Tint UI icons to palette for dark theme legibility (#4478)

**Docs**
- Document quaternion order (wxyz vs xyzw) in `read_rig_config` binding
(#4526)
- Fix stale usage example in `IncrementalMapper` doc comment (#4531)
- Add Fedora build instructions to `install.rst` (#4509)
- Fix typos in user-facing help string and FAQ (#4549)

**Previously unmerged**
- Fix misspelled pycolmap enum name `GPSTransfromEllipsoid` →
`GPSTransformEllipsoid` (#4551)

### ⚠️ Breaking change
#4551 removes `pycolmap.GPSTransfromEllipsoid` (present since ≤4.1.0)
with **no** backward-compatible alias. Downstream code must switch to
`pycolmap.GPSTransformEllipsoid`. This is unusual for a patch release
and must be highlighted in the 4.1.1 release notes.

### Notes
- #4501 required a manual conflict resolution: it was authored on top of
the GUI mapper-selection feature (#4487), which is **not** part of this
patch. The dependency on `UpdateMapperControls()` / `mapper_type_` was
removed and replaced with the 4.1.0 baseline's existing control-state
handling; the net behavior (no database read at GUI startup / project
reset) is preserved.
- All other commits cherry-picked cleanly (`-x` references retained).

### Still TODO before tagging
- [ ] Version bump to 4.1.1
- [ ] CHANGELOG entry (incl. the breaking-change callout)
- [ ] Full build + test run across platforms (CI)

---------

Co-authored-by: WhuAegeanSea <whuaegeansea@gmail.com>
Co-authored-by: Shaohui Liu <b1ueber2y@gmail.com>
Co-authored-by: Behnam Asadi <behnam.asadi@gmail.com>
Co-authored-by: Mohammad Ali <m.aliadnanrauf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Indicates a breaking change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.