%Computer the PSNR
F=imread('C:\Users\lenovo\Desktop\sample2.tif');
FInfo=imfinfo('C:\Users\lenovo\Desktop\sample2.tif');
u_gaussian=0/255;
thegma_gaussian=(30^2)/(255^2);
N_gaussian=imnoise(F,'gaussian',u_gaussian,thegma_gaussian);
F_d=im2double(F);
a=-52;
b=52;
N_uniform=F_d+(a+(b-a)*rand(FInfo.Height,FInfo.Width))./255;
d=0.25;
N_saltandpepper=imnoise(F,'salt & pepper',d);
F_Gaussian=alphatrim(N_gaussian,3,3,2);
F_Gaussian1=alphatrim(N_gaussian,5,5,2);
F_adpmed=adpmedian(N_saltandpepper,9);
F_adpmed1=adpmedian(N_saltandpepper,5);
F_adpmed2=adpmedian(N_saltandpepper,13);
Imsz=size(F);
ngrid=Imsz(1)*Imsz(2);
FF=double(reshape(F,1,ngrid));
G=double(reshape(F_Gaussian,1,ngrid));
G1=double(reshape(F_Gaussian1,1,ngrid));
sqr_err=(FF-G)*(FF-G)'
sqr_err1=(FF-G1)*(FF-G1)'
FF_mean=mean(FF);
FF_max=max(FF);
PSNR=10.0*log10((FF_max*FF_max*ngrid)/sqr_err)
PSNR1=10.0*log10((FF_max*FF_max*ngrid)/sqr_err1)
PSNR.rar_ISNR_PSNR_psnr matlab_彩色图像psnr
版权申诉
5星 · 超过95%的资源 128 浏览量
2022-09-19
20:12:16
上传
评论
收藏 1KB RAR 举报
weixin_42651887
- 粉丝: 79
- 资源: 1万+
最新资源
- 基于matlab 极限学习机在回归拟合及分类问题中的应用研究-对比实验源代码+详细教程
- ItemApplicationTest.java
- 个人发卡源码,发卡系统,二次元发卡系统,二次元发卡源码,发卡程序,动漫发卡,PHP发卡源码,异次元发卡
- 基于matlab 决策树分类器的应用研究-乳腺癌诊断源代码+详细教程
- 2008全国电子设计竞赛优秀作品报告doc文档.zip
- 课程智能组卷系统 JAVA+Spring+SpringMVC+MyBatis
- 基于matlab LVQ神经网络的预测-人脸朝向识别源代码+详细教程
- Controlnet敏神大佬IC-Light的AI智能打光 AI这次真的大地震了
- 医院电子病历管理系统 JAVA+Spring+SpringMVC+MyBatis
- 基于matlab LVQ神经网络的分类-乳腺肿瘤诊断源代码+详细教程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论1