An image transform represents an image as a weighted sum of basis images (e.g. cosines, sinusoids, ±1 patterns), converting it from the spatial domain to a transform domain where its information is easier to analyse, compress or filter.
Definition. For an \(N\times N\) image \(f\) and a unitary transform matrix \(A\), the transform is \(F = A f A^T\) and the inverse is \(f = A^T F A\) (for real orthogonal \(A\)). Each coefficient \(F(u, v)\) tells how much of basis image \((u, v)\) is present. Examples: DFT, DCT, Walsh, Hadamard, Haar, KL transform, wavelets.
Significance
- Energy compaction: most of the image energy goes into a few low-frequency coefficients (DCT, KLT), so the rest can be discarded; this is the basis of JPEG compression.
- Decorrelation: transform coefficients are much less correlated than pixels, which helps coding.
- Filtering and enhancement: low-pass, high-pass and homomorphic filtering are simple in the frequency domain.
- Fast computation: convolution becomes multiplication; fast algorithms (FFT, fast Hadamard transform) exist.
- Feature extraction and analysis: texture, pattern recognition, image restoration and watermarking.
Hadamard transform and its basis images
Hadamard matrices contain only +1 and −1 and are built recursively:
\[H_2 = \frac{1}{\sqrt2}\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix},\quad H_{2N} = \frac{1}{\sqrt2}\begin{bmatrix}H_N & H_N\\ H_N & -H_N\end{bmatrix}\]
For \(N = 4\) (natural order, scale factor 1/2):
row 0: +1 +1 +1 +1 (0 sign changes)
row 1: +1 -1 +1 -1 (3 sign changes)
row 2: +1 +1 -1 -1 (1 sign change)
row 3: +1 -1 -1 +1 (2 sign changes)
The 2-D basis images are the outer products of rows: \(B_{uv} = h_u^T h_v\), giving 16 images of size 4×4 (with factor 1/4). For example:
B00 = h0' h0 B01 = h0' h1 B22 = h2' h2
+ + + + + - + - + + - -
+ + + + + - + - + + - -
+ + + + + - + - - - + +
+ + + + + - + - - - + +
In general \(B_{uv}(x, y) = h_u(x)\,h_v(y)\). Drawn as pictures (+1 white, −1 black), the 16 basis images are arranged in a 4×4 grid. \(B_{00}\) is all white (the average or DC term). If the rows are taken in sequency order (rows 0, 2, 3, 1 above, with 0, 1, 2, 3 sign changes), the patterns get finer as you move right or down the grid. Since all entries are ±1, the Hadamard transform needs only additions and subtractions, which makes it very fast.