Orthogonal Transforms Fourier
Review Introduce the concepts of base functions: For Reed-Muller, FPRM For Walsh Linearly independent matrix Non-Singular matrix Examples Butterflies, Kronecker Products, Matrices Using matrices to calculate the vector of spectral coefficients from the data vector Our goal is to discuss the best approximation of a function using orthogonal functions
Orthogonal Functions
Orthogonal Functions
Note that these are arbitrary functions, we do not assume sinusoids
Illustrate it for Walsh and RM
Mean Square Error
Mean Square Error
Important result
We want to minimize this kinds of errors. Other error measures are also used.
Unitary Transforms
Unitary Transforms Unitary Transformation for 1-Dim. Sequence Series representation of Basis vectors : Energy conservation : Here is the proof
Unitary Transformation for 2-Dim. Sequence Definition : Basis images : Orthonormality and completeness properties Orthonormality : Completeness :
Unitary Transformation for 2-Dim. Sequence Separable Unitary Transforms separable transform reduces the number of multiplications and additions from to Energy conservation
Properties of Unitary Transform Covariance matrix
Example of arbitrary basis functions being rectangular waves
This determining first function determines next functions
1
Small error with just 3 coefficients
This slide shows four base functions multiplied by their respective coefficients
This slide shows that using only four base functions the approximation is quite good End of example
Orthogonality and separability
Orthogonal and separable Image Transforms
Extending general transforms to 2-dimensions
Forward transform inverse transform separable
Fourier Transforms in new notations We emphasize generality Matrices
Fourier Transform separable
Extension of Fourier Transform to two dimensions
Discrete Fourier Transform (DFT) New notation
Fast Algorithms for Fourier Transform Task for students: Draw the butterfly for these matrices, similarly as we have done it for Walsh and Reed-Muller Transforms 2 Pay attention to regularity of kernels and order of columns corresponding to factorized matrices
Fast Factorization Algorithms are general and there is many of them
1-dim. DFT (cont.) Calculation of DFT : Fast Fourier Transform Algorithm (FFT) Decimation-in-time algorithm Derivation of decimation in time
Decimation in Time versus Decismation in Frequency
1-dim. DFT (cont.) FFT (cont.) Decimation-in-time algorithm (cont.) Butterfly for Derivation of decimation in time Please note recursion
1-dim. DFT (cont.) FFT (cont.) Decimation-in-frequency algorithm (cont.) Derivation of Decimation-in-frequency algorithm
Decimation in frequency butterfly shows recursion 1-dim. DFT (cont.) FFT (cont.) Decimation-in-frequency algorithm (cont.)
Conjugate Symmetry of DFT For a real sequence, the DFT is conjugate symmetry
Use of Fourier Transforms for fast convolution
Calculations for circular matrix
By multiplying
W * = Cw* In matrix form next slide
w * = Cw*
Here is the formula for linear convolution, we already discussed for 1D and 2D data, images
Linear convolution can be presented in matrix form as follows:
As we see, circular convolution can be also represented in matrix form
Important result
Inverse DFT of convolution
Thus we derived a fast algorithm for linear convolution which we illustrated earlier and discussed its importance. This result is very fundamental since it allows to use DFT with inverse DFT to do all kinds of image processing based on convolution, such as edge detection, thinning, filtering, etc.
2-D DFT
2-D DFT
Circular convolution works for 2D images
2-Dim. DFT (cont.) example Circular convolution works for 2D images So we can do all kinds of edge-detection, filtering etc very efficiently 2-Dim. DFT (cont.) example (a) Original Image (b) Magnitude (c) Phase
2-Dim. DFT (cont.) Properties of 2D DFT Separability
(d) resulting spectrum 2-Dim. DFT (cont.) Properties of 2D DFT (cont.) Rotation (a) a sample image (b) its spectrum (c) rotated image (d) resulting spectrum
2-Dim. DFT (cont.) Properties of 2D DFT Circular convolution and DFT Correlation
2-Dim. DFT (cont.) Calculation of 2-dim. DFT Direct calculation Complex multiplications & additions : Using separability Using 1-dim FFT Complex multiplications & additions : ??? Three ways of calculating 2-D DFT
Questions to Students You do not have to remember derivations but you have to understand the main concepts. Much software for all discussed transforms and their uses is available on internet and also in Matlab, OpenCV, and similar packages. How to create an algorithm for edge detection based on FFT? How to create a thinning algorithm based on DCT? How to use DST for convolution – show example. Low pass filter based on Hadamard. Texture recognition based on Walsh