img = cv2.imread(im)
# 在原图上画框
cv2.rectangle(img, (xmin,ymin), (xmax,ymax), color=(0, 0, 255), thickness=2)
cv2.putText(img, text, xmin, ymin-5), cv2.FONT_HERSHEY_COMPLEX, fontScale=0.5, color=(0, 0, 255), thickness=1)
注意:以上text不支持中文

参考:
https://blog.csdn.net/zhangphil/article/details/102960243
本文介绍了如何使用OpenCV库在图像上添加文字,特别指出当前方法不支持中文,同时提供了详细的参考资料链接。
8785

被折叠的 条评论
为什么被折叠?



