Anil Nishad
Anil Nishad

Reputation: 11

Combining Images Taken from Fixed Distance with Different Top and Bottom Distances

Question:

I have six thermal images taken at an angle, and I'm trying to stitch them into one seamless image without any overlapping areas. The images are named sequentially from 11.jpg to 16.jpg. The images are not taken horizontally; they are captured at an angle, which is causing difficulties in stitching them correctly.

The images can be accessed here.

Details:

Each image's top part is at an x distance and the bottom part is at a y distance and top part is far from bottom distance.

Attempted Solution:

I have attempted to use Python's OpenCV Stitcher library, but it did not work as expected.

import cv2
from cv2 import Stitcher

# List of images
images = ['11.jpg', '12.jpg', '13.jpg', '14.jpg', '15.jpg', '16.jpg']

# Read images
imgs = [cv2.imread(img) for img in images]

# Initialize stitcher
stitcher = Stitcher.create()

# Perform stitching
(status, stitched) = stitcher.stitch(imgs)

# Check if successful
if status == cv2.Stitcher_OK:
    cv2.imwrite('stitched.jpg', stitched)
else:
    print('Stitching failed: ', status)

I tried second approach of cutting and cropping images which is not overlapping area to previous image part but it does not give output as expected

the output image link is here

My Goal:

To stitch all six images into one continuous image with perfect alignment and no overlapping areas.

Question:

How can I accurately stitch these angled thermal images into one seamless image using Python? Are there any specific techniques or tools that can handle images taken at an angle more effectively?

Any advice or examples would be greatly appreciated!

Upvotes: 1

Views: 45

Answers (0)

Related Questions