OpenStitching / stitching

A Python package for fast and robust Image Stitching
Apache License 2.0
1.99k stars 156 forks source link

Feature request - improve matches graph #54

Closed Kalo0m closed 1 year ago

Kalo0m commented 1 year ago

Hi guys,

Firstly thank you all for you amazing work. I would like to have your thoughts on a new feature (afaik not available for now).

I have a list of ten images and I know the order of them, it would be nice to pass this order in order to override confidence_threshold and get the right graph. Of course it would be an option.

Example: I have 3 photos (A, B and C) and I know the exact order (B --> C --> A). instead of letting the package find the order and maybe be wrong (for example by rejecting A of the result graph), I could pass the graph below as an option to bypass the graph generation.

graph matches_graph{ "B" -- "C" "C" -- "A" }

Sorry if I'm not clear, I would like to contribute so what do you think ? Do you have any suggestions ?

lukasalexanderweber commented 1 year ago

I have good news for you: It's already a feature.

stitch b.jpg c.jpg a.jpg --range_width 1 --confidence_threshold 0

should do the trick. See also https://github.com/lukasalexanderweber/stitching/issues/14

lukasalexanderweber commented 1 year ago

I admit that it is not well documented, maybe we should include it in the stitching_tutorial

Kalo0m commented 1 year ago

Nice! I will take a look thanks a lot

Kalo0m commented 1 year ago

you can also explain what's range_width and what is its impact

lukasalexanderweber commented 1 year ago

setting it to 1 [...] force it to only consider adjacent pairs (e.g. pair 1-2 would have a confidence but pair 1-3 would not)

Setting it to 1 basically just means that that it only looks for matches in images directly to its left or right. 2 would mean 2 images left or right...

All based on the order of the images passed into Stitcher.stitch()

Kalo0m commented 1 year ago

And another question, (idk if it's the right place) can the generated image be a spherical photo (in order to put it in a 360 visualizer)?

lukasalexanderweber commented 1 year ago

at least there is a spherical warper

phamkhactu commented 10 months ago

stitch b.jpg c.jpg a.jpg --range_width 1 --confidence_threshold 0

Hi @lukasalexanderweber, @Kalo0m

Suppose that I have 5 images: "A, B, C, D, E"

I know matches_graph as below:

A --> B 
A --> D
B --> C
B --> D
D --> E 

As you suggestion I followed in tutorial

I see that, maybe matches_graph is matches_graph_dot_file in Subset parameters ?

Subsetter(confidence_threshold=1, matches_graph_dot_file=None)

I saw in matches_graph have [label="Nm=68, Ni=19, C=0.669014"]. What is the master if I don't have label, Ni, C parameters? And if I use fastest function

 panorama = stitcher.stitch(weid_imgs)

as you summary, Can I put matches_graph for creating adjacent panorama as I expect?

lukasalexanderweber commented 10 months ago

please use the discussions for questions