



ifwt2.m
Inverse fast 2D wavelet transform.
Usage: x = ifwt2(w, g0, g1, J, sym);
x - mxn output image (min(m,n) must be divisible by 2^J)
w - mxn input image of wavelet coeffients
g0 - lowpass reconstruction filter
g1 - highpass reconstruction filter
g0 and g1 should be zero padded appropriately so that they have the
same length, and this length is even.
J - number of levels in the filter bank.
Right now, it must be chose so that n*2^(-J) >= length(g0)
sym - How the input was extended when the forward transform was taken.
sym=0: periodization
sym=1: type-I symmetric extension ( [... x(2) x(1) x(2) x(3) ...])
The wavelet filters must have type-I even symmetry
(e.g. daub79)
sym=2: type-II symmetric extension ( [... x(2) x(1) x(1) x(2) x(3) ...])
The lowpass filter must have type-II even symmetry,
The highpass filter must have type-II odd symmetry.
(e.g. daub1018)
Written by: Justin Romberg
Created: April 2007

0001 % ifwt2.m 0002 % 0003 % Inverse fast 2D wavelet transform. 0004 % 0005 % Usage: x = ifwt2(w, g0, g1, J, sym); 0006 % x - mxn output image (min(m,n) must be divisible by 2^J) 0007 % w - mxn input image of wavelet coeffients 0008 % g0 - lowpass reconstruction filter 0009 % g1 - highpass reconstruction filter 0010 % g0 and g1 should be zero padded appropriately so that they have the 0011 % same length, and this length is even. 0012 % J - number of levels in the filter bank. 0013 % Right now, it must be chose so that n*2^(-J) >= length(g0) 0014 % sym - How the input was extended when the forward transform was taken. 0015 % sym=0: periodization 0016 % sym=1: type-I symmetric extension ( [... x(2) x(1) x(2) x(3) ...]) 0017 % The wavelet filters must have type-I even symmetry 0018 % (e.g. daub79) 0019 % sym=2: type-II symmetric extension ( [... x(2) x(1) x(1) x(2) x(3) ...]) 0020 % The lowpass filter must have type-II even symmetry, 0021 % The highpass filter must have type-II odd symmetry. 0022 % (e.g. daub1018) 0023 % 0024 % Written by: Justin Romberg 0025 % Created: April 2007