At what level to threshold when using multilevel wavelet transform ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
- I = imread('cameraman.tif');
- n = prod( size(I) );
- I = double(I);
- Ib = I+25*randn(size(I));% add noise
- [C,S] = wavedec2(Ib,2,'bior3.7');
- DH = detcoef2('all',C,S,1);% extract details coefficient from level 1
- DH = DH(:);
- delta = median( abs(DH) ) / 0.6745;
- thr = delta * sqrt(2*log(n));
- NC = wthcoef2('t',C,S,1,thr,'s'); % i use the soft threshold
- X = waverec2(NC, S, 'bior3.7');
- figure;
- imagesc(Ib); title('Noisy Image'); colormap gray;
- figure;
- imagesc(X); title('Denoised 1st level coeffs'); colormap gray;
At line 10 when thresholding they use level 1,
but in line 5 while decomposing they use level 2.
Can anyone please explain why it is not thresholded at level 2?
Would that matter if we decompose at higher levels and still threshold at level 1?
I tried to run the example with level 1,2 in wavedec2 and used wthcoef2 at level 1 and level 2.
After reconstruction, results were better when thresholded at level 1. But decomposing at level 2 does not cause any effect if we thresold at level 1 as used in the above code.
Please help me understand better.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Wavelet Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!