RGB—T图像融合可视化

按0.4-0.6比例融合

import cv2
import os
# 中文路径不可取
# img_dir = r"C:\Users\lpf\Desktop\毕业相关\paper\1_RGBT初稿\RGBT数据集分析"
img_dir = "./img"
ti_path = os.path.join(img_dir, "06572i.jpg")
rgb_path = os.path.join(img_dir, "06572v.jpg")

ti = cv2.imread(ti_path)
rgb = cv2.imread(rgb_path)

cv2.imshow('infrad', ti)
cv2.imshow('visible', rgb)

fusion = cv2.addWeighted(ti, 0.4, rgb, 0.6, 0)
cv2.imshow("fusion", fusion)
# print(ti.size)
cv2.waitKey()

你可能感兴趣的:(MISC,Paper,opencv)