标签 opencv 下的文章

解决cv2.drawMatches函数不存在的问题


起步

cv2.drawMatches这个函数在OpenCV 2.4.12中不存在。3.0以后才提供。所以运行时得到这样的报错:

Traceback (most recent call last):
File "match.py", line 22, in <module>
img3 = cv2.drawMatches(img1,kp1,img2,kp2,matches[:10], flags=2)
AttributeError: 'module' object has no attribute 'drawMatches'