数字图像处理实验报告-图像复原实验

上传人:人*** 文档编号:512571754 上传时间:2023-09-22 格式:DOC 页数:17 大小:901.01KB
返回 下载 相关 举报
数字图像处理实验报告-图像复原实验_第1页
第1页 / 共17页
数字图像处理实验报告-图像复原实验_第2页
第2页 / 共17页
数字图像处理实验报告-图像复原实验_第3页
第3页 / 共17页
数字图像处理实验报告-图像复原实验_第4页
第4页 / 共17页
数字图像处理实验报告-图像复原实验_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《数字图像处理实验报告-图像复原实验》由会员分享,可在线阅读,更多相关《数字图像处理实验报告-图像复原实验(17页珍藏版)》请在金锄头文库上搜索。

1、实 验 报 告课程名称 数字图像处理导论 专业班级 _ 姓 名 _ 学 号 _ 电气与信息学院和谐 勤奋 求是 创新实验题目图像复原实验-空域滤波复原实验室 DSP室&信号室实验时间2015 年 10月 13 日 实验类别 设计同组人数2成 绩指导教师签字:一实验目的1. 掌握图像滤波的基本定义及目的。2. 理解空间域滤波的基本原理及方法。3. 掌握进行图像的空域滤波的方法。二实验内容1. 读出eight.tif这幅图像,给这幅图像分别加入椒盐噪声和高斯噪声后并与前一张图显示在同一图像窗口中。2. 对加入噪声图像选用不同的平滑(低通)模板做运算,对比不同模板所形成的效果,要求在同一窗口中显示。

2、3. 使用函数imfilter时,分别采用不同的填充方法(或边界选项,如零填充、replicate、symmetric、circular)进行低通滤波,显示处理后的图像。4. 运用for循环,将加有椒盐噪声的图像进行10次,20次均值滤波,查看其特点,显示均值处理后的图像(提示:利用fspecial函数的average类型生成均值滤波器)。5. 对加入椒盐噪声的图像分别采用均值滤波法,和中值滤波法对有噪声的图像做处理,要求在同一窗口中显示结果。6. 自己设计平滑空间滤波器,并将其对噪声图像进行处理,显示处理后的图像。三实验具体实现1. 读出(自己选定.tif)这幅图像,给这幅图像分别加入椒盐噪

3、声和高斯噪声后并与前一张图显示在同一图像窗口中。I=imread(trees.tif);subplot(1,3,1)imshow(I);title( Original Image );J = imnoise(I,salt & pepper,0.05); %noise density=0.05subplot(1,3,2)imshow(J);title( salt & pepper );K= imnoise(I,gaussian,0.01,0.01); subplot(1,3,3)imshow(K);title( gaussian ) 2. 对加入噪声图像选用不同的平滑(低通)模板做运算,对比不同

4、模板所形成的效果,要求在同一窗口中显示。I=imread(moon.tif);H = fspecial(sobel);subplot(2,2,1)imshow(I);title( Qriginal Image );Sobel = imfilter(I,H,replicate);subplot(2,2,2)imshow(Sobel);title( Sobel Image )H = fspecial(laplacian,0.4);lap = imfilter(I,H,replicate);subplot(2,2,3)imshow(lap);title( Laplacian Image )H = f

5、special(gaussian,3 3,0.5);gaussian = imfilter(I,H,replicate);subplot(2,2,4)imshow(gaussian);title( Gaussian Image )3. 使用函数imfilter时,分别采用不同的填充方法(或边界选项,如零填充、replicate、symmetric、circular)进行低通滤波,显示处理后的图像。originalRGB = imread(trees.tif);subplot(3,2,1)imshow(originalRGB);title( Qriginal Image );h = fspeci

6、al(motion, 50, 45); %motion blurredfilteredRGB = imfilter(originalRGB, h);subplot(3,2,2)imshow(filteredRGB);title( Motion Blurred Image );boundaryReplicateRGB = imfilter(originalRGB, h, replicate);subplot(3,2,3)imshow(boundaryReplicateRGB);title( 0-Padding);boundary0RGB = imfilter(originalRGB, h, 0)

