hazcam.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:hazcam 作者: alex-sherman 项目源码 文件源码
def drawText(vis, text, position, scale, thickness, padding = 2, color = (255, 255, 0)):
    font = cv2.FONT_HERSHEY_SIMPLEX
    size = cv2.getTextSize(text, font, scale, thickness)[0]
    size = (size[0] + padding * 2, -size[1] - padding * 2)
    cv2.rectangle(vis, tuple(diff(position, (padding, -padding * 2))), tuple(add(position, size)), (0,0,0), thickness = -1)
    cv2.putText(vis, text, position, font, scale, color, thickness, bottomLeftOrigin = False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号