2-D Haar wavelet transform

`[`

performs the 2-D Haar
discrete wavelet transform (DWT) of the matrix, `a`

,`h`

,`v`

,`d`

]
= haart2(`x`

)`x`

. `haart2`

returns
the approximation coefficients, `a`

, at the coarsest
level. `haart2`

also returns cell arrays of matrices
containing the horizontal, vertical, and diagonal detail coefficients
by level. If the 2-D Haar transform is computed only at one level
coarser in resolution, then `h`

, `v`

,
and `d`

are matrices. The default `level`

depends
on the number of rows of `x`

.