我尝试运行所示的示例代码ORB
in the openCV
页。首先我必须弄清楚问题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)
。它终于运行良好,但我想知道为什么只能这样运行而不是按照官方页面所述的方式运行。
BR.
它的语法是cv2.drawKeypoints()
函数,至少对于OpenCV 3.x
.
如果你执行help(cv2.drawKeypoints)
after import cv2
,您将得到下面的内容,这是不言自明的。
Help on built-in function drawKeypoints:
drawKeypoints(...)
drawKeypoints(image, keypoints, outImage[, color[, flags]]) -> outImage
The pos(3)
是输出图像,outImage
, 予以退回。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)