How to decide upon a threshold

3 views (last 30 days)
Bran
Bran on 16 May 2013
I am using the function wthresh to carry out soft thresholding on my wavelet coefficients however, I was wondering if someone could advise me and how to decide upon the best threshold to use. How is the best threshold usually determined?
many thanks in advance Bran

Accepted Answer

Image Analyst
Image Analyst on 16 May 2013
try my interactive thresholding app: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. Once you find a good threshld visually, try to figure out an algorithm to determine that from the histogram. As you know there is not one threshold or one algorithm that works best for all images ever taken in the universe. So you have to figure out the algorithm that works best for you.
  2 Comments
Bran
Bran on 16 May 2013
Thanks so much for your response! My only trouble is I am working with wavelet coefficients only. I am very new to the area and so I'm not sure how to go about setting the threshold myself. Also I wanted to say that what I am trying to do looks like the following; tmp = fftn(MAT); Adash = fftshift(tmp);
Awave=dwt3(Adash,'sym2');
Y = wthresh(Awave,'s',T); %must decide on T depending on Awave
Awaveup = idwt3(Y, 'sym2');
Adashup=ifftshift(Awaveup);
Adashup2 = ifftn(Adashup);
However, I get the following error when I simply pick say 0.1 for my threshold value;
wthresh doesnt work on structs.
T=0.1;
Y = wthresh(Awave,'s',T); %must decide on T depending on Awave
your Awave variable is a struct consisting of:
Awave =
sizeINI: [17 17 17]
filters: [1x1 struct]
mode: 'sym'
dec: {2x2x2 cell}
Any ideas?
Image Analyst
Image Analyst on 16 May 2013
I don't have the wavelet toolbox so I don't know what wthresh() does or how to use it. I'd have to look it up in the help - same as you. Sorry. Maybe Wayne King will see your question and answer you.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!