detect.py 文件源码

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

项目:object-detection-python-opencv 作者: hasanaliqureshi 项目源码 文件源码
def overlay_mask(mask, image):
    #make the mask rgb
    rgb_mask = cv2.cvtColor(mask, cv2.COLOR_GRAY2RGB)
    #calculates the weightes sum of two arrays. in our case image arrays
    #input, how much to weight each.
    #optional depth value set to 0 no need
    img = cv2.addWeighted(rgb_mask, 0.5, image, 0.5, 0)
    return img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号