致谢
图像性能评价指标代码:
[X]=imread('D:\\MATLAB\\work\\image\\卷积原图.jpg');%装载原图的图像 [Y]=imread('D:\\MATLAB\\work\\image\\卷积去噪图.jpg');%装载处理后的图像
mseij=double(zeros(240,320));%假定所处理的图像为8比特的灰度图像,L=255 for i=1:240 for j=1:320
mseij(i,j)=mseij(i,j)+(X(i,j)-Y(i,j))*(X(i,j)-Y(i,j)); mseij(i,j)=mseij(i,j)+(X(i,j)^2-Y(i,j)^2) end end
mse=(sum((mseij(:)))/(240*320))
psnr=10*log10(255*255/mse) %峰值信噪比 t(1)=0;%保存各个灰度值出现概率 for i=1:256 t(i)=0; end
for i=1:240 for j=1:320
t(X(i,j)+1)=t(X(i,j)+1)+1; end end
%计算各个灰度值出现的概率 for i=1:256
t(i)=t(i)/(240*320); end
entropy=0; for i=1:256 if t(i)>0
entropy=entropy-t(i)*log2(t(i)); end
end %增加 entropy %
39