THE HADAMARD TRANSFORM
1. The elements of the basis vectors of the Hadamard transform take only the binary
   values ± 1 and are, therefore, well suited for digital signal processing.
2. The Hadamard transform matrices, Hn , are N x N matrices, where
   These can be easily generated by the core matrix
   and the Kronecker product recursion
                                                                         -------(1)
3. As an example for n=3, the Hadamard matrix becomes
                             --------(2)
   which gives
4. The basis vectors of the Hadamard transform can also be generated by sampling a
   class of functions called the Walsh functions. These functions also take only the
   binary values ± 1 and form a complete orthonormal basis for square integrable
   functions. For this reason the Hadamard transform just defined is also called the
   Walsh-Hadamard transform.
5. The number of zero crossings of a Walsh function or the number of transitions in
   a basis vector of the Hadamard transform is called its sequency. In the Hadamard
   matrix generated via (2), the row vectors are not sequency ordered.
6. The existing sequency order of these vectors is called the Hadamard order. The
   Hadamard transform of an N x 1 vector u is written as
   v = Hu                   ----------------------------(3)
   and the inverse transform is given by
   u = Hv                   ----------------------------(4)
   where
7. In series form, the transform pair becomes
   where
   and {ki},{mi} are the binary representations of k and m, respectively.
8. The basis vectors of the Hadamard transform is given by
   9. Properties of the Hadamard Transform
(1)The Hadamard transform H is real, symmetric, and orthogonal, that is,
(2) The Hadamard transform is a fast transform. The one-dimensional transformation of
eqn (3) can be implemented in O(N log2 N) additions and subtractions.
      Since the Hadamard transform contains only ±1 values, no multiplications are
required in the transform calculations.
(3) The natural order of the Hadamard transform coefficients turns out to be equal to
the bit reversed gray code representation of its sequency. Table below shows the
conversion of sequency s to natural order h, and vice versa, for N = 8.
(4) The Hadamard transform has good to very good energy compaction for highly
correlated images.