OpenCV图像拼接从未完成

时间:2019-06-18 01:38:49

标签: python opencv image-processing

一个奇怪的问题:

4.1版中的

cv2.Stitcher_create()和3.4.5版中的cv2.createStitcher()均无法使用提供的图像运行。

enter image description here

enter image description here

import cv2

im1 = cv2.imread("C:\\Users\\David\\Pictures\\koala\\g1.jpg")
im2 = cv2.imread("C:\\Users\\David\\Pictures\\koala\\g2.jpg")

print("Stitch create")
stitcher = cv2.Stitcher_create()
print("Stitch begin")
(status, stitched) = stitcher.stitch([im1, im2])
print("Stitch end")

该代码将永远不会继续经过stitcher.stitch函数调用。 TaskManager告诉我python正在最大化单个内核,所以它正在做某事,但是对于2x 140kb图像,我不希望这花费超过3-4秒的时间?

我尝试在jupyter实验室,ipython中直接通过控制台运行以上代码。我试过使用pipenv制作新的虚拟环境,并剥离所有程序包以最少运行。我已经尝试过使用8位.tif文件,.png文件,.jpg文件,其他图像,并且似乎没有任何效果。

我的图形驱动程序有问题吗?

0 个答案:

没有答案
相关问题