然后在图像上运行以下代码:import pywt
import cv2
import numpy as np
# This function does the coefficient fusing according to the fusion method
def fuseCoeff(cooef1, cooef2, method):
if (method == 'mean'):
cooef = (cooef1 + cooef2) / 2
elif (method == 'min'):
cooef = np.minimum(cooef1,cooef2)
elif (method == 'max'):
cooef = np.maximum(cooef1,cooef2)
else:
cooef = []
return cooef
# Params
FUSION_METHOD = 'mean' # Can be 'min' || 'max || anything you choose according theory
# Read the two image
I1 = cv2.imread('i1.bmp',0)
I2 = cv2.imread('i2.jpg',0)
# We need to have both images the same size
I2 = cv2.resize(I2,I1.shape) # I do this just because i used two random images
## Fusion algo
# First: Do wave