def draw_image_with_keypoints(img: np.ndarray, keypoints, window_title: str ="Image with keypoints") -> None:
"""An apparently unused method which is actually quite useful when debugging!"""
# cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS ensures the size of the circle corresponds to the size of blob
img_with_keypoints = cv2.drawKeypoints(img, keypoints, outImage=np.array([]), color=(0, 0, 255),
flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
draw_image(img_with_keypoints, window_title)
评论列表
文章目录