Fast Trigonometric Transforms
4.7.4 Fast Trigonometric Transforms
Two real transforms, the discrete sine transform (DST) and discrete cosine transform (DCT) , are of interest. There are several variations of these. We define the first two as follows:
• Given real data f j , j = 1 : N − 1, compute
• Given real data f j , j = 0 : N, compute
(The double prime on the sum means that the first and last term are to be halved.)
4.7. The Fast Fourier Transform 513 The real and imaginary parts of the DFT matrix F N consist of cosines and sines,
F N =C N − iS N , where 2π
(C N ) kj = cos kj
, k, j = 0 : N − 1. (4.7.26) N
(S N ) kj = sin kj
The DST and DCT transforms can be expressed in matrix form as y =S 2N ( 1 : N − 1, 1 : N − 1)f,
y =C 2N ( 0 : N, 0 : N) ˜ f, respectively, where ¯ f =( 1 2 f 0 ,f 1 ,...,f N −1 , 1 2 f N ) T .
These two transforms can be computed by applying the FFT algorithm (for real data) to an auxiliary vector ˜ f formed by extending the given data vector f either into an odd or even sequence. For DST-1 the data f j , j = 1 : N − 1, are extended to an odd sequence of length 2N by setting
f 0 =f N = 0,
f 2N−j ≡ −f j , j = 1 : N − 1. For example, the data f = {f 1 ,f 2 ,f 3 }, (N = 4) are extended to
f ˜ = {0, f 1 ,f 2 ,f 3 ,
0, −f 3 , −f 2 , −f 1 }.
The extended vector satisfies ˜ f = −T 2N f ˜ , and thus by Table 4.7.1 the DFT of ˜ f will be pure imaginary. For DCT-1 the data f j , j = 0 : N, are extended to an even sequence of length 2N by setting
f 2N−j ≡f j , j = 1 : N.
For example, the data f = {f 0 ,f 1 ,f 2 ,f 3 ,f 4 }, (N = 4) are extended to
f ˜ = {f 0 ,f 1 ,f 2 ,f 3 ,f 4 ,f 3 ,f 2 ,f 1 }
so that ˜ f =T 2N f ˜ . By Table 4.7.1 the DFT of ˜ f will then be real. Theorem 4.7.6 (Van Loan [366, Sec. 4.4]).
Let f j , j = 1 : N − 1, form a real data vector f and extend it to a vector ˜ f with
f ˜ 0 =˜ f N = 0 so that ˜ f = −T 2N ˜ f . Then y( 1 : N − 1) is the DST of ˜ f , where
y = y(0 : 2N − 1) = F 2N f. ˜
Let f j , j = 0 : N, form a real data vector f and extend it to a vector ˜ f so that
f ˜ =T 2N ˜ f . Then y( 0 : N) is the DCT of f , where
1 y = y(0 : 2N − 1) = F 2N f. ˜
There is an inefficiency factor of two in the above procedure. This can be eliminated by using a different auxiliary vector. For details we refer to [294, pp. 420–421]; [366, Sec. 4.4].
514 Chapter 4. Interpolation and Approximation In some application areas variants of the above transforms called DST-2 and DCT-2
turn out to be more useful. We define them as follows: • Given real data f j , j = 1 : N, compute
• Given real data f j , j = 0 : N − 1, compute
The DST-2 and DCT-2 transforms can also be obtained by extending the data vector f . For DST-2 the data vector f j , j = 0 : N −1, is extended to an odd sequence of length
2N. For example, the data {f 1 ,f 2 ,f 3 ,f 4 }, (N = 4) are extended to
f ˜ = {f 1 ,f 2 ,f 3 ,f 4 , −f 4 , −f 3 , −f 2 , −f 1 }. The extended vector satisfies f = −T 2N f , and thus by Table 4.7.1 the DFT of f will be
imaginary. For DCT-2 the data f j , j = 0 : N, are extended to an even sequence of length 2N.
For example, the data {f 0 ,f 1 ,f 2 ,f 3 }, (N = 4) are extended to
f ˜ = {f 0 ,f 1 ,f 2 ,f 3 ,f 3 ,f 2 ,f 1 ,f 0 }.
so that f = T 2N f . By Table 4.7.1 the DFT of f will then be real. We give without proof the following result, which allows the computation of DST-2
and DCT-2 from the FFT.
Theorem 4.7.7.
Let f j , j = 1 : N, form a real data vector f and extend it to a vector ˜ f so that
f ˜ = −T 2N ˜ f . Then y( 1 : N) is the DST-2 of f , where
y = y(0 : 2N − 1) = < 2N F 2N f, ˜
where
< 2N = diag (1, ω 4N ,...,ω 2N 4N ).
Let f j , j = 0 : N − 1, form a real data vector f and extend it to a vector ˜ f so that
f ˜ =T 2N ˜ f . Then y( 0 : N − 1) is the DCT-2 of f , where
1 y = y(0 : 2N − 1) = < 2N F 2N f. ˜
The two-dimensional DCT-2 transform has the property that, for a visual image, most of the information is concentrated in the first few coefficients of the DCT. For this reason the DCT-2 transform is often used in image compression algorithms. 165
165 This transform is used in the JPEG (Joint Photographic Experts Group) compression algorithm for image processing. Each 8×8 block in the image is transformed by a two-dimensional DCT-2 transform; see Strang [340].
4.7. The Fast Fourier Transform 515
Parts
» Numerical Methods in Scientific Computing
» Solving Linear Systems by LU Factorization
» Sparse Matrices and Iterative Methods
» Software for Matrix Computations
» Characterization of Least Squares Solutions
» The Singular Value Decomposition
» The Numerical Rank of a Matrix
» Second Order Accurate Methods
» Adaptive Choice of Step Size
» Origin of Monte Carlo Methods
» Generating and Testing Pseudorandom Numbers
» Random Deviates for Other Distributions
» Absolute and Relative Errors
» Fixed- and Floating-Point Representation
» IEEE Floating-Point Standard
» Multiple Precision Arithmetic
» Basic Rounding Error Results
» Statistical Models for Rounding Errors
» Avoiding Overflowand Cancellation
» Numerical Problems, Methods, and Algorithms
» Propagation of Errors and Condition Numbers
» Perturbation Analysis for Linear Systems
» Error Analysis and Stability of Algorithms
» Interval Matrix Computations
» Taylor’s Formula and Power Series
» Divergent or Semiconvergent Series
» Properties of Difference Operators
» Approximation Formulas by Operator Methods
» Single Linear Difference Equations
» Comparison Series and Aitken Acceleration
» Complete Monotonicity and Related Concepts
» Repeated Richardson Extrapolation
» Algebraic Continued Fractions
» Analytic Continued Fractions
» Bases for Polynomial Interpolation
» Conditioning of Polynomial Interpolation
» Newton’s Interpolation Formula
» Barycentric Lagrange Interpolation
» Iterative Linear Interpolation
» Fast Algorithms for Vandermonde Systems
» Complex Analysis in Polynomial Interpolation
» Multidimensional Interpolation
» Analysis of a Generalized Runge Phenomenon
» Bernštein Polynomials and Bézier Curves
» Least Squares Splines Approximation
» Operator Norms and the Distance Formula
» Inner Product Spaces and Orthogonal Systems
» Solution of the Approximation Problem
» Mathematical Properties of Orthogonal Polynomials
» Expansions in Orthogonal Polynomials
» Approximation in the Maximum Norm
» Convergence Acceleration of Fourier Series
» The Fourier Integral Theorem
» Fast Trigonometric Transforms
» Superconvergence of the Trapezoidal Rule
» Higher-Order Newton–Cotes’ Formulas
» Fejér and Clenshaw–Curtis Rules
» Method of Undetermined Coefficients
» Gauss–Christoffel Quadrature Rules
» Gauss Quadrature with Preassigned Nodes
» Matrices, Moments, and Gauss Quadrature
» Jacobi Matrices and Gauss Quadrature
» Multidimensional Integration
» Limiting Accuracy and Termination Criteria
» Convergence Order and Efficiency
» Higher-Order Interpolation Methods
» Newton’s Method for Complex Roots
» Unimodal Functions and Golden Section Search
» Minimization by Interpolation
» Ill-Conditioned Algebraic Equations
» Deflation and Simultaneous Determination of Roots
» Finding Greatest Common Divisors
» Permutations and Determinants
» Eigenvalues and Norms of Matrices
» Function and Vector Algorithms
» Textbooks in Numerical Analysis
» Encyclopedias, Tables, and Formulas
Show more