www.pudn.com > duge.rar > PSNR.m, change:2015-06-01,size:338b


function [ value ] = PSNR( I1,I2 ) 
%PSNR 此处显示有关此函数的摘要 
%   峰值信噪比,值越高融合效果越好 
[M N]=size(I1); 
I1=double(rgb2gray(I1)); 
I2=double(rgb2gray(I2)); 
% errorx=sum(sum(abs(I1-I2).^2));        %  MSE误差 
% value=10*log10(M*N/(errorx/size(I1,1)/size(I1,2)));   %  PSNR 
value=10*log10((M*N)/(RMSE(I1,I2)^2)); 
end