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

4 次查看(过去 30 天)
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 ?

采纳的回答

Wayne King
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.

更多回答(1 个)

Anjoo Patel
Anjoo Patel 2023-5-31

Image decomposition

类别

Help CenterFile Exchange 中查找有关 Filter Banks 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by