Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips


See Also

Embedded SystemsFPGA

DSP Code Sharing > Image denoise: Threshold for sureshrink method

Image denoise: Threshold for sureshrink method

Language: Matlab

Processor: Not Relevant

Submitted by Senthilkumar R on Jul 30 2011

Licensed under a Creative Commons Attribution 3.0 Unported License

Image denoise: Threshold for sureshrink method


 
This function used to calculate threshold for sureshrink image denoising method
 
function thr = sureshrink(CD,T)
%function used to calculate threshold using sureshrink method
CD = CD(:)';
n = length(CD);
sx2 = sort(abs(CD)-T).^2;  % sorting in descending order
b  = cumsum(sx2);           %cumulative sum
risks = (n-(2*(1:n))+b)/n;
[risk,best] = min(risks);
thr = sqrt(sx2(best));
 
Rate this code snippet:
0
Rating: 0 | Votes: 0
 
   
 
posted by Senthilkumar R



Comments


 

Er.M.Kannan wrote:

10/19/2012
 
here you mention T, actually T represent what?

Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )