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

matlab图像处理基础实例

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

注意:找不到wiener函数

>> i=imread('eight.tif'); >> i=double(i); >> imshow(i,[])

>> h=[0 1 0;1 -4 0;0 1 0]; >> j=conv2(i,h,'same'); >> k=i-j; >> hold

Current plot held >> figure

>> imshow(k,[])

i=imread('eight.tif');

>> subplot(211),imshow(i),title('pri')

>> H=fspecial('laplacian');%应用laplacian滤波进行图像锐化 >> laplacianH=filter2(H,i);%在5*5邻域内进行维纳滤波 >> subplot(223),imshow(laplacianH) >> title('laplacian算子锐化图像') >> H=fspecial('prewitt'); >> prewittH=filter2(H,i);

>> subplot(224),imshow(prewittH) >> title('prewitt模板锐化图像')

>> i=imread('saturn.png'); >> j=imnoise(i,'salt',.02);

>> subplot(121),imshow(j),title('含噪图片') >> j=double(j);f=fft2(j); >> g=fftshift(f); >> [m,n]=size(f); >> n=3;d0=20;

>> n1=floor(m/2);n2=floor(n/2); >> for i=1:m for j=1:n

d=sqrt((i-n1)^2+(j-n2)^2);h=1/(1+.414*(d/d0)^(2*n)); g(i,j)=h*g(i,j); end end

>> g=ifftshift(g);

>> g=uint8(real(ifft2(g))); >> subplot(122),imshow(g)

>> title('三阶巴特沃斯滤波结果')

>> rgb=imread('peppers.png');

>> subplot(221),imshow(rgb),title('pri')

>> subplot(222),imshow(rgb(:,:,1)),title('red part') >> subplot(223),imshow(rgb(:,:,2)),title('green part') >> subplot(224),imshow(rgb(:,:,3)),title('blue part')

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