-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Description
system windows 10 msvc 2017 python 3.6.6
Hi,
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
import cv2
import numpy as np
def draw_keypoints(vis, keypoints, color = (0, 255, 255)):
for kp in keypoints:
x, y = kp.pt
cv2.circle(vis, (int(x), int(y), 2, color))
input_image = cv2.imread('lena.jpg')
if input_image is None:
print("check file path")
exit()
gray_image = cv2.cvtColor(input_image, cv2.COLOR_BGR2GRAY)
orb = cv2.ORB_create()
keypoints = orb.detect(gray_image, None)
keypoints, descriptor = orb.compute(gray_image, keypoints)
t= cv2.drawKeypoints(input_image, keypoints, outImage=input_image, color=(0,255,0),
flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
cv2.imshow('ORB keypoints', input_image)
cv2.waitKey()
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
Metadata
Metadata
Assignees
Labels
No labels