function p = MSE(im , imr ) % mse - % % im原始图像 % imr 恢复图像 % Copyright (c) 2004 Gabriel Peyr? m=(im-imr).^2; p=sum(sum(m)); p=p/size(im,1)^2;
function p = psnr(x,y) % psnr - compute the Peack Signal to Noise Ratio, defined by : % PSNR(x,y) = 10*log10( max(max(x),max(y))^2 / |x-y|^2 ). % % p = psnr(x,y); mse % % Copyright (c) 2004 Gabriel Peyr? d = mean( mean( (x(:)-y(:)).^2 ) ); m1 = max( abs(x(:)) ); m2 = max( abs(y(:)) ); m = max(m1,m2); p = 10*log10( 255^2/d );
◆◆
评论读取中....
请登录后再发表评论!
◆◆
修改失败,请稍后尝试