




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、通信与信息工程学院MATLAB实验报告班 级:电子信息科学与技术12级02班姓 名:徐明学 号:1107080232设计时间:2014.3.3 - 2014.4.30通信与信息工程学院二一四年实验三 图像处理【实验内容】1. MATLAB中关于图像处理的部分语句表1 MATLAB图像处理工具箱中常用的语句命令功能图像显示imagesubimageimagescimshowtruesize建立并显示图像在一个图形窗口中显示多个图像调整数据并显示成图像图像显示调整图像显示大小图像文件输入输出imreadimwriteiminfoloadsave图像文件读入图像写出查看图像文件信息将以mat为扩展名
2、的图像文件调入到内存将内存变量中的图像保存到以mat为扩展名的文件中图像几何运算imcropimresizeimrotate图像剪裁图像大小调整图像旋转图像像素值及统计imhistmean2std2corr2求图像数据直方图求均值求标准差求相关系数图橡增强及平滑imadjusthisteqimnoise medfilt2对比度调整直方图均衡给图像增加噪声二维中值滤波器图像变换fft2ifft2dct2idct2dctmtx计算二维FFT计算二维逆FFT计算2D离散余弦变换计算2D反离散余弦变换计算DCT矩阵其它conv2convmtx2xcorr2二维卷积计算二维卷积矩阵二维互相关1-1 读取
3、RGB彩色图像,采用rgb2gray( ) 函数将其转化为灰度图像语法:I = rgb2gray(RGB) converts the truecolor image RGB to the grayscale intensity image I.程序:I=imread('lenna_color.tiff');G = rgb2gray(I);subplot(1,2,1);imshow(I);subplot(1,2,2);imshow(G);1-2 读取tougu.bmp和fei.bmp灰度图像,分别采用imhist( ) 函数绘制它们的图像直方图,并采用直方图均匀化histeq()
4、函数进行增强处理。语法:1、直方图函数 imhist(I,n)imhist(I,n) displays a histogram with n bins for the intensity image I above a grayscale colorbar of length n. If you omit the argument, imhist uses a default value of n = 256 if I is a grayscale image, or n = 2 if I is a binary image.2、直方图均衡化函数 J = histeq(I, hgram)J =
5、 histeq(I, hgram) transforms the intensity image I so that the histogram of the output intensity image J with length(hgram) bins approximately matches hgram. The vector hgram should contain integer counts for equally spaced bins with intensity values in the appropriate range: 0, 1 for images of clas
6、s double, 0, 255 for images of class uint8, and 0, 65535 for images of class uint16. histeq automatically scales hgram so that sum(hgram) = prod(size(I). The histogram of J will better match hgram when length(hgram) is much smaller than the number of discrete levels in I.程序:A=imread('source.BMP&
7、#39;);B=imread('rice.bmp');K=histeq(A);V=histeq(B);subplot(2,3,1),imshow(A);subplot(2,3,2), imhist(A);subplot(2,3,3),imshow(K);subplot(2,3,4),imshow(B);subplot(2,3,5), imhist(B);subplot(2,3,6),imshow(V);实验结果:1-3 读取灰度图像,分别对图像进行二维快速傅里叶变换和二维快速傅里叶反变换,二维离散余弦变换和二维离散余弦反变换。并分别显示出变换后的图像。语法:1、二维快速傅里叶变
8、换 Y = fft2(X)Y = fft2(X) returns the two-dimensional discrete Fourier transform (DFT) of X, computed with a fast Fourier transform (FFT) algorithm. The result Y is the same size as X.2、二维快速傅里叶反变换 Y = ifft2(X)Y = ifft2(X) returns the two-dimensional inverse discrete Fourier transform (DFT) of X, comp
9、uted with a fast Fourier transform (FFT) algorithm. The result Y is the same size as X.3、二维离散余弦变换 B = dct2(A)B = dct2(A) returns the two-dimensional discrete cosine transform of A. The matrix B is the same size as A and contains the discrete cosine transform coefficients B(k1,k2).4、二维离散余弦反变换 B = idc
10、t2(A)B = idct2(A) returns the two-dimensional inverse discrete cosine transform (DCT) of A.程序:I=imread('finger.bmp');X = fft2(I);Y = ifft2(I);Z= dct2(I);B = idct2(I);subplot(2,3,1);imshow(I);subplot(2,3,2);imshow(X);subplot(2,3,3);imshow(Y);subplot(2,3,4);imshow(Z);subplot(2,3,5);imshow(B);
11、1-4 读取灰度图像,采用imnoise()函数对图像进行加噪处理并显示噪声图像,同时采用中值滤波函数medfilt2()对噪声图像进行去噪处理并显示去噪后图像。语法:1、图像加噪函数 J = imnoise(I,type)J = imnoise(I,type) adds noise of given type to the intensity image I. type is a string that can have one of these values: 'gaussian' for Gaussian white noise 'localvar' for zero-mean Gaussian white noise with an intensity-dependent variance 'poisson' for Poisson noise 'salt & pepper' for "on and off" pixels 'speckle' for multiplicative noise。2、二维中值过滤函数 B = medfilt2(A)B = medfilt2(A) performs median filtering of t
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 创新科技助力区块链在供应链管理的运用
- 解密2025年家具行业设计考试的专业术语试题及答案
- 网络安全基础试题及答案
- 新能源汽车的市场动态与竞争环境研究试题及答案
- 课后习题与乐理考试试题及答案
- 药品营销学试题及答案
- 集成电路原理试题及答案
- 转业考试题型及答案
- 从行业角度看区块链技术在金融领域的融资潜力
- 钢琴试卷测试题及答案
- 装修材料的购销合同
- 2025年江西金融租赁股份有限公司招聘笔试参考题库含答案解析
- 台达DELTA变频器VFD-EL系列使用说明书和手册(完整中文版)VFD007EL23A
- 湖南省长沙市2024-2025学年高三上学期新高考适应性考试数学试题 含答案
- 课题申报书:“四新”建设背景下教育创新与课程数字化实践研究
- 年加工2万吨再生铝项目可行性研究报告建议书
- 2025年公司各部门管理规章制度(4篇)
- 2025年应急管理部信息研究院招聘高频重点提升(共500题)附带答案详解
- 2025版《VOCs废气处理设施安全检查表》(全)
- 普通话水平测试朗读50篇
- 【MOOC】外国教育史-河南大学 中国大学慕课MOOC答案
评论
0/150
提交评论