HOME

TheInfoList



OR:

A discrete Hartley transform (DHT) is a
Fourier-related transform This is a list of linear transformations of functions related to Fourier analysis. Such transformations map a function to a set of coefficients of basis functions, where the basis functions are sinusoidal and are therefore strongly localized i ...
of discrete, periodic data similar to the
discrete Fourier transform In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex- ...
(DFT), with analogous applications in signal processing and related fields. Its main distinction from the DFT is that it transforms real inputs to real outputs, with no intrinsic involvement of
complex number In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form ...
s. Just as the DFT is the discrete analogue of the continuous
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
(FT), the DHT is the discrete analogue of the continuous
Hartley transform In mathematics, the Hartley transform (HT) is an integral transform closely related to the Fourier transform (FT), but which transforms real-valued functions to real-valued functions. It was proposed as an alternative to the Fourier transform by R ...
(HT), introduced by Ralph V. L. Hartley in 1942. Because there are fast algorithms for the DHT analogous to the
fast Fourier transform A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in th ...
(FFT), the DHT was originally proposed by
Ronald N. Bracewell Ronald Newbold Bracewell Order of Australia, AO (22 July 1921 – 12 August 2007) was the Lewis M. Terman Professor of Electrical Engineering of the Space, Telecommunications, and Radioscience Laboratory at Stanford University. Education B ...
in 1983 as a more efficient computational tool in the common case where the data are purely real. It was subsequently argued, however, that specialized FFT algorithms for real inputs or outputs can ordinarily be found with slightly fewer operations than any corresponding algorithm for the DHT.


Definition

Formally, the discrete Hartley transform is a linear, invertible
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
''H'': R''n'' → R''n'' (where R denotes the set of
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
s). The ''N'' real numbers ''x''0, ..., ''x''''N''−1 are transformed into the ''N'' real numbers ''H''0, ..., ''H''''N''−1 according to the formula :H_k = \sum_^ x_n \operatorname \left( \frac n k \right) = \sum_^ x_n \left \cos \left( \frac n k \right) + \sin \left( \frac n k \right) \right\quad \quad k = 0, \dots, N-1 . The combination \cos(z) + \sin(z) = \sqrt \cos\left(z-\frac\pi 4\right) is sometimes denoted , and should not be confused with , or which appears in the DFT definition (where ''i'' is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
). 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.


Properties

