資源簡介
平移不變小波去噪程序演示 以平移不變小波為平臺
所用是作者自己改進的bayesShrik算法

代碼片段和文件信息
function??after_denoise=NewBayesShrink(x_graybase_funNthresholdalphaT1T2)
%用的是垂直方向的
%DD44?4
%db4?2?都產生了很好的結果
x_gray?=?im2double(x_gray);?%進行平移小波處理
x_gray_pingyi=pingyi(x_gray1);
c=fn_SW(x_graybase_funN);%把噪音圖像小波分解
nc=fn_SW(x_gray_pingyibase_funN);%把原始圖像小波分解?????????
newc=BayesShrink_Original(cNthresholdalphaT1T2);%調用第i種方法的BayesShrink
new_c=BayesShrink_Original(ncNthresholdalphaT1T2);
after_denoise=fn_SW(newcbase_fun-N);%重建?
after_denoise_pingyi=fn_SW(new_cbase_fun-N);
after_denoise_pingyi=pingyi(after_denoise_pingyi-1);
after_denoise=(after_denoise+after_denoise_pingyi)/2;
function?newc=BayesShrink_Original(clevelthreshold_funalphaT1T2)%各個只計算HH子帶
????????????????????[n?m]=size(c);
??if?n~=m??error(‘picture?must?be?square‘);
??????return?;
??end;
???????
?????????????deta?=?Calc_Deta(c);????????????
?????????????deta_estimate?=?deta?*256;
?????????????for?l=1:level
?????????????????t1=n/2^l;
?????????????????t2=n/2^(l-1);
????????????????%upright
????????????????threshold?=?Calc_Threshold(cdeta(1)l1);
????????????????for?i=1:t1
?????????????????for?j=t1+1:t2
?????????????????????c(ij)=Return_Threshold_Function_Value(threshold_funthresholdc(ij)alphaT1T2);
?????????????????end
????????????????end
????????????????%downleft?
????????????????threshold?=?Calc_Threshold(cdeta(2)l2);
????????????????for?i=t1+1:t2
?????????????????????for?j=1:t1
?????????????????????c(ij)=Return_Threshold_Function_Value(threshold_funthresholdc(ij)alphaT1T2);
?????????????????????end
????????????????end
????????????????%downright?
????????????????threshold?=?Calc_Threshold(cdeta(3)l3);
?????????????????for?i=t1+1:t2
?????????????????????for?j=t1+1:t2
?????????????????????c(ij)=Return_Threshold_Function_Value(threshold_funthresholdc(ij)alphaT1T2);
?????????????????????end
????????????????end
?????????????end
?????????????newc=c;
function?deta?=?Calc_Deta(c)
deta=zeros(13);
[n?m]=size(c);
t=n/2;%第一層
temp=c(1:1:tt+1:1:n);????%H
%temp=c(t+1:1:n1:1:t);%v
%temp=c(t+1:1:nt+1:1:n);??%d
temp=reshape(temp1size(temp1)*size(temp2));
%%%用第一級的所有高頻子代
%?temp1=c(t+1:1:nt+1:1:n);temp1=reshape(temp11size(temp11)*size(temp12));
%?temp2=c(t+1:1:nt+1:1:n);temp2=reshape(temp21size(temp21)*size(temp22));
%?temp=[temp1?temp2];
med?=?median(abs(temp));
deta(1)=med/0.6745;
%temp=c(1:1:tt+1:1:n);????%H
temp=c(t+1:1:n1:1:t);%v
%temp=c(t+1:1:nt+1:1:n);??%d
temp=reshape(temp1size(temp1)*size(temp2));
%%%用第一級的所有高頻子代
%?temp1=c(t+1:1:nt+1:1:n);temp1=reshape(temp11size(temp11)*size(temp12));
%?temp2=c(t+1:1:nt+1:1:n);temp2=reshape(temp21size(temp21)*size(temp22));
%?temp=[temp1?temp2];
med?=?median(abs(temp));
deta(2)=med/0.6745;
%temp=c(1:1:tt+1:1:n);????%H
%temp=c(t+1:1:n1:1:t);%v
temp=c(t+1:1:nt+1:1:n);??%d
temp=reshape(temp1size(temp1)*size(temp2));
%%%用第一級的所有高頻子代
%?temp1=c(t+1:1:nt+1:1:n);temp1=reshape(tem
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????118728??2011-01-21?17:14??小波去噪GUI程序包\afm256.png
?????文件???????3884??2011-02-24?09:51??小波去噪GUI程序包\BayesShrink.m
?????文件??????12697??2011-01-17?14:14??小波去噪GUI程序包\fn_SW.m
?????文件??????66614??2011-02-21?23:40??小波去噪GUI程序包\lena256_noise10.bmp
?????文件??????66614??2011-02-22?01:11??小波去噪GUI程序包\lena256_noise20.bmp
?????文件??????66614??2011-02-22?01:29??小波去噪GUI程序包\lena256_noise30.bmp
?????文件??????66614??2011-02-22?01:40??小波去噪GUI程序包\lena256_noise35.bmp
?????文件???????3851??2011-02-24?09:50??小波去噪GUI程序包\NewBayesShrink.m
?????文件????????433??2011-02-20?09:35??小波去噪GUI程序包\pingyi.m
?????文件???????1241??2011-02-24?09:10??小波去噪GUI程序包\Return_Threshold_Function_Value.asv
?????文件???????1228??2011-02-24?09:50??小波去噪GUI程序包\Return_Threshold_Function_Value.m
?????文件???????2630??2011-02-24?10:44??小波去噪GUI程序包\VisulShrink.m
?????文件??????10565??2011-02-24?12:38??小波去噪GUI程序包\WaveletDenoiseTool.asv
?????文件???????5913??2011-02-24?10:49??小波去噪GUI程序包\WaveletDenoiseTool.fig
?????文件??????10563??2011-02-24?12:39??小波去噪GUI程序包\WaveletDenoiseTool.m
?????目錄??????????0??2011-02-24?21:11??小波去噪GUI程序包
-----------?---------??----------?-----??----
???????????????438189????????????????????16
評論
共有 條評論