I have a bunch of images in a folder that are effectively just pieces of one image that was broken into overlapping parts. How can I quickly and programmatically recombine these images to create the original image?
I would prefer a solution that uses python or mathematica (or is an existing application), but I am open to other ideas as well (I am fairly proficient with Java).
Image stitching or photo stitching is the process of combining multiple photographic images with overlapping fields of view to produce a segmented panorama or high-resolution image.
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.
i realize this answer comes very late, but since i spent some time googling this problem, i thought i would post a fairly simple solution using python.
import cv2
#works in version 4.2
cv2.__version__
#mode=0 photos, mode=1 scans
stitcher = cv2.Stitcher.create(mode=1)
img1 = cv2.imread("frame-0021.png")
img2 = cv2.imread("frame-0022.png")
result = stitcher.stitch((img1, img2))
cv2.imwrite("stitched.png", result[1])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With