def plot_points(image, points, color=(0, 0, 255)):
"""Draw circles at given locations on image.
Arguments:
image -- Image to draw on.
points -- x,y pairs of points to plot.
"""
# find best radius for image
image_width = image.shape[1]
radius = int(image_width / 400)
# draw
for point in points:
point = tuple(map(int, point))
cv2.circle(image, point, color=color, radius=radius,
thickness=radius/2)
评论列表
文章目录