krupkat / krupkat/xpano

Stitching scans

Open
#106 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
C++
Stars
377
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Add support for stitching scans (https://docs.opencv.org/4.x/d2/d8d/classcv_1_1Stitcher.html#a114713924ec05a0309f4df7e918c0324ac706a6a118a4a648fef8b2fca5950e2a):

### Howto
The value is selected here: https://github.com/krupkat/xpano/blob/dee2e45635bf9ebaa88b8f098bf8378765f653be/xpano/algorithm/algorithm.cc#L234

Extend stitching user options with a new enum (panorama / scans): https://github.com/krupkat/xpano/blob/dee2e45635bf9ebaa88b8f098bf8378765f653be/xpano/algorithm/options.h#L82
- the new enum will need a `Label` function and a constant array with all values, please check the other examples

Add a widget to select the value in gui (use `utils::imgui::ComboBox` for selecting an enum value): https://github.com/krupkat/xpano/blob/dee2e45635bf9ebaa88b8f098bf8378765f653be/xpano/gui/panels/sidebar.cc#L301

If Scans mode is selected
- disable projection types widget + wave correction in the gui
- add an if statement in the [Stitch](https://github.com/krupkat/xpano/blob/dee2e45635bf9ebaa88b8f098bf8378765f653be/xpano/algorithm/algorithm.cc#L232) function when setting up stitcher and set the values according to [stitcher.cc](https://github.com/krupkat/xpano/blob/dee2e45635bf9ebaa88b8f098bf8378765f653be/xpano/algorithm/stitcher.cc#L178C5-L188)

### Stretch goal
Test on real scans, compare the two modes and add the images to the PR.

Contributor guide

Open the contributing guide

Research direction

Start with xpano/algorithm/options.h and the Stitch function in xpano/algorithm/algorithm.cc, then trace the existing enum patterns and stitcher setup in xpano/algorithm/stitcher.cc. Update the selection UI in xpano/gui/panels/sidebar.cc and verify that Scans mode disables projection and wave correction while configuring the OpenCV stitcher accordingly. Done means both Panorama and Scans modes can be selected and produce the intended behavior; testing on real scans is a stretch goal.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, opencv
Domain
computer-vision, desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.