Group: | Mathematical Functions |
Topic: | Fourier and Wavelet transforms |
See also: | invfwt2 fwt invfwt dwt invdwt fwtin fwtinshift |
Function: | fwt2 | |
Description: | The algorithm fwt2 is designed for 2 dimensional wavelet transformation. It mainly corresponds to dwt for the one dimensional case. If wished it works with the tensor product of one dimensional wavelet transforms. |
Usage: | c = fwt2 (x, l, h, a) | |
Input: | ||
x | n x n matrix, the input data, where n has to be a power of 2 | |
l | integer, l^2 is the number of the father wavelet coefficients | |
h | m x 1 vector, wavelet basis | |
a | integer, 0,1,2,3,... see notes | |
Output: | ||
c | n x n matrix, resulting coefficients |
; 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))
Content of max [1,] 0.48421
Group: | Mathematical Functions |
Topic: | Fourier and Wavelet transforms |
See also: | invfwt2 fwt invfwt dwt invdwt fwtin fwtinshift |