MATLAB Answers

0

How can I use wavelet thresholding with nondecimated 2D decomposition of an MR image ?

Asked by Hareni Jagadeesan on 28 Dec 2013
Latest activity Answered by Wayne King
on 28 Dec 2013
I am applying Bilateral Filter to the approximations and I want to soft threshold the details from level 3 ..How can I implement wthcoef2 for the non decimated wavelet decomposition structure ?
data = load('mri'); % MRI dataset (magnitude image) distributed with MATLAB
image_num=15;
im = double(data.D(:,:,1,image_num)); % image_num max=27
s=5;
im_r = rician(im, s); % Add Rician noise (make Rician distributed)
% Compute ranges
min_o = round(min(im(:)));
max_o = round(max(im(:)));
min_r = round(min(im_r(:)));
max_r = round(max(im_r(:)));
s = 0.05*max_o; % Percentage of NOISE LEVEL
im_R=rician(im,s);
w='haar';
NBCOL = size(data.map,1);
n=3;
%Multilevel Undecimated Discrete 2D Wavelet Transform
WT = ndwt2(im_R,n,w);
A = cell(1,n);
D = cell(1,n);
for k = 1:n
A{k} = indwt2(WT,'a',k); % Approximations
D{k} = indwt2(WT,'d',k); % Details
end
DH=[];
for k=1:n
D1=D{k};
D1=D1(:);
DH=[DH D1];
end
delta=median(abs(DH))/0.6745;
thr=delta * sqrt(2*log(n));
NC = wthcoef2('t',WT.dec,WT.sizes,1,thr,'s');
What should I use instead of WT.dec and WT.sizes ?

  0 Comments

Sign in to comment.

Tags

Products

1 Answer

回答者: Wayne King
2013 年 12 月 28 日
 採用された回答

You want to use sw2dtool
>>sw2dtool
Interactively play with your denoising and then select
File -> Generate MATLAB Code (Denoising Process)
That will generate the MATLAB code to show you how to do it from the command line.

  0 Comments

Sign in to comment.