De-noising or compression using wavelet packets
[XD,TREED,PERF0,PERFL2] = wpdencmp(X,SORH,N,
[XD,TREED,PERF0,PERFL2] = wpdencmp(TREE,SORH,CRIT,PAR,KEEPAPP)
wpdencmp is a one- or
two-dimensional de-noising and compression oriented function.
wpdencmp performs a
de-noising or compression process of a signal or an image, using wavelet
packet. The ideas and the procedures for de-noising and compression
using wavelet packet decomposition are the same as those used in the
wavelets framework (see
wdencmp for more information).
[XD,TREED,PERF0,PERFL2] = wpdencmp(X,SORH,N, returns
a de-noised or compressed version
XD of input signal
or two-dimensional) obtained by wavelet packets coefficients thresholding.
The additional output argument
TREED is the
wavelet packet best tree decomposition (see
more information) of
PERF0 are L2 energy
recovery and compression scores in percentages.
PERFL2 = 100 * (vector-norm of WP-cfs of
vector-norm of WP-cfs of
X is a one-dimensional signal and
PERFL2 is reduced to
SORH equal to
for soft or hard thresholding (see
Wavelet packet decomposition is performed at level
a character vector containing the wavelet name. Best decomposition
is performed using entropy criterion defined by character vector
more information). Threshold parameter is also
KEEPAPP = 1, approximation coefficients cannot
be thresholded; otherwise, they can be.
[XD,TREED,PERF0,PERFL2] = wpdencmp(TREE,SORH,CRIT,PAR,KEEPAPP) has
the same output arguments, using the same options as above, but obtained
directly from the input wavelet packet tree decomposition
wpdec for more information) of the signal
to be de-noised or compressed.
In addition if
CRIT = 'nobest' no optimization
is done and the current decomposition is thresholded.
% The current extension mode is zero-padding (see
dwtmode). % Load original signal. load sumlichr; x = sumlichr; % Use wpdencmp for signal compression. % Find default values (see
ddencmp). [thr,sorh,keepapp,crit] = ddencmp('cmp','wp',x) thr = 0.5193 sorh = h keepapp = 1 crit = threshold % De-noise signal using global thresholding with % threshold best basis. [xc,wpt,perf0,perfl2] = ... wpdencmp(x,sorh,3,'db2',crit,thr,keepapp); % Using some plotting commands, % the following figure is generated.
% Load original image. load sinsin % Generate noisy image. x = X/18 + randn(size(X)); % Use wpdencmp for image de-noising. % Find default values (see
ddencmp). [thr,sorh,keepapp,crit] = ddencmp('den','wp',x) thr = 4.9685 sorh = h keepapp = 1 crit = sure % De-noise image using global thresholding with % SURE best basis. xd = wpdencmp(x,sorh,3,'sym4',crit,thr,keepapp); % Using some plotting commands, % the following figure is generated.
% Generate heavy sine and a noisy version of it. init = 1000; [xref,x] = wnoise(5,11,7,init); % Use wpdencmp for signal de-noising. n = length(x); thr = sqrt(2*log(n*log(n)/log(2))); xwpd = wpdencmp(x,'s',4,'sym4','sure',thr,1); % Compare with wavelet-based de-noising result. xwd = wden(x,'rigrsure','s','one',4,'sym4');
Antoniadis, A.; G. Oppenheim, Eds. (1995), Wavelets and statistics, Lecture Notes in Statistics, 103, Springer Verlag.
Coifman, R.R.; M.V. Wickerhauser (1992), “Entropy-based algorithms for best basis selection,” IEEE Trans. on Inf. Theory, vol. 38, 2, pp. 713–718.
DeVore, R.A.; B. Jawerth, B.J. Lucier (1992), “Image compression through wavelet transform coding,” IEEE Trans. on Inf. Theory, vol. 38, No 2, pp. 719–746.
Donoho, D.L. (1993), “Progress in wavelet analysis and WVD: a ten minute tour,” in Progress in wavelet analysis and applications, Y. Meyer, S. Roques, pp. 109–128. Frontières Ed.
Donoho, D.L.; I.M. Johnstone (1994), “Ideal spatial adaptation by wavelet shrinkage,” Biometrika, vol. 81, pp. 425–455.
Donoho, D.L.; I.M. Johnstone, G. Kerkyacharian, D. Picard (1995), “Wavelet shrinkage: asymptopia,” Jour. Roy. Stat. Soc., series B, vol. 57 no. 2, pp. 301–369.