Wavelet Denoising Using imfilter

1 回表示 (過去 30 日間)
Miguel Alfonso Mendez
Miguel Alfonso Mendez 2017 年 3 月 14 日
編集済み: Miguel Alfonso Mendez 2017 年 3 月 14 日
Hello,
I have a basic question on wavelets for image processing. In order to see if I understand correctly the wavelet equation and the denoising tools, I am trying to do the a simple exercise in two ways that should be (or shouldn't they ?) theoretically equal.
Let's assume that we want to extract the 4-th level approximation of the image 'woman' using the sym8 wavelet. From the formula, it seems that this should simply be the convolution with the 2d wavelet of size 2^4. Or, we could do the wavelet decomposition (wavedec2) and then use the wdencmp command with a hard threshold setting to a very large number to remove all the details terms
That is:
load woman LEVELS=4; %Number of levels
%% Method 1: Convolution %Prepare the 2D Wavelet Scaling Function [S,W1,W2,W3,XYVAL] = wavefun2('sym8',LEVELS); %Normalize the output S_n=S/(2^LEVELS); %Perform Convolution M_1=conv2(X,S_n,'same');
%% Method 2: Trasform and use Dummy Hard Threshold % Dummy threshold MATRIX THR_v=ones([1,LEVELS])*realmax; THR=repmat(THR_v,[3,1]); % Decomposition [C,L] = wavedec2(X,lev,'sym8'); % Hard Thresholding M_2=wdencmp('lvd',X,'sym8',lev,THR,'h');
figure subplot(1,2,1) imagesc(M_1) colorbar subplot(1,2,2) imagesc(M_2) colorbar
Besides an obvious problem in the scaling, the results look qualitatively different. Where am I doing the mistake? in the theory or in the practice :) ?
Thank you for you help
Miguel

回答 (0 件)

カテゴリ

Help Center および File ExchangeDenoising and Compression についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by