opencv(六):图像拼接
程序员文章站
2022-05-16 10:37:14
...
import numpy as np
import cv2
from cv2 import Stitcher
if __name__ == "__main__":
img1 = cv2.imread('jj.jpg')
img2 = cv2.imread('gg.jpg')
stitcher = cv2.createStitcher(False)
# stitcher = cv2.Stitcher.create(cv2.Stitcher_PANORAMA), 根据不同的OpenCV版本来调用
(_result, pano) = stitcher.stitch((img1, img2))
pano = cv2.resize(pano,(600,400))
print(pano)
cv2.imshow('pano',pano)
cv2.waitKey(0)
cv2.destroyAllWindows()
上一篇: opencv自带之图像拼接
下一篇: js实现简易垂直滚动条