error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'drawKeypoints'> Overload resolution failed:> - Expected cv::KeyPoint for argument 'keypoints'> - Expected cv::KeyPoint for argument 'keypoints'
以上为报错情况
----------------------------------------------------------------------------------------------------------------
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.drawKeypoints(imagre1,imagre,None,color=(255,0,255))
dest = cv2.drawMatchesKnn(imagre1,imagre,None,flags=2)
以上为使用的代码
-----------------------------------------------------------------------------------------------------------------
如果将none替换为outimage会出现查询不到outimage函数的报错
如图
报name 'outimage' is not defined时使用的代码为
img = cv2.drawKeypoints(imagre1,imagre,outImage,color=(255,0,255))
代码贴完整,看着报错只能知道说你的outputimg未定义,而且你的keypoints参数在哪里?你怎么拿到的?你确定你的image是keypoints?