7、;subplot(3,2,4)imshow(boundary0RGB);title(Replicate);boundarysymmetricRGB = imfilter(originalRGB, h, symmetric);subplot(3,2,5)imshow(boundarysymmetricRGB);title( Symmetric );boundarycircularRGB = imfilter(originalRGB, h, circular);subplot(3,2,6)imshow(boundarycircularRGB);title( Circular);4. 运用for循环

8、,将加有椒盐噪声的图像进行10次,20次均值滤波,查看其特点,显示均值处理后的图像(提示:利用fspecial函数的average类型生成均值滤波器)。I=imread(kids.tif);J = imnoise(I,salt & pepper,0.05);subplot(1,3,1)imshow(J);title( salt & pepper Noise);h=fspecial(average); %Averaging FilteringJ1=imfilter(J,h);for i=1:10J1=imfilter(J,h);subplot(1,3,2)imshow(J1);title( 10

9、 Averaging Filtering);endJ2=imfilter(J,h);for i=1:20J2=imfilter(J,h); subplot(1,3,3)imshow(J2);title( 20 Averaging Filtering);end5. 对加入椒盐噪声的图像分别采用均值滤波法,和中值滤波法对有噪声的图像做处理,要求在同一窗口中显示结果。I=imread(trees.tif);J = imnoise(I,salt & pepper,0.05);subplot(1,3,1)imshow(J);title( Original Image );h=fspecial(avera

10、ge); %Averaging FilteringJ1=imfilter(J,h);subplot(1,3,2)imshow(J1);title( Averaging Filtering );J2=medfilt2(J); %Median Filteringsubplot(1,3,3)imshow(J2);title( Median Filtering );6. 自己设计平滑空间滤波器,并将其对噪声图像进行处理,显示处理后的图像。domain=0 0 8 0 0; 0 0 8 0 0; 8 8 8 8 8; 0 0 8 0 0; 0 0 8 0 0;I=imread(trees.tif);J

11、= imnoise(I,salt & pepper,0.05);subplot(1,2,1)imshow(J);title( Original Image );K1= ordfilt2(J,5,domain);subplot(1,2,2)imshow(K1);title( 5*5 Smoothing Fitered Image);附录:可能用到的函数和参考结果*报告里不能用参考结果中的图像1) 读出eight.tif这幅图像,给这幅图像分别加入椒盐噪声和高斯噪声后并与前一张图显示在同一图像窗口中。 I=imread(cameraman.tif);subplot(1,3,1)imshow(I);

12、title( Qriginal Image );J = imnoise(I,salt & pepper,0.05); %noise density=0.05subplot(1,3,2)imshow(J);title( salt & pepper );K= imnoise(I,gaussian,0.01,0.01); subplot(1,3,3)imshow(K);title( gaussian ); 图2.1 初始图像及椒盐噪声图像、高斯噪声污染图 2) 对加入噪声图像选用不同的平滑(低通)模板做运算,对比不同模板所形成的效果,要求在同一窗口中显示。I=imread(trees.tif);H

13、= fspecial(sobel);subplot(2,2,1)imshow(I);title( Qriginal Image );Sobel = imfilter(I,H,replicate);subplot(2,2,2)imshow(Sobel);title( Sobel Image )H = fspecial(laplacian,0.4);lap = imfilter(I,H,replicate);subplot(2,2,3)imshow(lap);title( Laplacian Image )H = fspecial(gaussian,3 3,0.5);gaussian = imfilter(I,H,replicate);subplot(2,2,4)imshow(gaussian);title( Gaussian Image ) 图2.2 原图像及各类低通滤波处理图像 3) 使用函数imfilter时,分别采用不同的填充方法(或边界选项,如零填充、replicate、symmetric、circular)进行低通滤波,显示处理后的图像。originalRGB = im

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > PPT模板库 > 总结/计划/报告

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号