我尝试运行openCV页面中展示的ORB
的示例代码。首先要解决的问题是cv2.ORB()
(改为cv2.ORB_create()
),之后出现了以下错误:
Traceback (most recent call last):
File "orb.py", line 17, in <module>
img2 =cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
TypeError: Required argument 'outImage' (pos 3) not found
在阅读了很多博客和手册后,我决定将 img
添加到这个函数中 img2 =cv2.drawKeypoints(img,kp,img,color=(0,255,0), flags=0)
,因为出现了 pos(3)
的错误。最终它运行良好,但我想知道为什么只有这种方式可以运行而不是官方页面上所述的方式。
敬礼。