List of Functions
1D DWT/IDWT Functions
x - 1D Input Signal Array
J- Decomposition levels
nm- Wavelet Name (see filtcoef for list of names)
ext- Extension. Either 'sym' for symmetric or 'per' for periodic extension.
The function requires all four input fields.
dwtop- DWT Coefficients with approximation and detail coefficients arranged as {A(J),D(J),D(J-1),....D(1)}.
D(n) corresponds to detail coefficient at the nth level of decomposition
length- Length vector which corresponds to lengths of approximation and detail coefficients arranged as above. First value corresponds to length of approximation coefficient at level J, second value to length of detail coefficients at level J and so on.
flag- Vector to store values of J, padding etc.
(dwtop,length,flag)- Outputs of DWT stage.
nm- Wavelet name
idwt_output - IDWT Output
1D DWT/IDWT Example | IPython Demo | Python Source Code |
1D SWT/ISWT Functions
x - 1D Input Signal Array (Dyadic Length)
J- Decomposition levels
nm- Wavelet Name (see filtcoef for list of names)
swtop- SWT Coefficients with approximation and detail coefficients arranged as {A(J),D(J),D(J-1),....D(1)}.
D(n) corresponds to detail coefficient at the nth level of decomposition
length- length of each approximation and decomposition vector. All vectors are of same length.
swtop- SWT Output
J- Decomposition Levels
nm- Wavelet Name
iswtop- ISWT Output
1D SWT/ISWT Example | IPython Demo | Python Source Code |
2D DWT/IDWT Functions
x- Input 2D Array
J- Decomposition levels
nm- Wavelet Name (see filtcoef for list of names)
ext- Extension. Either 'sym' for symmetric or 'per' for periodic extension.
dwtop- DWT Coefficients with approximation and detail coefficients arranged as {A(J),D(J),D(J-1),....D(1)}.
D(n) corresponds to detail coefficient at the nth level of decomposition
length- Length vector which corresponds to rows and columns length of approximation and detail coefficients arranged as above. {See def dwt2 in dwt.py}-
flag- Vector to store values of J, padding etc.
(dwtop,length,flag)- Outputs of DWT stage.
nm- Wavelet name
idwt_output - IDWT Output
2D DWT/IDWT Example | IPython Demo | Python Source Code |
2D SWT Function
x - 2D Input Signal Array (Dyadic dimensions)
J- Decomposition levels
nm- Wavelet Name (see filtcoef for list of names)
swtop- SWT Coefficients with approximation and detail coefficients arranged as {A(J),D(J),D(J-1),....D(1)}.
D(n) corresponds to detail coefficient at the nth level of decomposition
length- Row and column lengths of each approximation and decomposition array. All 2D coefficient arrays have same dimensions so length contains only two elements {row,column}
2D ISWT function has not been implemented.
2D SWT/ISWT Example | IPython Demo | Python Source Code |
Convolution
Recommended This function uses numpy's inbuilt FFT function to compute the convolution.a and b are input functions while c is the output.The output isn't strictly real but can be made real by using numpy.real(c)
For small 1D direct vectors, direct convolution may be the way to go. a and b are input functions while c is the output.
Convolution Example | IPython Demo | Python Source Code |
Wavelet Filter
nm: Wavelet name.
lpd: Low Pass Decomposition Filter Coefficients.
hpd: High Pass Decomposition Filter Coefficients.
lpr: Low Pass Reconstruction Filter Coefficients.
hpr: High Pass Reconstruction Filter Coefficients.
Currently, following Wavelets are available:
Daubechies : db1,db2,.., ,db15
Biorthogonal: bior1.1 ,bior1.3 ,bior1.5 ,bior2.2 ,bior2.4 ,bior2.6 ,bior2.8 ,bior3.1 ,bior3.3 ,bior3.5 , bior3.7 ,bior3.9 ,bior4.4 ,bior5.5 ,bior6.8
Coiflets: coif1,coif2,coif3,coif4,coif5
Symmlets: sym2,........, sym10
Filter Display Example | IPython Demo | Python Source Code |
Signal Extension
x Input Signal
a Signal Extension in both directions
y Extended signal of length len(x)+2*a
x Input Signal
a Signal Extension in both directions
y Extended signal of length len(x)+2*a
1D Signal Extension Example | IPython Demo | Python Source Code |
Image Extension
x Input Image of Dimension (row,col)
a Signal Extension in all four directions
y Extended Image of Dimension(row+2*a,col+2*a)
x Input Image of Dimension (row,col)
a Signal Extension in all four directions
y Extended Image of Dimension(row+2*a,col+2*a)
2D Image Extension Example | IPython Demo | Python Source Code |