uw_rgbd.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def annotate_bboxes(vis, bboxes, target_names): # , box_color=lambda target: (0, 200, 0) if UWRGBDDataset.get_category_name(target) != 'background' else (100, 100, 100)): 
        for bbox,target_name in izip(bboxes, target_names): 
            box_color = (0, 200, 0) # if UWRGBDDataset.get_category_name(target) != 'background' else (100, 100, 100)
            annotate_bbox(vis, bbox.coords, color=box_color, title=target_name.title().replace('_', ' '))

            # cv2.rectangle(vis, (bbox.coords[0], bbox.coords[1]), (bbox.coords[2], bbox.coords[3]), box_color, 2) 
            # cv2.rectangle(vis, (bbox.coords[0]-1, bbox.coords[1]-15), (bbox.coords[2]+1, bbox.coords[1]), box_color, -1)
            # cv2.putText(vis, '%s' % (), 
            #             (bbox[0], bbox[1]-5), 
            #             cv2.FONT_HERSHEY_SIMPLEX, 0.4, (255, 255, 255), thickness=1, lineType=cv2.CV_AA)
        return vis
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号