# 定义十字星的大小(线的长度)
line_length = 50 # 你可以根据需要调整这个值
x,y=maxLoc[0],maxLoc[1]
# 在指定位置绘制垂直线
cv2.line(image, (x, y - line_length // 2), (x, y + line_length // 2), (255, 0, 0), 11)
# 在指定位置绘制水平线
cv2.line(image, (x - line_length // 2, y), (x + line_length // 2, y), (255, 0, 0), 11)
cv2.imwrite(f'./folder_img/{x_}_res_img.png', image)
给图像进行十字星标记
最新推荐文章于 2024-07-27 12:20:46 发布