opencv的stitcher可以实现
import sys原图两张:
import cv2
if __name__ == "__main__":
img1 = cv2.imread('/img/1.jpg') # 图片绝对路径,
img2 = cv2.imread('/img/2.jpg')
# stitcher = cv2.createStitcher(False) # 老的OpenCV版本,用这一个
stitcher = cv2.Stitcher.create(cv2.Stitcher_PANORAMA) # 我的是OpenCV4
(status, pano) = stitcher.stitch((img1, img2))
if status != cv2.Stitcher_OK:
print("不能拼接图片, error code = %d" % status)
sys.exit(-1)
print("拼接成功.")
cv2.imshow('pano', pano)
# cv2.imwrite("pano.jpg", pano)
cv2.waitKey(0)


拼接后的

网友回复
如何让ai帮我自动在小红书或抖音上自动根据需求截流与潜在客户聊天拉客?
如果用go编写一个在virtualbox中启动的简单操作系统?
go如何搭建一个零信任网络?
如何用python实现一个公网代理访问软件?
如何用go实现一个公网代理访问软件?
如何用python实现一个内网穿透打洞程序,实现内网的80端口暴露到公网上可以访问?
如何用go实现一个内网穿透打洞程序,实现内网的80端口暴露到公网上可以访问?
何为Shadowsocks 代理?
python如何实现类似php的opendir目录相互隔离的fastcgi多租户虚拟空间?
nodejs如何实现类似php的opendir目录相互隔离的fastcgi多租户虚拟空间?


