import cv2
import numpy as np

# Read image
img = cv2.imread("../paojie.jpg").astype(np.float32)
H, W, C = img.shape

img2 = cv2.imread("../bird.png").astype(np.float32)
img = cv2.resize(img,img2.shape[:2])

# 设置权重
a = 0.6
out = img * a + img2 * (1 - a)
out = out.astype(np.uint8)
    
# Save result
cv2.imwrite("out.jpg", out)
cv2.imshow("result", out)
cv2.waitKey(0)
cv2.destroyAllWindows()

 


 

python实现图像融合
图像融合结果 ↑

相关文章:

  • 2021-12-26
  • 2021-11-19
  • 2021-11-18
  • 2021-07-19
  • 2021-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-07-27
  • 2021-04-22
  • 2022-12-23
相关资源
相似解决方案