The transform can be interpreted as the multiplication of the vector (''x''0, ...., ''x''''N''−1) by an ''N''-by-''N''
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
; therefore, the discrete Hartley transform is a
linear operator In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
. The matrix is invertible; the inverse transformation, which allows one to recover the ''xn'' from the ''Hk'', is simply the DHT of ''Hk'' multiplied by 1/''N''. That is, the DHT is its own inverse ( involutory), up to an overall scale factor. The DHT can be used to compute the DFT, and vice versa. For real inputs ''xn'', the DFT output ''X''''k'' has a real part (''H''''k'' + ''H''''N−k'')/2 and an imaginary part (''H''''N−k'' − ''Hk'')/2. Conversely, the DHT is equivalent to computing the DFT of ''xn'' multiplied by 1 + ''i'', then taking the real part of the result. As with the DFT, a cyclic
convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...
z = x∗y of two vectors x = (''xn'') and y = (''yn'') to produce a vector z = (''zn''), all of length ''N'', becomes a simple operation after the DHT. In particular, suppose that the vectors X, Y, and Z denote the DHT of x, y, and z respectively. Then the elements of Z are given by: : \begin Z_k & = & \left X_k \left( Y_k + Y_ \right) + X_ \left( Y_k - Y_ \right) \right/ 2 \\ Z_ & = & \left X_ \left( Y_k + Y_ \right) - X_k \left( Y_k - Y_ \right) \right/ 2 \end where we take all of the vectors to be periodic in ''N'' (''XN'' = ''X''0, et cetera). 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. The inverse DHT then yields the desired vector z. In this way, a fast algorithm for the DHT (see below) yields a fast algorithm for convolution. (This is slightly more expensive than the corresponding procedure for the DFT, not including the costs of the transforms below, because the pairwise operation above requires 8 real-arithmetic operations compared to the 6 of a complex multiplication. This count doesn't include the division by 2, which can be absorbed e.g. into the 1/''N'' normalization of the inverse DHT.)


Fast algorithms

Just as for the DFT, evaluating the DHT definition directly would require O(''N''2) arithmetical operations (see
Big O notation Big ''O'' notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by Paul Bachmann, Edmund Lan ...
). 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) to Bruun's (1993), 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.) In particular, the DHT analogue of the Cooley–Tukey algorithm is commonly known as the fast Hartley transform (FHT) algorithm, and was first described by Bracewell in 1984. This FHT algorithm, at least when applied to power-of-two sizes ''N'', is the subject of the United States
patent A patent is a type of intellectual property that gives its owner the legal right to exclude others from making, using, or selling an invention for a limited period of time in exchange for publishing an enabling disclosure of the invention."A p ...
number 4,646,256, issued in 1987 to
Stanford University Stanford University, officially Leland Stanford Junior University, is a private research university in Stanford, California. The campus occupies , among the largest in the United States, and enrolls over 17,000 students. Stanford is consider ...
. Stanford placed this patent in the public domain in 1994 (Bracewell, 1995). As mentioned above, DHT algorithms are typically slightly less efficient (in terms of the number of
floating-point In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can b ...
operations) than the corresponding DFT algorithm (FFT) specialized for real inputs (or outputs). This was first argued by Sorensen et al. (1987) and Duhamel & Vetterli (1987). 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 The split-radix FFT is a fast Fourier transform (FFT) algorithm for computing the discrete Fourier transform (DFT), and was first described in an initially little-appreciated paper by R. Yavne (1968) and subsequently rediscovered simultaneously by ...
) 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 Cache, caching, or caché may refer to: Places United States * Cache, Idaho, an unincorporated community * Cache, Illinois, an unincorporated community * Cache, Oklahoma, a city in Comanche County * Cache, Utah, Cache County, Utah * Cache County ...
and
CPU pipeline In computing, a pipeline, also known as a data pipeline, is a set of data processing elements connected in series, where the output of one element is the input of the next one. The elements of a pipeline are often executed in parallel or in time- ...
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 ( and Šević, 1994). As a practical matter, highly optimized real-input FFT libraries are available from many sources (e.g. from CPU vendors such as
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
), 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 A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
''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). On the other hand, a non-DHT-based adaptation of Rader's algorithm for real-input DFTs is also possible (Chu &
Burrus ''Burrus'' is a genus of shield bugs The Pentatomoidea are a superfamily of insects in the Heteroptera suborder of the Hemiptera order. As Hemiptera, they share a common arrangement of sucking mouthparts. The roughly 7000 species under Pentat ...
, 1982).


Multi-Dimensional Discrete Hartley Transform (MD-DHT)

The rD-DHT (MD-DHT with "r" dimensions) is given by X(k_1,k_2,...,k_r)=\sum_^ \sum_^ \dots \sum_^ x(n_1,n_2,...,n_r)(\frac+\dots +\frac), with k_i = 0,1,\ldots, N_i-1 and where (x)=\cos(x)+\sin(x). 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 number In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form ...
s. Additionally, the DFT is directly obtainable from the DHT by a simple additive operation (Bracewell, 1983). 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).


Fast algorithms for the MD-DHT

As computing speed keeps increasing, bigger multidimensional problems become computationally feasible, requiring the need for fast multidimensional algorithms. Three such algorithms follow. In pursuit of separability for efficiency, we consider the following transform (Bracewell, 1983), \hat(k_1,k_2,...,k_r)=\sum_^ \sum_^ \dots \sum_^ x(n_1,n_2,...,n_r)(\frac) \dots (\frac). It was shown in Bortfeld (1995), that the two can be related by a few additions. For example, in 3-D, X(k_1,k_2,k_3) = \frac hat(k_1,k_2,-k_3)+\hat(k_1,-k_2,k_3)+\hat(-k_1,k_2,k_3)-\hat(-k_1,-k_2,-k_3) For \hat, row-column algorithms can then be implemented. This technique is commonly used due to the simplicity of such R-C algorithms, but they are not optimized for general M-D spaces. Other fast algorithms have been developed, such as radix-2, radix-4, and split radix. For example, Boussakta (2000) developed the 3-D vector radix, X(k_1,k_2,...,k_r)=\sum_^ \sum_^\sum_^ x(n_1,n_2,n_3)(\frac(n_1 k_1+n_2 k_2 +n_3 k_3)) =\sum_\sum_\sum_+\sum_\sum_\sum_+\sum_\sum_\sum_ +\sum_\sum_\sum_+\sum_\sum_\sum_+\sum_\sum_\sum_ +\sum_\sum_\sum_+\sum_\sum_\sum_. It was also presented in Boussakta (2000) that this 3D-vector radix algorithm takes (\frac)N^3 \log_2 N multiplications and (\frac)N^3 \log_2 N additions compared to 3N^3 \log_2 N multiplications and (\frac)N^3 \log_2 N+3N^2 additions from the row-column approach. 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. In Boussakta (1988), it was shown how to decompose the MD-DHT transform into a form consisting of convolutions: For the 2-D case (the 3-D case is also covered in the stated reference), X(k,l)=\sum_^ \sum_^x(n,m)(\frac+\frac),\; k=0,1,\ldots ,N-1 , l=0,1,\ldots,M-1 can be decomposed into 1-D and 2-D circular convolutions as follows, X(k,l)=\begin X_1(k,0) \\ X_2(0,l) \\ X_3(k,l)\end where X_1(k,0)=\sum_^ (\sum_^x(n,m))(\frac),\; k=0,1,\ldots,N-1 X_2(0,l)=\sum_^ (\sum_^x(n,m))(\frac),\; l=1,2,\dots, M-1 X_3(k,l)=\sum_^ \sum_^x(n,m)(\frac+\frac)\;, k=1,2,\ldots, N-1 l=1,2,\ldots,M-1. Developing X_3 further, X_3(k,l)=\sum_^x(n,0)(\frac)+\sum_^ x(0,m)(\frac) +\sum_^ \sum_^x(n,m)(\frac+\frac). At this point we present the Fermat number transform (FNT). The tth
Fermat number In mathematics, a Fermat number, named after Pierre de Fermat, who first studied them, is a positive integer of the form :F_ = 2^ + 1, where ''n'' is a non-negative integer. The first few Fermat numbers are: : 3, 5, 17, 257, 65537, 4294967 ...
is given by F_t=2^b+1, with b=2^t. The well known Fermat numbers are for t=0,1,2,3,4,5,6 (F_t is prime for 0\le t \le 4), (Boussakta, 1988). The Fermat number transform is given by X(k,l)=\sum_^ \sum_^x(n,m)\alpha_^\alpha_^ \mod F_t with k=0,\ldots, N-1, l=0,\ldots,M-1. \alpha_1 and \alpha_2 are roots of unity of order N and M respectively (\alpha_^=\alpha_^=1 \mod F_t). Going back to the decomposition, the last term for X_3(k,l) will be denoted as X_4(k,l), then X_4(k,l)=\sum_^ \sum_^x(n,m)(\frac+\frac), k=1,2,\ldots,N-1 l=1,2,\ldots,M-1. If g_1 and g_2 are primitive roots of N and M (which are guaranteed to exist if M and N are
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
) then g_1 and g_2 map (n,m) to (g_1^\mod N, g_2^m\mod M). So, mapping n,m,k and l to g_1^,g_2^, g_1^k and g_2^l, one gets the following, X_4(g_1^k,g_2^l)=\sum_^ \sum_^x(g_1^,g_2^)(\frac+\frac), k=0,1,\ldots,N-2 l=0,1,\ldots,M-2. Which is now a
circular convolution Circular convolution, also known as cyclic convolution, is a special case of periodic convolution, which is the convolution of two periodic functions that have the same period. Periodic convolution arises, for example, in the context of the discre ...
. With Y(k,l)=X_4(g_1^k,g_2^l), y(n,m)=x(g_1^,g_2^), and h(n,m)=(\frac+\frac), one has Y(k,l)=\sum_^ \sum_^y(n,m)h(_N,_M) Y(k,l)=FNT^ \


Further reading

* * * * * {{cite journal , first1=Kraig J. , last1=Olnejniczak , first2=Gerald T. , last2=Heydt , title=Scanning the Special Section on the Hartley transform , journal=
Proceedings of the IEEE The ''Proceedings of the IEEE'' is a monthly peer-reviewed scientific journal published by the Institute of Electrical and Electronics Engineers (IEEE). The journal focuses on electrical engineering and computer science. According to the ''Journa ...
, volume=82 , pages=372–380 , date=March 1994 (NB. Contains extensive bibliography.) Discrete transforms Fourier analysis