cv2.ORB.detectAndCompute退出python

cv2.ORB.detectAndCompute退出python,python,opencv,Python,Opencv,我真的不知道这里发生了什么,因为我从未见过这样的事情发生。我当时正在为一个学校项目编写一个程序,我运行了我的代码,但什么也没发生,在代码中的某个点之后,程序刚刚退出,没有错误代码或其他任何东西 我确保没有任何东西会抛出错误,并重新启动了我的计算机以及卸载和重新安装OpenCV,但没有任何效果 img = process("image.jpg") #loads image using cv2.imread and converts to rgb ih, iw = img.shape[:-1] im

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

我确保没有任何东西会抛出错误,并重新启动了我的计算机以及卸载和重新安装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 ===============================
>>>

为什么orb.detectAndCompute什么都不做?

您在哪里创建了orb检测器
orb=cv2.orb_create()
?您的代码假定这是创建的,但找不到它。