《數字图像处理》实验指导书(2011年用过).docVIP

  • 5
  • 0
  • 约1.38万字
  • 约 16页
  • 2016-12-07 发布于重庆
  • 举报

《數字图像处理》实验指导书(2011年用过).doc

《數字图像处理》实验指导书(2011年用过)

《数字图像处理》实验指导书 实验一、图象的基本操作(2学时) 实验二、图像的傅立叶变换(2学时) 实验三、图像增强(2学时) 实验四、图像压缩(2学时) 实验五、图像融合(选做) 实验一 图像的基本操作 1.实验目的 熟悉常用的图像文件格式与格式转换; 熟悉图像矩阵的显示方法(灰度、索引、黑白、彩色); 熟悉图像矩阵的格式转换使学生熟悉图象文件格式、图象的载入、彩色图象的构成、图象的显示等。 2.实验内容 练习图像读写命令 imread和imwrite并进行图像文件格式间的转换。特别是索引图像与1,4,8,16 比特图像的存储与转换。 Image file I/O. imread - Read image file. imwrite - Write image file. Image display. colorbar - Display colorbar. getimage - Get image data from axes. image - Create and display image imagesc - Scale data and display as image. immovie - Make movie from multiframe image. imshow - Display image. subimage- Display multiple images in single figure. truesize - Adjust display size of image. warp - Display image as texture-mapped surface. zoom - Zoom in and out of image or 2-D plot. 3. 实验步骤 a. 从硬盘加载 cameraman.tif 图象 (用函数 imread). b. 在图象显示窗口显示图象 (using function image or imshow). c. 显示彩色图象的 3 基色图象。 参考程序: football = imread(football.jpg); figure(Name, Football); imshow(football); figure(Name, Football color planes); subplot(2,2,1); imshow(football); redfootball = football; redfootball(:, :, 2:3) = 0; subplot(2,2,2); imshow(redfootball); greenfootball = football; greenfootball(:, :, 1) = 0; greenfootball(:, :, 3) = 0; subplot(2,2,3); imshow(greenfootball); bluefootball = football; bluefootball(:, :, 1:2) = 0; subplot(2,2,4); imshow(bluefootball); 实验二 图象的基本操作与变换 一、实验目的 通过实验了解并掌握图象的基本操作、图象的傅立叶变换及频谱、傅立叶变换可分离性 和哈达吗变换。 二、实验内容 (1) 进行图象的基本算术操作(+、-、*) 载入图象‘lenna.gif’,加入躁声,观察图象的变化. (2) 进行二值图象的逻辑运算(and、or、not) 自编程序生成 2 个二值图象(256x256),进行逻辑操作. (3) 设简单的二值图象为: imag=zeros(256,256); imag(100:180, 100:150)=1; 编制程序用两次一维傅立叶变换计算其二维傅立叶变换.并观察其幅值频谱和相位频谱. (fft, abs, imshow, angle, fftshift) (4) 载入图象‘lenna.gif’,用 fft2 和 ifft2 观察图象的频谱,并进行逆傅立叶变换,观察还原 后的图象与原图象的差异. 观察图象的旋转和其傅立叶变换。 三 实验要求 (1) 每位同学独立完成实验内容 (2) 实验报告包括程序代码、运行结果和体会。 (3) 实验报告中变换前后的图像须打印 1,图像的基本操作 a =

文档评论(0)

1亿VIP精品文档

相关文档