cv2。天体探测与计算退出python

2024-06-09 20:12:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我真的不知道这里发生了什么,因为我从没见过这样的事情发生。我正在为一个学校的项目做一个程序,我运行了我的代码,但什么也没发生,在代码中的某个点之后,程序就退出了,没有错误代码或任何东西。你知道吗

我确定没有什么应该抛出错误,重新启动我的电脑,以及卸载和重新安装OpenCV,但没有任何工作。你知道吗

img = process("image.jpg") #loads image using cv2.imread and converts to rgb
ih, iw = img.shape[:-1]
img10 = process("img10Test1.jpg")
h, w = img10.shape[:-1]

print("mark 1") #debugging
kp, des = orb.detectAndCompute(img, None)
kp10, des10 = orb.detectAndCompute(img10, None)
print("mark 2") #debugging
matches = bf.match(des, des10)
matches = sorted(matches, key=lambda x:x.distance)

我的输出显示:

mark 1

=============================== RESTART: Shell ===============================
>>>

为什么是天体探测与计算什么都不做?你知道吗


Tags: 代码image程序imgprocessjpgmarkprint