Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem with cv2.drawKeypoints in version 126.96.36.199 #168
system windows 10 msvc 2017 python 3.6.6
It seems that some users have got some problem with drawKeypoints (http://answers.opencv.org/question/206950/function-drawkeypoints-do-not-work-in-opencv-401/ and http://answers.opencv.org/question/207758/drawkeypoints-bug/) using this code
Error is AttributeError: module 'cv2.cv2' has no attribute 'drawKeypoints'
If i use my own version opencv-python there is no problem. Something is wrong but what ?
may be opencv/opencv#10250
referenced this issue
Feb 3, 2019
Thanks for your work on
I encounter the same issue.
In the meantime, I have worked around the issue by editing my code: I have replaced each call to
For instance, in the tutorial:
img2 = cv.drawKeypoints(img, kp, None, color=(0,255,0), flags=0) plt.imshow(img2), plt.show()
img2 = img.copy() for marker in kp: img2 = cv.drawMarker(img2, tuple(int(i) for i in marker.pt), color=(0, 255, 0)) plt.imshow(img2), plt.show()
Could you let me know how to reach this version '188.8.131.52' please ?
I mean that the compilation fails in this repository (due to homebrew issues on Travis) on macOS. This drawKeypoints issue should be fixed if you compile OpenCV 4.0.1 manually. I have to release all the builds (Windows, macOS, Linux) simultaneosly to PyPi to avoid breaking millions of installations. There are no build issues currently with Windows or Linux builds.
Below code worked for me after modifying drawKeypoints as suggested by @woctezuma