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
detect.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录