Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: wavelet
See also: fwt invfwt stein sure2d

Macro: sure
Description: Sure denoises wavelet coefficients so that the mean squared error is minimized. MSE is estimated by Stein's unbiased risk estimator based on the variance of the coefficients. Sure computes the optimal threshold for the father wavelets and each level of mother wavelets. The input arrays can be obtained by the function 'fwt'.

Link:
Usage: {at, bt} = sure (a, b)
Input:
a p x 2 array, indices and coefficients of the father wavelet
b q x 3 array, indices and coefficients of mother wavelet
Output:
at p x 2 array, thresholded father wavelet coefficients
bt q x 3 array, thresholded mother wavelet coefficients

Example:
; loads the library wavelet
library ("wavelet")
n = 128
x = grid(0, 1./n, n) 
; computes a noisy step function 
y = 0.1*(x.<=0.4) + 2*(abs(x-0.5).<0.1)
y = y + 0.5*(abs(x- 0.7)<0.1) 
y = y + normal(n)/sqrt(n)
; computes the wavelet coefficients 
{a, b} = fwt (y, 2, daubechies2) 
; thresholds the coefficients 
{at, bt} = sure (a, b) 
; computes the inverse wavelet transform 
ys = invfwt (at, bt, n, 2, daubechies2) 
d = createdisplay(1,1)
tdat = x~ys
setmaskl(tdat, (1:rows(tdat))', 4, 1, 3) 
show(d,1,1, tdat, x~y)
Result:
ys denoised estimate of y

Library: wavelet
See also: fwt invfwt stein sure2d

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Yurii Golubev, 970921
(C) MD*TECH Method and Data Technologies, 17.8.2000