Discrete Hartley transform

Just as the DFT is the discrete analogue of the continuous Fourier transform (FT), the DHT is the discrete analogue of the continuous Hartley transform (HT), introduced by Ralph V. L. Hartley in 1942.

[1] Because there are fast algorithms for the DHT analogous to the fast Fourier transform (FFT), the DHT was originally proposed by Ronald N. Bracewell in 1983[2] as a more efficient computational tool in the common case where the data are purely real.

As with the DFT, the overall scale factor in front of the transform and the sign of the sine term are a matter of convention.

Although these conventions occasionally vary between authors, they do not affect the essential properties of the transform.

Conversely, the DHT is equivalent to computing the DFT of xn multiplied by 1 + i, then taking the real part of the result.

Thus, just as the DFT transforms a convolution into a pointwise multiplication of complex numbers (pairs of real and imaginary parts), the DHT transforms a convolution into a simple combination of pairs of real frequency components.

This count doesn't include the division by 2, which can be absorbed e.g. into the 1/N normalization of the inverse DHT.)

Just as for the DFT, evaluating the DHT definition directly would require O(N2) arithmetical operations (see Big O notation).

There are fast algorithms similar to the FFT, however, that compute the same result in only O(N log N) operations.

Nearly every FFT algorithm, from Cooley–Tukey to prime-factor to Winograd (1985)[3] to Bruun's (1993),[4] has a direct analogue for the discrete Hartley transform.

(However, a few of the more exotic FFT algorithms, such as the QFT, have not yet been investigated in the context of the DHT.)

[5] This FHT algorithm, at least when applied to power-of-two sizes N, is the subject of the United States patent number 4,646,256, issued in 1987 to Stanford University.

[6] As mentioned above, DHT algorithms are typically slightly less efficient (in terms of the number of floating-point operations) than the corresponding DFT algorithm (FFT) specialized for real inputs (or outputs).

[8] The latter authors obtained what appears to be the lowest published operation count for the DHT of power-of-two sizes, employing a split-radix algorithm (similar to the split-radix FFT) that breaks a DHT of length N into a DHT of length N/2 and two real-input DFTs (not DHTs) of length N/4.

In this way, they argued that a DHT of power-of-two length can be computed with, at best, 2 more additions than the corresponding number of arithmetic operations for the real-input DFT.

On present-day computers, performance is determined more by cache and CPU pipeline considerations than by strict operation counts, and a slight difference in arithmetic cost is unlikely to be significant.

Since FHT and real-input FFT algorithms have similar computational structures, neither appears to have a substantial a priori speed advantage (Popović [sr] and Šević, 1994).

[9] As a practical matter, highly optimized real-input FFT libraries are available from many sources (e.g. from CPU vendors such as Intel), whereas highly optimized DHT libraries are less common.

On the other hand, the redundant computations in FFTs due to real inputs are more difficult to eliminate for large prime N, despite the existence of O(N log N) complex-data algorithms for such cases, because the redundancies are hidden behind intricate permutations and/or phase rotations in those algorithms.

In contrast, a standard prime-size FFT algorithm, Rader's algorithm, can be directly applied to the DHT of real data for roughly a factor of two less computation than that of the equivalent complex FFT (Frigo and Johnson, 2005).

[10] On the other hand, a non-DHT-based adaptation of Rader's algorithm for real-input DFTs is also possible (Chu & Burrus, 1982).

Similar to the 1-D case, as a real and symmetric transform, the MD-DHT is simpler than the MD-DFT.

For one, the inverse DHT is identical to the forward transform, with the addition of a scaling factor; and second, since the kernel is real, it avoids the computational complexity of complex numbers.

[2] The MD-DHT is widely used in areas like image and optical signal processing.

Specific applications include computer vision, high-definition television, and teleconferencing, areas that process or analyze motion images (Zeng, 2000).

This technique is commonly used due to the simplicity of such R-C algorithms, but they are not optimized for general M-D spaces.

The drawback is that the implementation of these radix-type of algorithms is hard to generalize for signals of arbitrary dimensions.

Number theoretic transforms have also been used for solving the MD-DHT, since they perform extremely fast convolutions.

It was also stated in (Boussakta, 1988)[15] that this algorithm reduces the number of multiplications by a factor of 8–20 over other DHT algorithms at a cost of a slight increase in the number of shift and add operations, which are assumed to be simpler than multiplications.

The drawback of this algorithm is the constraint that each dimension of the transform has a primitive root.