error in thresholding

1 次查看(过去 30 天)
kash
kash 2012-6-6
I have a code
x=rand(64,64,16)
J=1;T=50;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;
w = dualtree3D(x, J, Faf, af);
for j = 1:J
% loop thru subbands
for s1 = 1:2
for s2 = 1:3
w{j}{s1}{s2} = soft((w{j}{s1}{s2}),T);
end
I get same number of coefficients before and after thresholding,please help,after threshold the number of elements is it correct ,if so please tell where i had done mistake

回答(1 个)

Wayne King
Wayne King 2012-6-6
soft thresholding shouldn't change the total number of coefficients. What soft thresholding will do is to change the value of the those coefficients and with many images and signals, it will significantly change the number of coefficients that are near zero.
Even hard thresholding will still return the same number of coefficients, it's just that many of them will be set to 0, so you can throw them away.
  3 个评论
Wayne King
Wayne King 2012-6-6
I'm not sure what you mean by "lower" coefficients, but the higher the threshold, the more wavelet coefficients will be shrunk toward zero in the case of soft thresholding.
kash
kash 2012-6-6
i have left soft and hard thresholding ,as per your comment ,now how to threshold the image so that i get lesser number of co-efficients as compared to original image in my above code

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by