Ask Your Question

Revision history [back]

I too have this issue - using 4.0.1-openvino

my code:

import cv2
import numpy as np

img = cv2.imread('image1.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")

Not sure what I'm doing wrong, either.