Reputation: 626
I am new to opencv and I am doing a blob detection on a image and then draw circles around each blob using the command-
im_with_keypoints = cv2.drawKeypoints(im, keypoints, np.array([]), (0,0,255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
What I want to know is that how can I get these red circles as filled circles?
Upvotes: 1
Views: 1564
Reputation: 661
You have the keypoints and the image so try this code.
def draw_keypoints(img, keypoints, color=(0, 255, 255)):
for kp in keypoints:
x, y = kp.pt
cv2.circle(img, (int(x), int(y)), color=color, radius=10, thickness=-1) # you can change the radius and the thickness
Upvotes: 2