实验二 matlab图像处理

实验二 matlab图像处理

ID:11288247

大小:52.00 KB

页数:4页

时间:2018-07-11

实验二 matlab图像处理_第1页
实验二 matlab图像处理_第2页
实验二 matlab图像处理_第3页
实验二 matlab图像处理_第4页
资源描述:

《实验二 matlab图像处理》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、实验二Matlab图像处理一、实验目的利用Matlab图像处理工具箱中的函数实现各种图像常规处理,深化课程理论知识认识。二、实验内容和要求实习内容:利用matlab读取BMP图像,实现图像点变换、空间域局部处理、几何变换、彩色合成和彩色变换。三、实习步骤1图像的灰度变换I=imread('cameraman-8.bmp','bmp');figure;subplot(2,2,1),imshow(I);subplot(2,2,2),imhist(I);[counts1,x1]=imhist(I);%观察Counts,x的值subplot(2,2,

2、3),stem(x1,counts1);J=imadjust(I,[0.10.7],[0.00.9]);subplot(2,2,4),imshow(J);figure;subplot(2,3,1),imshow(I);subplot(2,3,2),imshow(J);subplot(2,3,4),imhist(I);subplot(2,3,5),imhist(J);[counts2,x2]=imhist(J);subplot(2,3,6),stem(x2,counts2);2图像直方图处理2.1直方图均衡化I=imread('camerama

3、n-8.bmp','bmp');J=histeq(I);figure(1),subplot(2,2,1),imshow(I),subplot(2,2,2),imshow(J);figure(1),subplot(2,2,3),imhist(I),subplot(2,2,4),imhist(J);2.2直方图规定化I1=imread('TM5.bmp','bmp');I2=imread('TM3.bmp','bmp');K1=histeq(I1,imhist(I2));figure;subplot(3,2,1),imshow(I1);subpl

4、ot(3,2,2),imhist(I1);subplot(3,2,3),imshow(I2);subplot(3,2,4),imhist(I2);subplot(3,2,5),imshow(K1);subplot(3,2,6),imhist(K1);3图像空间域平滑3.1用均值滤波器实现图像空间域的平滑I=imread('cameraman-8.bmp','bmp');J=imnoise(I,'gaussian');%添加高斯噪声K=imnoise(I,'salt&pepper');%添加椒盐噪声M=imnoise(I,'speckle');

5、%添加乘性噪声H=ones(3,3)/9;%3*3的均值去噪模板I1=imfilter(I,H);J1=imfilter(J,H);K1=imfilter(K,H);M1=imfilter(M,H);%去噪figure;subplot(2,4,1),imshow(I);title('原图');subplot(2,4,2),imshow(J);title('高斯噪声图像');subplot(2,4,3),imshow(K);title('椒盐噪声图像');subplot(2,4,4),imshow(M);title('乘性噪声图像');subp

6、lot(2,4,6),imshow(J1);title('高斯噪声滤波图像');subplot(2,4,7),imshow(K1);title('椒盐噪声滤波图像');subplot(2,4,8),imshow(M1);title('乘性噪声滤波图像');3.2用中值滤波器实现图像空间域的平滑I=imread('cameraman-8.bmp');I1=imnoise(I,'gaussian');I2=imnoise(I,'salt&pepper',0.02);I3=imnoise(I,'speckle');J=medfilt2(I,[3,3

7、]);%3×3中值滤波模板J1=medfilt2(I1,[3,3]);J2=medfilt2(I2,[3,3]);J3=medfilt2(I3,[3,3]);figure,subplot(2,4,1),imshow(I);title('原图');subplot(2,4,2),imshow(I1);title('添加高斯噪声');subplot(2,4,3),imshow(I2);title('添加椒盐噪声');subplot(2,4,4),imshow(I3);title('添加乘性噪声');subplot(2,4,6),imshow(J1)

8、;title('高斯噪声3*3中值滤波');subplot(2,4,7),imshow(J2);title('椒盐噪声3*3中值滤波');subplot(2,4,8

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。