Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masking #70

Open
krupkat opened this issue Apr 8, 2023 · 4 comments
Open

Masking #70

krupkat opened this issue Apr 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@krupkat
Copy link
Owner

krupkat commented Apr 8, 2023

Based on a comment by @hqhoang in #18 (comment)

Experiment with masking

  • create gui for creating a mask for an input image
  • get example images to test on
  • experiment with customizing the masks argument in GraphCutSeamFinder called inside composePanorama
@krupkat krupkat added the enhancement New feature or request label Apr 8, 2023
@hqhoang
Copy link

hqhoang commented Apr 8, 2023

See if these sets can be used as samples/tests, they're my typical handheld with people moving around between shots.
https://drive.google.com/drive/folders/1XaXGKxIWp7a9hBz5uZd3h4Vx5l2YA2ts

@flightmansam
Copy link

This is a really really good idea! I'd love to help where I can.

@krupkat
Copy link
Owner Author

krupkat commented Jun 16, 2024

Cool!

This depends a lot on your level of expertise, some opportunities I see with ascending difficulty :)

  1. gather example images, something that would be useful for this feature, e.g. that was hard to stitch properly in other software. Various combinations, a simple 2 image stitch, 3 image, horizontal, vertical, multiple overlaps (e.g. 4 images in a square grid, where they all overlap in the center)

  2. prepare a mock of the gui / some idea how it would work, we'll need to be able to draw some constraints over each image individually, to be able to specify which parts to include / exclude, then calculate the result

  3. dive into the opencv implementation of the graph cut seam finder:
    https://github.com/opencv/opencv/blob/7ff531b8ab57df6a63a2524f3a911663a3eb5457/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp#L240
    https://github.com/opencv/opencv/blob/7ff531b8ab57df6a63a2524f3a911663a3eb5457/modules/stitching/src/seam_finders.cpp#L1108
    https://github.com/opencv/opencv/blob/4.x/modules/imgproc/include/opencv2/imgproc/detail/gcgraph.hpp
    a fork of the code will be necessary with a way to supply the constraints from part 2) these constraints will be encoded in the graph . google the term "graphcut segmentation" for more details

@flightmansam
Copy link

Thanks Krupkat! I'll have a think on it and see what I get up to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants