function laplacian(ori_A,ori_B) path(path,'FusionEvaluation/') %Ori_A = imread('clockA_tif2bmp (256x256).BMP'); %Ori_B = imread('clockB_tif2bmp (256x256).BMP'); ori_A = imread('clockA.BMP'); ori_B = imread('clockB.BMP'); ori_A=rgb2gray(ori_A); ori_B=rgb2gray(ori_B); A_a = double(ori_A)/255; B_b = double(ori_B)/255; [p1,q1] = size(ori_A); [p2,q2] = size(ori_B); if(p1~=p2||q1~=q2) error('The size of image A and image B must be the same......'); end F = fuse_lap(A_a,B_b,4,1,3); %% F=F*255; F(F<0)=0; disp('拉普拉斯指标:') F(F>255)=255; F=round(F); %% grey_level=256; Criteria=Evaluation(double(ori_A),double(ori_B),F,grey_level); disp(Criteria) figure,imshow(F-double(ori_A),[]) F_DWT = fuse_dwb(A_a,B_b,4,1,3); F_DWT=F_DWT*255; F_DWT(F_DWT<0)=0; disp('离散小波变换指标:') F_DWT(F_DWT>255)=255; F_DWT=round(F_DWT); %% grey_level=256; Criteria=Evaluation(double(ori_A),double(ori_B),F_DWT,grey_level); disp(Criteria) figure,imshow(F_DWT-double(ori_A),[]) F_CON = fuse_con(A_a,B_b,4,1,3); F_CON=F_CON*255; F_CON(F_CON<0)=0; disp('Contrast Pyramid变换指标:') F_CON(F_CON>255)=255; F_CON=round(F_CON); %% grey_level=256; figure,imshow(F_CON-double(ori_A),[]) Criteria=Evaluation(double(ori_A),double(ori_B),F_CON,grey_level); disp(Criteria) F_SIH = fuse_sih(A_a,B_b,4,1,3); F_SIH=F_SIH*255; F_SIH(F_SIH<0)=0; disp('FSD Pyramid变换指标:') F_SIH(F_SIH>255)=255; F_SIH=round(F_SIH); %% grey_level=256; figure,imshow(F_SIH-double(ori_A),[]) Criteria=Evaluation(double(ori_A),double(ori_B),F_SIH,grey_level); disp(Criteria)