- 4
- 0
- 约1.6千字
- 约 6页
- 2017-01-04 发布于未知
- 举报
(1)直方图均衡
I=imread(D:\ProgramFiles\MATLAB\R2010b\toolbox\images\imdemos\trees.tif) %载入图像
J=histeq(I); %直方图均衡
subplot(2,2,1),imshow(I),title(原图);
subplot(2,2,2),imhist(I),title(原图灰度直方图);
subplot(2,2,3),imshow(J),title(均衡处理图);
subplot(2,2,4),imhist(J),title(图均衡处理灰度直方图);
(2)平滑滤波
I=imread(D:\Program Files\MATLAB\R2010b\toolbox\images\imdemos\tire.tif);%读入图像
subplot(231),imshow(I);%显示原始图像
title(原始图像);?
J=imnoise(I,salt??pepper,0.01);%加均值为0,方差为0.01的椒盐噪声
?subplot(232),imshow(J);?title(添加椒盐噪声图片);?
K=medfilt2(J,[7,7]);%7X7的滤波窗口
subplot(233),imshow(K,[]);%显示处理后的图像
title(中值滤波图像);?
I2=imread(D:
原创力文档

文档评论(0)