stitchers done (maybe)

This commit is contained in:
2023-11-06 20:27:01 +02:00
parent c20af9c16d
commit ad64947081
6 changed files with 16 additions and 0 deletions

16
stitchers/stitch.py Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
import cv2
img1 = cv2.imread('1.jpg')
img2 = cv2.imread('2.jpg')
img3 = cv2.imread('3.jpg')
img4 = cv2.imread('4.jpg')
img_list = [img1, img2, img3, img4]
stitcher = cv2.Stitcher_create()
result, stitched_img = stitcher.stitch(img_list)
if result == cv2.STITCHER_OK:
cv2.imshow('image', stitched_img)
cv2.imwrite('stitched2.jpg', stitched_img)
cv2.waitKey(0)