Scilab Wavelet Toolbox Function
Last update : Feburary 2006
dwt2 - two dimensional fast discrete wavelet transform
Calling Sequence
-
[cA,cH,cV,cD]=dwt2(img,wavename,[extension_method])
Parameters
-
img
: Input Matrix
-
wavename
: wavelet name
- 'haar': haar wavelet
- 'db1': daubechies 1 wavelet, same with haar
- 'db2': daubechies 2 wavelet
- 'db3': daubechies 3 wavelet
- 'db4': daubechies 4 wavelet
- 'db5': daubechies 5 wavelet
- 'db6': daubechies 6 wavelet
- 'db7': daubechies 7 wavelet
- 'db8': daubechies 8 wavelet
- 'db9': daubechies 9 wavelet
- 'db10': daubechies 10 wavelet
-
extension_method
: Signal Extension Method, default is 'symh'
- 'zpd': zero padding method
- 'ppd': period extension method
- 'asymh': half asymmetric extension method
- 'asymw': whold asymmetric extension method
- 'symh': half symmetric extension method
- 'symw': whole symmetric extension method
- 'sp0': border value constant extension method
- 'sp1': border value linear extension method
-
cA
: Approximation Coefficient
-
cH
: Horizontal Detail Coefficient
-
cV
: Vertical Detail Coefficient
-
cD
: Diagonal Detail Coefficient
Description
This function performs two dimensional fast discrete wavelet
transform and get four coefficients, approximation and details.
Different signal extension methods affect the result except haar
('haar') or daubechies wavelet (db1). Detailed algorithm is
fully described in userguide.
Examples
-->img=rand(64,64);
-->[cA,cH,cV,cD]=dwt2(img,'db2','zpd');
-->sig=rand(1,64);
-->[cA,cH,cV,cD]=dwt2(sig,'db2','zpd');
Please use dwt instead!
-->[cA,cH,cV,cD]=dwt2(3,'db2','symh');
Please input image matrixes rather than vectors!
See Also
dwt
,
idwt
,
idwt2