資源簡介
文件包含了3中模糊圖像去噪的源代碼和分析,是在前人的基礎上總結的。直接運行即可。環境是matlab7.0 .是一門課的期末作業。

代碼片段和文件信息
%?------------------------------------中值濾波--------------------------------------------------------------------
clc;
clear;
close?all;
img=rgb2gray(imread(‘lena.bmp‘));
x1=imnoise(img‘gaussian‘00.02);%高斯噪聲??????
x2=imnoise(img‘salt?&?pepper‘0.02);%椒鹽噪聲???
%?x3?=?imnoise(img‘speckle‘);%乘性噪聲?????????????
%?x4=imnoise(img‘poisson‘);%泊松噪聲?????
%?高斯噪聲
figure(1);
???????????????????????????subplot(231);????imshow(img);??xlabel(‘a)‘‘Fontsize‘32);%原始圖像
???????????????????????????subplot(232);????imshow(x1);???xlabel(‘b)‘‘Fontsize‘32);?%加噪聲
?????????????????????????
???????????????????????????title(‘中值濾波?-?高斯噪聲‘‘Fontsize‘32);
?????????????????????????
k1=medfilt2(x1[3?3]);?????subplot(233);????imshow(k1);???xlabel(‘c)‘‘Fontsize‘32);%?3?X?3?濾波后
k2=medfilt2(x1[7?7]);?????subplot(234);????imshow(k2);???xlabel(‘d)‘‘Fontsize‘32);%?7?X?7?濾波后
k3=medfilt2(x1[11?11]);???subplot(235);????imshow(k3);???xlabel(‘e)‘‘Fontsize‘32);%?11?X?11?濾波后
k4=medfilt2(x1[15?15]);???subplot(236);????imshow(k4);???xlabel(‘f)‘‘Fontsize‘32);%?15?X?15?濾波后
%椒鹽噪聲
figure(2);
???????????????????????????subplot(231);???imshow(img);??xlabel(‘a)‘‘Fontsize‘32);%原始圖像
???????????????????????????subplot(232);???imshow(x2);???xlabel(‘b)‘‘Fontsize‘32);?%加噪聲
?????????????????????????
???????????????????????????title(‘中值濾波?-?椒鹽噪聲‘‘Fontsize‘32);
?????????????????????????
k1=medfilt2(x2[3?3]);?????subplot(233);???imshow(k1);???xlabel(‘c)‘‘Fontsize‘32);%?3?X?3?濾波后
k2=medfilt2(x2[7?7]);?????subplot(234);???imshow(k2);???xlabel(‘d)‘‘Fontsize‘32);%?7?X?7?濾波后
k3=medfilt2(x2[11?11]);???subplot(235);???imshow(k3);???xlabel(‘e)‘‘Fontsize‘32);%?11?X?11?濾波后
k4=medfilt2(x2[15?15]);???subplot(236);???imshow(k4);???xlabel(‘f)‘‘Fontsize‘32);%?15?X?15?濾波后
%?------------------------------------end-------------------------------------------------------------------
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1048630??2012-06-26?13:13??3種模糊圖像去噪:中值、維納和全變分\lena.bmp
?????文件???????2513??2012-06-26?14:01??3種模糊圖像去噪:中值、維納和全變分\medianfilter_denoise.asv
?????文件???????1988??2012-06-26?14:06??3種模糊圖像去噪:中值、維納和全變分\medianfilter_denoise.m
?????文件???????1606??2012-06-26?14:08??3種模糊圖像去噪:中值、維納和全變分\tv.m
?????文件???????1746??2012-06-26?14:07??3種模糊圖像去噪:中值、維納和全變分\tv_denoise.m
?????文件???????1990??2012-06-26?14:07??3種模糊圖像去噪:中值、維納和全變分\Weinerfilter_denoise.m
?????文件??????44269??2012-06-04?14:35??3種模糊圖像去噪:中值、維納和全變分\個人作業.jpg
?????文件????3173056??2012-06-26?18:04??3種模糊圖像去噪:中值、維納和全變分\模糊圖像去噪技術的研究與實現.doc
?????文件????????179??2012-06-26?18:09??3種模糊圖像去噪:中值、維納和全變分\說明.txt
?????目錄??????????0??2012-06-26?18:10??3種模糊圖像去噪:中值、維納和全變分
-----------?---------??----------?-----??----
??????????????4275977????????????????????10
評論
共有 條評論