第一范文网 - 专业文章范例文档资料分享平台

图像处理实验2014

来源:用户分享 时间:2025/8/20 16:36:17 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

5、用高斯高通滤波器进行滤波 二、实验图像: H(u,v)?1?e?D22(u,v)/2D0 原始图像 加噪声后的图像 三、实验主要过程: >> pic=imread('C:\\Documents and Settings\\Administrator\\桌面\\实验图片\\实验五\\sample5-1.bmp') >> [r,c]=size(pic); >> f=fftshift(fft2(double(pic))); >> mx=max(max(f,[],1),[],2); >> imf=abs(f)/mx*25600; >> imshow(uint8(imf)); 布特沃斯低通滤波 D0 = [10,20,40,80]; n = 2; D = f; H = D; for row = 1:r for column = 1:c D(row,column) = sqrt((row-r/2)^2+(column-c/2)^2); end end for type = 1:length(D0) H = 1./(1+(D/D0(type)).^(2*n)); f2 = f.*H; f2 = ifft2(ifftshift(f2)); subplot(2,2,type); imshow(uint8(real(f2))); title(D0(type)); end 高斯低通 D0 = [10,20,40,80]; D = f; H = D; for row = 1:r for column = 1:c D(row,column) = sqrt((row-r/2)^2+(column-c/2)^2); end end for type = 1:length(D0) H = exp(D.^2/(2*D0(type)^2)*(-1)); f2 = f.*H; f2 = ifft2(ifftshift(f2)); subplot(2,2,type); imshow(uint8(real(f2))); title(D0(type)); end D 0越小,结果越模糊,去噪效果越好;D0越大,则相反 布特沃思高通 D0 = [10,20,40,80]; n = 2; D = f; H = D; for row = 1:r for column = 1:c D(row,column) = sqrt((row-r/2)^2+(column-c/2)^2); end end for type = 1:length(D0) H = 1 - 1./(1+(D/D0(type)).^(2*n)); f2 = f.*H; f2 = ifft2(ifftshift(f2)); subplot(2,2,type); imshow(uint8(real(f2))); title(D0(type)); end 高斯高通 D0 = [10,20,40,80]; n = 2; D = f; H = D; for row = 1:r for column = 1:c D(row,column) = sqrt((row-r/2)^2+(column-c/2)^2); end

搜索更多关于: 图像处理实验2014 的文档
图像处理实验2014.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6eft020k9h47le04llcz_5.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top