Documentation

ddencmp

Default values for denoising or compression

Syntax

[THR,SORH,KEEPAPP,CRIT] = ddencmp(IN1,IN2,X)
[THR,SORH,KEEPAPP] = ddencmp(IN1,'wv',X)
[THR,SORH,KEEPAPP,CRIT] = ddencmp(IN1,'wp',X)

Description

ddencmpreturns default values for denoising or compression for the critically-sampled discrete wavelet or wavelet packet transform.

You can useddencmpfor 1-D signals or 2-D images.

[THR,SORH,KEEPAPP,CRIT] = ddencmp(IN1,IN2,X)returns default values for denoising or compression, using wavelets or wavelet packets, of an input vector or matrixX, which can be a one- or two-dimensional signal.THRis the threshold,SORHis for soft or hard thresholding,KEEPAPPallows you to keep approximation coefficients, andCRIT(used only for wavelet packets) is the entropy name (seewentropyfor more information).

IN1is'den'for denoising or'cmp'for compression.

IN2is'wv'for wavelet or'wp'for wavelet packet.

For wavelets (three output arguments):

[THR,SORH,KEEPAPP] = ddencmp(IN1,'wv',X)returns default values for denoising (ifIN1 = 'den') or compression (ifIN1 = 'cmp') ofX. These values can be used forwdencmp.

For wavelet packets (four output arguments):

[THR,SORH,KEEPAPP,CRIT] = ddencmp(IN1,'wp',X)returns default values for denoising (ifIN1 = 'den') or compression (ifIN1 = 'cmp') ofX. These values can be used forwdencmp.

Examples

collapse all

Determine the default global denoising threshold for an N(0,1) white noise input. Create an N(0,1) white noise input. Set the random number generator to the default initial settings for reproducible results.

dwtmode('per'); rngdefault; x = randn(512,1);
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: Change DWT Extension Mode ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ***************************************** ** DWT Extension Mode: Periodization ** *****************************************

Useddencmpto obtain the default global threshold for wavelet denoising. Demonstrate that the threshold is equal to the universal threshold of Donoho and Johnstone scaled by a robust estimate of the variance.

[thr,sorh,keepapp] = ddencmp('den','wv',x); [A,D] = dwt(x,'db1'); noiselev = median(abs(D))/0.6745; thresh = sqrt(2*log(length(x)))*noiselev;

Compare the value of the variablethrto the value ofthresh.

Determine the default global compression threshold for an N(0,1) white noise input.

Create an N(0,1) white noise input. Set the random number generator to the default initial settings for reproducible results.

dwtmode('per'); rngdefault; x = randn(512,1);
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: Change DWT Extension Mode ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ***************************************** ** DWT Extension Mode: Periodization ** *****************************************

Useddencmpwith the'cmp'and'wp'input arguments to return the default global compression threshold for a wavelet packet transform.

[thr,sorh,keepapp,crit] = ddencmp('den','wp',x);

References

Donoho, D.L. (1995), "De-noising by soft-thresholding,"IEEE,Trans. on Inf. Theory, 41, 3, pp. 613–627.

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 (1994), "Ideal de-noising in an orthonormal basis chosen from a library of bases,"C.R.A.S. Paris,Ser. I, t. 319, pp. 1317–1322.

Extended Capabilities

Introduced before R2006a

Was this topic helpful?