draw_utils.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def annotate_bbox(vis, coords, color=(0,200,0), title=''): 
    # Bounding Box and top header
    icoords = coords.astype(np.int32)
    cv2.rectangle(vis, (icoords[0], icoords[1]), (icoords[2], icoords[3]), color, 2)
    # cv2.rectangle(vis, (icoords[0]-1, icoords[1]-15), (icoords[2]+1, icoords[1]), color, -1)
    cv2.putText(vis, '{}'.format(title), (icoords[0], icoords[1]-5), 
                cv2.FONT_HERSHEY_SIMPLEX, 0.45, (255, 255, 255), thickness=1, lineType=cv2.CV_AA)
    return vis
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号