Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6462 Discussions

drawKeypoints missing from 4.0.1-openvino CV2?

Norman__Michael
Beginner
615 Views

Has anyone tried to use drawKeypoints on the opencv that comes with the toolkit? 

It seems to be missing drawKeypoints!

my code:

 

import cv2

import numpy as np

 

img = cv2.imread('traffic1.jpg')

img_brisk = img.copy()

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

 

brisk = cv2.BRISK_create()

 

(kps5, descs5) = brisk.detectAndCompute(gray, None)

cv2.DrawMatchesFlags_DRAW_RICH_KEYPOINTS

cv2.drawKeypoints(gray, kps5, img_brisk, kps5, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

 

cv2.namedWindow('Test', cv2.WINDOW_NORMAL)

cv2.imshow('Test', img_brisk)

cv2.resizeWindow('Test', 600,600)

 

k = cv2.waitKey(0) & 0xFF

 

if k == 27: # wait for ESC key to exit

cv2.destroyAllWindows()

else:

print("Exit")

 

 

0 Kudos
1 Reply
Dmitry_K_Intel3
Employee
615 Views

Please use help(cv2.drawKeypoints) to check method's arguments.

 

cv2.drawKeypoints(gray, kps5, img_brisk, kps5, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

does not match python signature:

 

outImage=cv.drawKeypoints(image, keypoints, outImage[, color[, flags]])

 

source: https://docs.opencv.org/4.0.1/d4/d5d/group__features2d__draw.html#ga5d2bafe8c1c45289bc3403a40fb88920

0 Kudos
Reply