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

matlab图像处理基础实例

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

>> [x,map]=imread('forest.tif'); >> j=ind2gray(x,map);

>> j=imadjust(x,[],[],.5); >> imshow(x) >> hold

Current plot held >> figure,imshow(j)

>> i=imread('tire.tif'); >> j=histeq(i);

>> subplot(221),imshow(i) >> title('原始图像')

>> subplot(222),imshow(j)

>> title('直方图均衡化处理以后的图像') >> subplot(223),imhist(i,64) >> title('原始图像直方图') >> subplot(224),imhist(j,64)

>> i=imread('pout.tif'); >> j=adapthisteq(i);

>> subplot(221),imshow(i) >> subplot(222),imshow(j) >> subplot(223),imhist(i) >> subplot(224),imhist(j)

>> i=imread('rice.png');

>> subplot(221),imshow(i),title('原图') >> i1=imnoise(i,'gaussian',0,.02);

>> subplot(222),imshow(i1),title('加入高斯噪声') >> i2=imnoise(i,'speckle',.02);

>> subplot(223),imshow(i2),title('加入乘性噪声') >> i3=imnoise(i,'salt',.02);

>> subplot(224),imshow(i3),title('加入椒盐噪声')

>> i=imread('rice.png');

>> i1=imnoise(i,'gaussian',0,.02);

>> subplot(121),imshow(i1),title('含噪图片') >> h=[1 1 1;1 1 1;1 1 1]; >> H=h/9;

>> j=conv2(i1,H);

Warning: CONV2 on values of class UINT8 is obsolete.

Use CONV2(DOUBLE(A),DOUBLE(B)) or CONV2(SINGLE(A),SINGLE(B)) instead.

> In uint8.conv2 at 11 >> i=uint16(j);

>> subplot(122),imshow(j,[]) >> title('3*3均值滤波结果')

>> i=imread('eight.tif'); >> j=imnoise(i,'salt',.02); >> k=medfilt2(j);

>> subplot(121),imshow(j),title('含噪图片')

>> subplot(122),imshow(k),title('3*3中值滤波结果')

>> i=imread('eight.tif'); >> j=imnoise(i,'salt',.02); >> domain=[1 1 1;1 1 1;1 1 1]; >> k=ordfilt2(j,1,domain);

>> subplot(121),imshow(j),title('含噪图片')

>> subplot(122),imshow(k),title('3*3邻域的最小值滤波图片')

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