How can I use wavelet thresholding with nondecimated 2D decomposition of an MR image ?
이전 댓글 표시
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 ?
채택된 답변
추가 답변 (1개)
Anjoo Patel
2023년 5월 31일
0 개 추천
Image decomposition
카테고리
도움말 센터 및 File Exchange에서 Wavelet Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!