Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combine two or more images that partially overlap

Having two or more images that partially overlap, like in this screenshot, I want to combine/merge them into one:

overlapping images

The coloured squares would be the source images, in lossless format, and no rotation is required.

The result I want is like using the "Auto-Blend Layers" command from Adobe Photoshop, so auto-align and auto-blend is performed automatically:

https://helpx.adobe.com/photoshop/using/combine-images-auto-blend-layers.html

like image 563
Smeterlink Avatar asked Dec 22 '17 07:12

Smeterlink


People also ask

How do you overlap multiple pictures?

You can easily put a photo on top of another photo using Fotor, a free online photo editor. Simply drag and drop the image you want to overlay into Fotor- this will become your background picture. Then add a new image over it. You can adjust the transparency levels to blend two images together perfectly.

What is overlap images?

But what does it mean by “overlap”? Overlap contains both the front-overlap (frontlap) and side-overlap (sidelap). Sidelap refers to the percentage of overlap between different flight legs. Just as the below picture shows, the same size of image (which is represented by the rectangle) is captured on each spot.

What is combining multiple images?

What is Compositing? Photo compositing is when you combine elements from multiple images, in order to create a brand new image. Compositing can be tricky to do, but it's a lot of fun!


1 Answers

Thank you all for the comments. The software that suits best in this case is OpenCV with the cv::Stitcher API as @aergustal pointed out. It works extremely well provided that pictures have a decent overlapping, otherwise the following error will be displayed:

Can't stitch images, error code = 1

Note that to be able to use the ./cpp-example-stitching command, you have to compile it from source code. Even Windows doesn't come with it precompiled, at least the version I've downloaded. More information:

High level stitching API (Stitcher class)

like image 70
Smeterlink Avatar answered Nov 12 '22 12:11

Smeterlink