图像的加法
numpy 加法
opencv加法
import cv2
import numpy as np
a=cv2.imread("../../image/image/lena512.bmp")
b=a
result1=a+b
result2=cv2.add(a,b)
cv2.imshow("original",a)
cv2.imshow("result1",result1)
cv2.imshow("result2",result2)
cv2.waitKey()
cv2.destroyAllWindows()
图像融合
=import cv2
a=cv2.imread("../../image/image/add/boat.bmp")
b=cv2.imread("../../image/image/add/lena.bmp")
result=cv2.addWeighted(a,1,b,1,0)
cv2.imshow("boat",a)
cv2.imshow("lena",b)
cv2.imshow("result",result)
cv2.waitKey()
cv2.destroyAllWindows()