資源簡介
在聯合沖擊濾波器和非線性各向異性擴散濾波器對含噪圖像做預處理的基礎上,利用邊緣檢測算子選取自適應參數,構建能同時兼顧圖像平滑去噪與邊緣保留的自適應全變分模型,并基于Bregman迭代正則化方法設計了其快速迭代求解算法。實驗結果表明,自適應去噪模型及其求解算法在快速去除噪聲的同時保留了圖像的邊緣輪廓和紋理等細節信息,得到的復原圖像在客觀評價標準和主觀視覺效果方面均有所提高。

代碼片段和文件信息
%?Decompose?textures?in?image?with?spectral?TV?gray-scale?images
%?script?by?Guy?Gilboa?(Jan?2015).
%?based?on:?[1]?G.?Gilboa?“A?total?variation?spectral?framework?for?scale?and?texture?analysis.“?SIAM?Journal?on?Imaging?Sciences?7.4?(2014):?1937-1961.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%?Important?params?to?change?according?to?image?/?application?%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Max_time?=?1;???????%?Maximal?scale?to?be?processed?(in?evolution?time)
%Max_time?=?40;?????%?large?scale
Num_of_bands?=?50;??%?Number?of?bands?phi(xt);
%%
dt?=?Max_time/Num_of_bands;?
f?=?double(imread(‘fruits.bmp‘));?
%f?=?f(50:10050:100);?%?debug
f?=?double(f);
f?=?f(21:18571:240);??%?fruits?melon
f?=?f/255;??%?pixels?are?in?the?range?[01]
figure(1);?imshow(f);?title(‘f‘)
%?Compute?Phi?bands?and?residual?f_r
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[STPhif_r]?=?specTV_evolve(f?Max_time?dt);??%?evolve?image
%?Define?Filters
hp_i?=?10;
bp_low_i=13;?bp_high_i?=?30;??%?incices?of?low?and?high?bandpass?cutoff?
H1?=?zeros(size(T));
H1(1:lp_i)=1;??%?high?pass?melon
H2?=?zeros(size(T));
H2(bp_low_i:bp_high_i)=1;??%?band?pass?melon
%?Reconstruct?filtered?image?given?Phi?H?and?f_r
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f_H1?=?specTV_filter(?Phi?H1?f_r?dt?);
f_H2?=?specTV_filter(?Phi?H2?f_r?dt?);
%?Plot?S(t)?and?filter?response
figure(3);?plot(TS‘b‘T(1:hp_i)S(1:hp_i)‘g‘T(bp_low_i:bp_high_i)S(bp_low_i:bp_high_i)‘r‘);
xlabel(‘t‘);?
legend(‘Spectrum?S(t)‘‘High?Pass?Filter?H1(t)‘?‘Band?Pass?Filter?H2(t)‘)
%?show?a?few?Phi(t)?instances
%phi_show?=?[4?20?30?50];
figure(4);?
imshow(0.5+f_H1*2);
title(‘High?Pass?image?f_{H1}?x?2‘)
figure(5);?
imshow(0.5+f_H2);
title(‘Band?Pass?image?f_{H2}‘)
figure(6);?
imshow(f_r);?title(‘Residual?f_r?(Low-pass)‘)
Ind?=?1:10;????%?Index?of?phi?bands
RbyC?=?[2?5];??%?Row?by?Column?boxes
fignum?=10;????%?Num?of?figure
Rescale?=?1;???%?Possible?image?size?rescaling?(1?-?no?rescale?>1?larger?images)
contrast?=?5;
I?=?specTV_show_phi(?Phi*contrastdt?Ind?RbyC?fignum?Rescale);
title([‘A?few?instances?of?\phi(x;t)?from?bands?‘?num2str(Ind(1))?‘?to?‘?num2str(Ind(end))])
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-02-09?18:28??SpecTV_grayscale\
?????文件????????2022??2015-02-09?18:38??SpecTV_grayscale\demo_specTV_grayscale.asv
?????文件????????2282??2015-02-09?19:05??SpecTV_grayscale\demo_specTV_grayscale.m
?????文件???????90626??2001-11-19?16:54??SpecTV_grayscale\fruits.bmp
?????文件????????1248??2013-04-08?23:42??SpecTV_grayscale\proj_tvl2.m
?????文件????????1509??2015-02-09?18:51??SpecTV_grayscale\specTV_evolve.m
?????文件?????????421??2015-02-09?18:52??SpecTV_grayscale\specTV_filter.m
?????文件????????1151??2015-02-09?17:52??SpecTV_grayscale\specTV_show_phi.m
- 上一篇:勢函數的matlab實現
- 下一篇:local outlier factor檢測
評論
共有 條評論