⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 14-1.m

📁 matlab图像程序.zip
💻 M
字号:
I = checkerboard(8);
% 创建一个棋盘图像
noise = 0.1*randn(size(I));
% 产生随机噪声
PSF = fspecial('motion',21,11);
Blurred = imfilter(I,PSF,'circular');
% 输入图像滤波,使图像变模糊
BlurredNoisy = im2uint8(Blurred + noise);
% 添加噪声
NP = abs(fftn(noise)).^2;
% 噪声功率
NPOW = sum(NP(:))/prod(size(noise));
NCORR = fftshift(real(ifftn(NP)));
% 噪声的自相关
IP = abs(fftn(I)).^2;
% 原始图像功率
IPOW = sum(IP(:))/prod(size(I));
ICORR = fftshift(real(ifftn(IP)));
% 图像的自相关
ICORR1 = ICORR(:,ceil(size(I,1)/2));
NSR = NPOW/IPOW;
% 噪信比
subplot(221);imshow(BlurredNoisy,[]);
title('模糊和噪声图像');
subplot(222);imshow(deconvwnr(BlurredNoisy,PSF,NSR),[]);
title('deconvwnr(A,PSF,NSR)');
subplot(223);imshow(deconvwnr(BlurredNoisy,PSF,NCORR,ICORR),[]);
title('deconvwnr(A,PSF,NCORR,ICORR)');
subplot(224);imshow(deconvwnr(BlurredNoisy,PSF,NPOW,ICORR1),[]);
title('deconvwnr(A,PSF,NPOW,ICORR_1_D)');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -