基于opencv的图像与mask融合

图像加法,但是对图像赋予不同的权重(0到1之间),使得它具有混合感或透明感。

combine = cv2.addWeighted(cv2.resize(img1,(200,200)),0.5,cv2.resize(img2,(200,200)),0.5,0)

cv2.imshow('combine',combine)
cv2.waitKey(0)

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42990464/article/details/123322305