utils.py 文件源码

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

项目:histonets-cv 作者: sul-cidr 项目源码 文件源码
def get_mask_polygons(polygons, height, width):
    """Turn a list of polygons into a mask image of height by width.
    Each polygon is expressed as a list of [x, y] points."""
    mask = np.zeros((height, width), dtype=np.ubyte)
    cv2.fillPoly(mask, np.int32(polygons), color=255)
    return mask
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号