内裤里有糖吃 发表于 2020-7-30 20:25:21

python用不了from Stitcher import Stitcher

想试一下python图像拼接,用的pycharm,装了opencv,为什么还是报错“ModuleNotFoundError: No module named 'Stitcher'


from Stitcher import Stitcher
import cv2

#读取图片
imageA=cv2.imread('cc1.png')
imageB=cv2.imread('cc2.png')

##把图片拼接
stitcher=Stitcher()
(result,vis)=stitcher.stitch(,showMatches=True)

##显示所有图片
cv2.imshow('ImageA',imageA)
cv2.imshow('ImageB',imageB)
cv2.imshow('Keypoint',result)
cv2.waitKey(0)
cv2.destroyAllWindows()

livcui 发表于 2020-7-30 20:26:19

本帖最后由 livcui 于 2020-7-30 20:31 编辑

from cv2 import Stitcher
根本没装这库
from cv2 import Stitcher
import cv2

#读取图片
imageA=cv2.imread('cc1.png')
imageB=cv2.imread('cc2.png')

##把图片拼接
stitcher=Stitcher()
(result,vis)=stitcher.stitch(,showMatches=True)

##显示所有图片
cv2.imshow('ImageA',imageA)
cv2.imshow('ImageB',imageB)
cv2.imshow('Keypoint',result)
cv2.waitKey(0)
cv2.destroyAllWindows()


livcui 发表于 2020-7-30 20:27:24

现在的用户名都这么...
页: [1]
查看完整版本: python用不了from Stitcher import Stitcher