De-noising or compression using wavelets.
[XC,CXC,LXC,PERF0,PERFL2] = wdencmp('gbl',X,'wname',N,THR,SORH,KEEPAPP) [XC,CXC,LXC,PERF0,PERFL2] = wdencmp('gbl',C,L,W,N,THR,SORH,KEEPAPP) [XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',X, 'wname',N,THR,SORH) [XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',C,L, 'wname',N,THR,SORH) [XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',X, 'wname',N,THR,SORH) [XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',C,L, 'wname',N,THR,SORH)
input signal (1-D or 2-D)
wavelet decomposition structure
positive threshold
de-noised or compressed version of X
wavelet decomposition of XC
are L^2 recovery and compression scores in percentages.
PERFL2 = 100*(vector-norm of CXC/vector-norm of C)^2
level of Wavelet decomposition
is a string containing the wavelet name.
soft or hard thresholding
= 1, approximation coefficients cannot be thresholded, otherwise it is possible.
using one threshold value
level-dependent thresholds (THR must be of length N). For 2-D case THR must be a matrix of size 3 by N in the three orientations horizontal, diagonal and vertical.
performs a de-noising or compression process of a signal or an image using wavelets.
x=sin(2*%pi*(0:0.01:1)); xn=x+rand(x); thr=35; //compression using global thresholding [xcomp,cxd,lxd,perf0,perfl2] = wdencmp('gbl',xn,'db3',3,thr,'h',1); //denoising // Find default values [thr,sorh,keepapp] = ddencmp('den','wv',x); // De-noise signal using global thresholding option. xd = wdencmp('gbl',xn,'db3',4,thr,sorh,keepapp); scf();clf(); plot(xn); plot(xcomp,'r'); plot(xd,'g'); legend(["noisy signal","compressed signal","de-noised signal"],1); | ![]() | ![]() |