- 1、本文档共22页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
..
1.图像反转
MATLAB程序实现如下:
I=imread('xian.bmp');
J=double(I);
J=-J+(256-1);%图像反转线性变换
H=uint8(J);
subplot(1,2,1),imshow(I);
subplot(1,2,2),imshow(H);
2.灰度线性变换
MATLAB程序实现如下:
I=imread('xian.bmp');
subplot(2,2,1),imshow(I);
title('原始图像');
axis([50,250,50,200]);
axison;%显示坐标系
I1=rgb2gray(I);
subplot(2,2,2),imshow(I1);
title('灰度图像');
axis([50,250,50,200]);
axison;%显示坐标系
J=imadjust(I1,[0.10.5],[]);%局部拉伸,把[0.10.5]的灰
度拉伸为[01]
页脚.
..
subplot(2,2,3),imshow(J);
title('线性变换图像[0.10.5]');
axis([50,250,50,200]);
gridon;%显示网格线
axison;%显示坐标系
K=imadjust(I1,[0.30.7],[]);%局部拉伸,把[0.30.7]的灰
度拉伸为[01]
subplot(2,2,4),imshow(K);
title('线性变换图像[0.30.7]');
axis([50,250,50,200]);
gridon;%显示网格线
axison;%显示坐标系
3.非线性变换
MATLAB程序实现如下:
I=imread('xian.bmp');
I1=rgb2gray(I);
subplot(1,2,1),imshow(I1);
title('灰度图像');
axis([50,250,50,200]);
gridon;%显示网格线
axison;%显示坐标系
J=double(I1);
页脚.
..
J=40*(log(J+1));
H=uint8(J);
subplot(1,2,2),imshow(H);
title('对数变换图像');
axis([50,250,50,200]);
gridon;%显示网格线
axison;%显示坐标系
4.直方图均衡化
MATLAB程序实现如下:
I=imread('xian.bmp');
I=rgb2gray(I);
figure;
subplot(2,2,1);
imshow(I);
subplot(2,2,2);
imhist(I);
I1=histeq(I);
figure;
subplot(2,2,1);
imshow(I1);
subplot(2,2,2);
imhist(I1);
页脚.
..
5.线性平滑滤波器
用MATLAB实现领域平均法抑制噪声程序:
I=imread('xian.bmp');
subplot(231)
imshow(I)
title('原始图像')
I=rgb2gray(I);
I1=imnoise(I,'salt&pepper',0.02);
subplot(232)
imshow(I1)
title('添加椒盐噪声的图像')
k1=filter2(fspecial('average',3),I1)/255;%进
行3*3模板平滑滤波
k2=filter2(fspecial('average',5),I1)/255;%进
行5*5模板平滑滤波
k3=filter2(fspecial('average',7),I1)/255;%进
行7*7模板平滑滤波
文档评论(0)