opencv Python代码笔记
读取文件返回mat
cv2.imread(filepath)
画框
cv2.rectangle(image,(x1, y1), (x2, y2), (0, 255, 0), 2)
# image: 图片名称
# (x1, y1), (x2, y2): 坐标 (x_min, y_min), (x_max, y_max)
# (0, 255, 0): 框的颜色
# 2:线的粗细
加id
cv2.putText(image, str, (x1, y1), cv2.FONT_HERSHEY_COMPLEX, 2
原创
2020-09-01 17:13:52 ·
122 阅读 ·
0 评论