Group: Mathematical Functions
Subgroup: Fourier and Wavelet transforms
See also: fwt2 fwt invfwt dwt invdwt fwtin invfwtin fwtinshift

Links:
Wavelet tutorial

Function: invfwt2
Description: The algorithm invfwt2 is designed for 2 dimensional inverse wavelet transformation. The wavelet coefficients are stored in the matrix c.

Usage: x = invfwt2 (c, l, h, a)
Input:
c n x n matrix, wavelet coefficients, retrieved e.g. by fwt2. n has to be a power of 2
l integer, l^2 is the number of the father wavelets coeffients
h m x 1 vector, wavelet basis
a integer, 0,1,2,3,... see notes
Output:
x n x n matrix,

Notes:
The parameter a indicates symmetry properties of 2 dim wavelet transform. The case a = 0 corresponds to the classical 2 dim wavelet transform. The case a >= log_2(n) gives the tensor product of one dimensional wavelet transforms.
To get the vectors of the wavelet basis, the library wavelet has to be loaded. h can be daubechies2,4,6,8,10,12,14,16,18,20, symmlet4 to 10 or coiflet1 to 5.

Example:
; load the wavelet library 
library ("wavelet") 
; initialize random generator 
randomize(0) 
; generate some data (line from top left to bottom right) 
n = 16 
i = 1:n 
xo = (i.=i') 
x  = xo+0.2.*normal(n,n) 
; compute bivariate wavelet coefficients 
c = fwt2 (x, 4, daubechies4, 0); 
; hard threshold 
c = c.*(abs(c).>0.3) 
; apply inverse transformation 
y = invfwt2(c, 4, daubechies4, 0) 
; compare orginal picture with thresholded picture 
max(max(abs(y-xo),2)I 


Result:
Content of object max 
[1,]  0.48421 

Group: Mathematical Functions
Subgroup: Fourier and Wavelet transforms
See also: fwt2 fwt invfwt dwt invdwt fwtin invfwtin fwtinshift

© XploRe, generated on 6.3.98 7:17 .