Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология Образование Политология Производство Психология Стандартизация Технологии |
Properties of the Fourier transform
Periodicity of DFT. The kernel of the DFT Eq. (2.25) shows a character- istic periodicity
48 2 Image Representation
A b
Figure 2.14: Geometric interpretation of the periodicity of the one- and two- dimensional DFT with a the Fourier ring and b the Fourier torus.
The defi nitions of the DFT restrict the spatial domain and the Fourier domain to a fi nite number of values. If we do not care about this restric- tion and calculate the forward and back transformation for all integer numbers, we fi nd from Eqs. (2.37) and (2.39) the same periodicities for functions in the space and Fourier domain:
wave number domain gˆ u+kM, v+lN = gˆ u, v, ∀ k, l ∈ Z
(2.44) space domain gm+kM, n+lN = gm, n, ∀ k, l ∈ Z.
Symmetries. Four types of symmetries are important for the Fourier transform: even g(− x ) = g( x ), odd g(− x ) = − g( x ), hermitian g(− x ) = g∗ ( x ), anti-hermitian g(− x ) = − g∗ ( x )
(2.45)
2.3 Wave Number Space and Fourier Transform 49 Any function g( x ) can be split into its even and odd parts by
2 and og( x ) g( x ) − g( − x ). (2.46)
With this partition, the Fourier transform can be parted into a cosine and a sine transform: ∞ ∞ gˆ ( k ) = 2∫ eg( x ) cos(2π k T x )dW x + 2i∫ og( x ) sin(2π k T x )dW x. (2.47) 0 0 It follows that if a function is even or odd, its transform is also even or odd. The full symmetry relations are: real ◦ • Hermitian imaginary ◦ • anti-Hermitian Hermitian ◦ • real anti-Hermitian ◦ • imaginary even ◦ • even odd ◦ • odd real and even ◦ • real and even real and odd ◦ • imaginary and odd imaginary and even ◦ • imaginary and even imaginary and odd ◦ • real and odd (2.48)
g− m, − n = ±gm, n ≡ gM− m, N− n = ±gm, n (2.49)
The study of symmetries is important for practical purposes. Care- ful consideration of symmetry allows storage space to be saved and al- gorithms to speed up. Such a case is real-valued images. Real-valued images can be stored in half of the space as complex-valued images. From the symmetry relation Eq. (2.48) we can conclude that real-valued functions exhibit a Hermitian DFT: gn = gn∗ ◦ • gˆ N− v = gˆ ∗ v
(2.50) gmn = gm∗ n ◦ • gˆ M− u, N− v = gˆ u∗ v The complex-valued DFT of real-valued vectors is, therefore, completely determined by the values in one half-space. The other half-space is ob- tained by mirroring at the symmetry center [N/2]. Consequently, we 50 2 Image Representation
A b
-1 M-1 M/2-1 -2 M-2
-M/2 1 M/2 0 M/2-1 -1
0 0 1 2 N/2-1 N/2
-M/2 -N/2
-1 0 1
V N/2-1
Figure 2.15: a Half-space as computed by an in-place Fourier transform algo- rithm; the wave number zero is in the upper left corner; b FT with the missing half appended and remapped so that the wave number zero is in the center.
need the same amount of storage space for the DFT of a real vector as for the vector itself, as only half of the complex spectrum needs to be stored. In two and higher dimensions, matters are slightly more complex. Again, the Fourier transform of a real-valued image is determined com- pletely by the values in one half-space, but there are many ways to select the half-space. This means that all except for one component of the wave number can be negative.
columns are real-valued because of symmetry reasons (gˆ 0, N− v = gˆ 0∗, v
stored in the imaginary part of column 0.
2.3 Wave Number Space and Fourier Transform 51 Separability. The kernel of the Fourier transform is separable (Eq. (2.34)). Therefore, the transform of a separable function is also separable: W W . g(xp) ◦ •. gˆ (kp). (2.51) p=1 p=1 This property is essential to compute transforms of multidimensional functions effi ciently from 1-Dtransforms because many of them are sep- arable.
|a|
gˆ ( k /a)
det A (2.52) Rotation g( Rx ) ◦ • gˆ ( Rk ) If a function is squeezed in the spatial domain, it is stretched in the Fourier domain, and vice versa. A rotation of the coordinate system in the spatial domain causes the identical rotation in the Fourier domain.
( g ↑ K ) gn/K n = 0, K, 2K,... (N − 1)K) 0 otherwise. (2.53)
Theorem 2 (Similarity, discrete) Be g a complex-valued vector with N elements and K ∈ N. Then the discrete Fourier transform of the upsam- pled vector g ↑ K with KN elements is given by g ↑ K ◦ • 1 g ˆ
gˆ kN+v = gˆ v. (2.54) 52 2 Image Representation
Upsampling by a factor K thus simply results in a K-fold replication of the Fourier transform. Note that because of the periodicity of the discrete Fourier transform discussed at the beginning of this section, gˆ kN+v = gˆ v.
As a direct consequence of the linearity of the Fourier transform, we can formulate the following shift theorem:
Convolution. Convolution is one of the most important operations for signal processing. For a continuous signal it is defi ned by ∞ (g ∗ h)( x ) = ∫ h( x ')g( x − x ')dW x'. (2.56) − ∞ In signal processing, the function h( x ) is normally zero except for a small area around zero and is often denoted as the convolution mask. Thus, the convolution with h( x ) results in a new function g'( x ) whose values are a kind of weighted average of g( x ) in a small neighborhood around x. It changes the signal in a defi ned way, for example, makes it smoother. Therefore it is also called a fi lter. One- and two-dimensional discrete convolution are defi ned analo- gous to Eq. (2.56) by N− 1 M− 1 N− 1 gn' = . hn' gn− n', gm' , n = . . hm'n' gm− m', n− n' (2.57) n'=0 m'=0n'=0
The convolution theorem for the FT and DFT states: Theorem 4 (Convolution) If g( x )( g, G ) has the Fourier transforms gˆ ( k ) ( g ˆ, G ˆ ) and h( x ), ( h, H ) have the Fourier transforms hˆ ( k )( h ˆ, H ˆ ), then h∗ 2.3 Wave Number Space and Fourier Transform 53 g( h ∗ g, H ∗ G ) has the Fourier transforms hˆ ( k )gˆ ( k ), (N h ˆ · g ˆ, MN H ˆ · G ˆ ): FT: h( x ) ∗ g( x ) ◦ • hˆ ( k ) · gˆ ( k ) 1-D DFT: h ∗ g ◦ • N h ˆ · g ˆ 2-D DFT: H ∗ G ◦ • MN H ˆ · G ˆ (2.58)
tions of the Fourier domain, the complex exponentials exp 2π i k T x , are joint eigenfunctions of all convolution operators. This means that these functions are not changed by a convolution operator except for the multiplication by a factor. From the convolution theorem, the following properties are immedi- ately evident. Convolution is commutative h ∗ g = g ∗ h, associative h1 ∗ (h2 ∗ g) = (h1 ∗ h2) ∗ g, distributive over addition (h1 + h2) ∗ g = h1 ∗ g + h2 ∗ g. (2.59)
shifted δ distribution: S( s )g( x ) = δ ( x − s ) ∗ g( x ). (2.60) For a partial derivative of a function in the spatial domain the deriva- tion theorem states: Theorem 5 (Derivation) If g( x ) is diff erentiable for all x and has the Fourier transform gˆ ( k ), then the Fourier transform of the partial deriva- tive ∂ g( x )/∂ xp is 2π ikpgˆ ( k ): ∂ g( x ) ∂ xp ◦ • 2π ikpgˆ ( k ). (2.61) The derivation theorem results directly from the defi nition of the inverse Fourier transform in Eq. (2.33) by interchanging the partial derivative with the Fourier integral. The inverse Fourier transform of 2π ik1, that is, the corresponding convolution mask, is no longer an ordinary function (2π ik1 is not ab- solutely integrable) but the derivative of the δ distribution:
2π ik δ '(x)
dδ (x) lim d . exp(− π x2/a2) Σ . (2.62)
◦ • = dx = a→ 0 dx a 54 2 Image Representation
Of course, the derivation of the δ distribution exists—as all properties of distributions—only in the sense as a limit of a sequence of functions as shown in the preceding equation. With the knowledge of derivative and shift operators being convolu- tion operators, we can use the properties summarized in Eq. (2.59) to draw some important conclusions. As any convolution operator com- mutes with the shift operator, convolution is a shift-invariant operation. Furthermore, we can fi rst diff erentiate a signal and then perform a con- volution operation or vice versa and obtain the same result. The proper- ties in Eq. (2.59) are essential for an eff ective computation of convolution operations.
Thus the central-limit theorem is central to the unique role of the Gaussian function for signal processing. The suffi cient conditions under which the central-limit theorem is valid can be formulated in diff erent ways. We use here the conditions from [134] and express the theorem with respect to convolution.
Theorem 6 (Central-limit theorem) Given N functions hn(x) with a zero
x/σ , σ 2 =, n=1 σ 2 then
provided that
lim
N
= and there exists a number α > 2 and a fi nite constant c such that
− ∞ The theorem is of great practical importance because — especially if h is smooth — the Gaussian shape is approximated suffi ciently accurately for values of N as low as 5. 2.3 Wave Number Space and Fourier Transform 55
The relation between smoothness and compactness is an extension of reciprocity between the spatial and Fourier domain. What is strongly localized in one domain is widely extended in the other and vice versa.
2 ∞ ∞ . (∆ x) = − ∞ − ∞ . (2.66)
∫ .g(x). ∫ .g(x).
. − ∞ . . 2
Theorem 7 (Uncertainty relation) The product of the variance of 2 2
∆ x∆ k ≥ 1/(4π ). (2.67) The relations between compactness and smoothness and the uncer- tainty relation give some basic guidance for the design of linear fi lter (convolution) operators. 56 2 Image Representation
A b
r a e ija
phase phase r b e ijb amplitude amplitude
C d r b eija
Figure 2.16: Illustration of the importance of phase and amplitude in Fourier space for the image content: a, b two original images; c composite image using the phase from image b and the amplitude from image a; d composite image using the phase from image a and the amplitude from image b.
Phase and Amplitude As outlined above, the DFT can be regarded as a coordinate transfor- mation in a fi nite-dimensional vector space. Therefore, the image infor- mation is completely conserved. The inverse transform results in the original image again. In Fourier space, we observe the image from another “point of view”. Each point in the Fourier domain contains two pieces of information: the amplitude and the phase, i. e., relative position, of a periodic structure. Given this composition, we ask whether the phase or the amplitude con- tains the more signifi cant information on the structure in the image, or whether both are of equal importance. 2.3 Wave Number Space and Fourier Transform 57
In order to answer this question, we perform a simple experiment. Figure 2.16a, b shows two images. One shows Heidelberg University buildings, the other several lines of printed text. Both images are Fourier transformed and then the phase and amplitude are interchanged as il- lustrated in Fig. 2.16c, d. The result of this interchange is surprising. It is the phase that determines the content of an image for both images. Both images look patchy but the signifi cant information is preserved.
It becomes obvious also that the power spectrum, i. e., the squared amplitude of the Fourier components (see also Section 3.5.3), contains only very little information, since all the phase information is lost. If a gray value can be associated with the amplitude of a physical process, say a harmonic oscillation, then the power spectrum gives the distribution of the energy in the wave number domain.
2.3.7 Practical Application of the DFT‡ Units. For a practical application of the DFT, it is important to consider the various factors that can be used in the defi nition of the DFT and to give them a clear meaning. Besides the defi nition in Eq. (2.29) two others are commonly used:
N n=0 1 N− 1
N n=0 N− 1 gˆ v = N . w− nv gn ◦ • gn = . wnv gˆ v (b) (2.68) N
N n=0 1 N− 1 N n=0
N n=0 Mathematically spoken, the symmetric defi nition (a) is the most elegant because it uses in both directions the scalar product with the orthonormal base vectors in Eqs. (2.28) and (2.29). In practice, defi nition (b) is used most often, because gˆ 0 gives the mean value of the vector in the spatial domain, independent of its length: 1 N− 1 1 N− 1
n=0 n=0 Therefore we will use defi nition (b) almost everywhere in this book. 58 2 Image Representation
In practice it is important to know which spatial or temporal intervals have been used to sample the discrete signals. Only then it is possible to compare DFTs correctly that have been sampled with diff erent intervals. The relation can be seen most easily if we approximate the Fourier integral in Eq. (2.18) by a sum and sample the values in the spatial and temporal domain using x = n∆ x, k = v∆ k und ∆ x∆ k = 1/N: ∞ gˆ (v∆ k) =
≈ ∫ g(x) exp (− 2π iv∆ kx) dx
gn exp (− 2π inv∆ x∆ k) ∆ x
(2.70) N n=0 N
For 2-Dand higher-dimensional signals corresponding relations are valid:
Continuous: ∫ .g(x).2 dx = ∫ N− 1
− ∞ . . 1 N− 1 − ∞ . . N− 1 v=0. . (2.72) Discrete: . .gn.2 = . .gˆ v .2. N n=0. . v=0. . The Rayleigh theorem says that the signal energy can either be integrated in the
scaled squared magnitudes in the Fourier space are ·/m− 1 or ·/Hz for time series, where · stands for the units of the squared signal. Dynamic Range. While in most cases it is suffi cient to represent an image with 256 quantization levels, i. e., one byte per pixel, the Fourier transform of an image needs a much larger dynamical range. Typically, we observe a strong decrease of the Fourier components with the magnitude of the wave 2.3 Wave Number Space and Fourier Transform 59 A b k2
Figure 2.17: Partition of the Fourier domain into a Cartesian and b logarithmic- polar intervals.
number (Fig. 2.15). Consequently, at least 16-bit integers or 32-bit fl oating-point numbers are necessary to represent an image in the Fourier domain without signifi cant rounding errors. The reason for this behavior is not the insignifi cance of high wave numbers in images. If we simply omit them, we blur the image. The decrease is caused by the fact that the relative resolution is increasing. It is natural to think of relative resolutions, because we are better able to distinguish relative distance diff erences than absolute ones. We can, for example, easily see the diff erence of 10 cm in 1 m, but not in 1 km. If we apply this concept to the Fourier domain, it seems to be more natural to represent the images in a so-called log-polar coordi- nate system as illustrated in Fig. 2.17. A discrete grid in this coordinate system separates the space into angular and lnk intervals. Thus the cell area is propor- tional to k2. To account for this increase of the area, the Fourier components need to be multiplied by k2 in this representation: ∞ ∞ ∫ |gˆ ( k )|2dk1dk2 = ∫ k2|gˆ ( k )|2d ln kdϕ. (2.73) − ∞ − ∞
For a display of power spectra, it is common to take the logarithm of the gray values in order to compress the high dynamic range. The discussion of log-polar coordinate systems suggests that multiplication by k2 is a valuable alternative. Likewise, representation in a log-polar coordinate system allows a much better evaluation of the directions of the spatial structures and the smaller scales (Fig. 2.18). 60 2 Image Representation
a b
2.4 Discrete Unitary Transforms‡ 2.4.1 General Properties‡ In Sections 2.3.1 and 2.3.2, we learnt that the discrete Fourier transform can be regarded as a linear transformation in a vector space. Thus it is only an example of a large class of transformations, called unitary transforms. In this section, we discuss some of their general features which will be of help for a deeper insight into image processing. Furthermore, we give examples of other unitary transforms which have gained importance in digital image processing. Unitary transforms are defi ned for vector spaces over the fi eld of complex num- bers, for which an inner product is defi ned. Both the FT Eq. (2.22) and DFT Eq. (2.29) basically compute scalar products. The basic theorem about unitary transform states: Theorem 8 (Unitary transform) Let V be a fi nite-dimensional inner product vec- tor space. Let U be a one-one linear transformation of V onto itself. Then the following are equivalent: 1.
2. U preserves the inner product, i. e., g | h = Ug | Uh , ∀ g, h ∈ V. 3. The inverse of U , U − 1, is the adjoin of U : UU ∗ T = I. 4. The row vectors (and column vectors) of U form an orthonormal basis of the vector space V. 2.4 Discrete Unitary Transforms‡ 61 In this theorem, the most important properties of a unitary transform are al- ready related to each other: a unitary transform preserves the inner product. This implies that another important property, the norm, is also preserved:
It is appropriate to think of the norm as the length or magnitude of the vector. Rotation in R2 or R3 is an example of a transform where the preservation of the length of the vectors is obvious (compare also the discussion of homogeneous coordinates in Section 7.3.3). The product of two unitary transforms, U 1 U 2, is unitary. As the identity op- erator I is unitary, as is the inverse of a unitary operator, the set of all unitary transforms on an inner product space is a group under the operation of com- position. In practice, this means that we can compose/decompose complex unitary transforms from/into simpler or elementary transforms. We will illustrate some of the properties of unitary transforms discussed with the discrete Fourier transform. First we consider the one-dimensional DFT Eq. (2.29): 1 N− 1
n=0 This equation can be regarded as a multiplication of the N × N matrix W N
with the vector g:
1 g ˆ = √ N W N g. (2.75) Explicitly, the DFT for an 8-dimensional vector is given by
8 8 8
0 0 0
5 4 3 0 0 g0
gˆ 1
w8 w8 w8 w8 w8 w8 w8 w8 g1
1 w0
5 2 7
4 1 6
8 g3
= 8 w0 w4 w0 w4 w0 w4 w0 w4 g4
8 8 8
8 8 8
8 8 5
gˆ 6
0 2 4 8 8 8
8 8 8 6 0 2 8 8 8
8 8 8 8 8 g6
gˆ uv = √ MN gmn( W M)mu( W N)nv, (2.76) m=0n=0 62 2 Image Representation
A b c 0 0 0
1 1 1
4 4
5 5
cosine transform, b sine transform, and c Hartley transform.
or, in matrix notation,
W M T
1 G W N = √ MN
W M GW N. (2.77) M˛ × ¸ Nr M˛ × ¸ Mr M˛ × ¸ Nr N ˛ × ¸ Nr
Physicists will be reminded of the theoretical foundations of quantum mechan- ics which are formulated in an inner product vector space of infi nite dimension, the Hilbert space. In digital image processing, the diffi culties associated with infi nite-dimensional vector spaces can be avoided. After discussing the general features, some illustrative examples of unitary transforms will be given. However, none of these transforms is as important as the Fourier transform in signal and image processing.
2.4.2 Cosine, Sine, and Hartley Transforms‡ It is often inconvenient that the discrete Fourier transform maps real-valued to complex-valued images. We can derive a real transformation if we decompose the complex DFT into its real and imaginary parts:
Neither the cosine nor the sine part is useful as a transformation kernel, since these functions do not form a complete basis of the vector space. The cosine and sine functions only span the subspaces of the even and odd functions, respectively. This problem can be solved by limiting the cosine transform and the sine trans- form to the positive half space in the spatial and Fourier domains. Then sym- 2.4 Discrete Unitary Transforms‡ 63 metry properties play no role and the two transforms are defi ned as ∞ ∞ c gˆ (k) = ∫ g(x)√ 2 cos(2π kx)dx ◦ • g(x) = ∫ c gˆ (k)√ 2 cos(2π kx)dk 0 0 ∞ ∞ s gˆ (k) = ∫ g(x)√ 2 sin(2π kx)dx ◦ • g(x) = ∫ s gˆ (k)√ 2 sin(2π kx)dk. 0 0 (2.79) For the corresponding discrete transforms, base vectors with the missing sym- metry can be generated by adding trigonometric functions with half-integer wavelengths. This is equivalent to doubling the base wavelength. Consequently, the kernels for the cosine and sine transforms in an N-dimensional vector space are cnv =, 2 cos. π nv Σ , snv =, 2 sin. π (n + 1)(v + 1) Σ . (2.80) N N N + 1 N + 1 Figure 2.19a, b shows the base functions of the 1-D cosine and sine functions. From the graphs, it is easy to imagine that all the base functions are orthogonal to each other. Because of the doubling of the periods, both transforms now con- tain even and odd functions. The base functions with half-integer wavelengths fi ll in the functions with the originally missing symmetry. The cosine transform has gained importance for image data compression [86]. It is included in the standard compression algorithm proposed by the Joint Photographic Experts Group (JPEG). The Hartley transform (HT ) is a much more elegant solution than the cosine and sine transforms for a transform that avoids complex numbers. By adding the cosine and sine function, we yield an asymmetrical kernel cas 2π kx = cos(2π kx) + sin(2π kx) = √ 2 cos(2π (kx − 1/8)) (2.81) that is suitable for a transform over the whole space domain: ∞ ∞ hgˆ (k) = ∫ g(x) cas(2π kx)dx ◦ • g(x) = ∫ hgˆ (k) cas(2π kx)dk. (2.82) − ∞ − ∞ The corresponding discrete Hartley transform (DHT ) is defi ned as: 1 N− 1 1 N− 1 hgˆ v = √ N . gn cas(2π nv/N) ◦ • gn = √ N . hgˆ v cas(2π nv/N). (2.83) n=0 n=0
g(x − x0) ◦ • hgˆ (k) cos(2π kx0) + hgˆ (− k) sin(2π kx0) gn− n' ◦ • hgˆ v cos(2π n'v/N) + hgˆ N− v sin(2π n'v/N)
. (2.84) Similar complications arise with the convolution theorem for the Hartley trans- form (± R8). 64 2 Image Representation
A b
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
Figure 2.20: First 8 base functions of one-dimensional unitary transforms for N = 16: a Hadamard transform and b Haar transform.
2.4.3 Hadamard Transform‡ The base functions of the Hadamard transform are orthogonal binary patterns (Fig. 2.20a). Some of these patterns are regular rectangular waves, others are not. The Hadamard transform is computationally effi cient, because its kernel contains only the fi gures 1 and –1. Thus only additions and subtractions are necessary to compute the transform.
2.4.4 Haar Transform‡ The base vectors of all the transforms considered so far are characterized by the fact that the base functions spread out over the whole vector or image. In this sense we denote these transforms as global. All locality is lost. If we have, for example, two independent objects in our image, then they will be simultaneously decomposed into these global patterns and will no longer be recognizable as two individual objects in the transform. The Haar transform is an example of a unitary transform which partly pre- serves local information, since its base functions are pairs of impulses which are non-zero only at the position of the impulse (Fig. 2.20a). With the Haar transform the position resolution is better for smaller structures. As with the Hadamard transform, the Haar transform is computational effi cient. Its kernel only includes the fi gures − 1, 0, and 1. 2.5 Fast Algorithms for Unitary Transforms 65 |
Последнее изменение этой страницы: 2019-05-04; Просмотров: 241; Нарушение авторского права страницы