in

Fourier Transform and Fourier Series

 

In mathematics, a Fourier series is a way to represent a (wave-like) function as the sum of simple sine waves. More formally, it decomposes any periodic function or periodic signal into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or, equivalently, complex exponentials). The discrete-time Fourier transform is a periodic function, often defined in terms of a Fourier series.

Fourier Series vs. Fourier Transform

Fourier Series decomposes a periodic function into a sum of sines and cosines with different frequencies and amplitudes. Fourier Series is a branch of Fourier analysis and it was introduced by Joseph Fourier.

Fourier Transform is a mathematical operation that breaks a signal in to its constituent frequencies. The original signal that changed over time is called the time domain representation of the signal. The Fourier transform is called the frequency domain representation of a signal since it depends on the frequency. Both the frequency domain representation of a signal and the process used to transform that signal in to the frequency domain are referred to as the Fourier transform.

What is Fourier Series?

As mentioned earlier, Fourier Series is an expansion of a periodic function using infinite sum of sines and cosines. Fourier Series was initially developed when solving heat equations but later it was found out that the same technique can be used to solve a large set of mathematical problems specially the problems that involve linear differential equations with constant coefficients. Today, Fourier Series has applications in large number of fields including electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, quantum mechanics and econometrics. Fourier Series uses the orthogonality relationships of sine and cosine functions. The calculation and the study of  Fourier series is known as the Harmonic Analysis and is very useful when working with arbitrary periodic functions, since it allows to break the function into simple terms that can be used to obtain a solution to the original problem.

What is Fourier Transform?

Fourier Transform defines a relationship between a signal in the time domain and its representation in the frequency domain. The Fourier Transform decomposes a function into oscillatory functions. Since this is a transformation, the original signal can be obtained from knowing the transformation, thus no information is created or lost in the process. The study of Fourier Series actually provides motivation for the Fourier Transform. Because of the properties of sines and cosines it is possible to recover the amount of each wave contributes to the sum using an integral. Fourier Transform has some basic properties such as linearity, translation, modulation, scaling, conjugation, duality and convolution. Fourier Transform is applied in solving differential equations since the Fourier Transform is closely related to Laplace Transforms. Fourier Transform is also used in nuclear magnetic resonance (NMR) and in other kinds of spectroscopy.

Revisiting Differences Between Fourier Series and Fourier Transform

Fourier series is an expansion of periodic signal as a linear combination of sines and cosines while Fourier transform is the process or function used to convert signals from time domain into frequency domain. Fourier series is defined for periodic signals and the Fourier transform can be applied to aperiodic (occurring without periodicity) signals. As mentioned above, the study of Fourier series actually provides motivation for the Fourier transform.

Fourier series simply states that, periodic signals can be represented into sum of sines and cosines when multiplied with a certain weight. It further states that periodic signals can be broken down into further signals with the following properties.

  • The signals are sines and cosines.
  • The signals are harmonics of each other.

 

Fig. 1: Pictorial representation of Fourier Series

In the signal in Fig.1, the last signal is actually the sum of all the above signals.

Computing Fourier Transform and Fourier Series

We saw that in order to process an image in frequency domain we need to first convert it using into frequency domain. Next, we take inverse of the output to convert it back into spatial domain. That’s why both Fourier Series and Fourier Transform have two formulae; one for conversion and one converting it back to the spatial domain.

Fourier Series: Mathematical Expression

The Fourier series can be denoted by this formula.

The inverse can be calculated by this formula.

Fourier Transform: Mathematical Expression

The Fourier transform has many wide applications including image compression (e.g. JPEG compression), filtering and image analysis.

Which one to use for Image Processing?

Given that we now understand the elements of both ideas, the question is which one is to be used for processing images. Making use of the fact that images are non – periodic, we infer that Fourier Transform is used to convert them into frequency domain.

Discrete Fourier transform

Since we are dealing with images, and specifically with digital images, we make use of the Discrete Fourier Transform.

Fig. 2: Fourier Term of a sinusoid.

The Fourier term of the sinusoid shown in fig. 2 includes three things.

  • Spatial Frequency
  • Magnitude
  • Phase

The spatial frequency directly relates to the brightness of the image. The magnitude of the sinusoid directly relates to the contrast. Contrast is the difference between maximum and minimum pixel intensity. Phase contains the color information.

The formula for two-dimensional discrete Fourier transform is given below.

The Discrete Fourier Transform (DFT) is actually the sampled Fourier Transform, so it contains some samples that denote an image. In the above formula, f(x,y) denotes the image, and F(u,v) denotes the discrete Fourier Transform. The formula for two-dimensional Inverse Discrete Fourier Transform (IDFT) is given below.

The Inverse Discrete Fourier Transform converts the Fourier Transform back to the image.

Consider the image shown in fig. 3 below. For this image, we will calculate the FFT magnitude spectrum and then the shifted FFT magnitude spectrum. Finally, we take logarithm of that shifted spectrum.

Fig. 3: Image to be processed

Fig. 4: Fourier transform magnitude spectrum of the image in fig. 3

 

Fig. 5: Shifted Fourier transform of the image in fig. 3

 

Fig. 6: Shifted Magnitude Spectrum  of  the image in fig. 3

 

Summary

The essential differences between Fourier Series and Fourier Transform can be itemized as follows:

  • The Fourier Series takes a periodic function and converts into a *discrete** exponential or sin/cosine function.
  • The Fourier Series does NOT address non-periodic function.
  • The Fourier Transform takes a periodic function converts it’s Fourier Series in frequency domain.
  • The Fourier Transform takes a non-periodic function and converts it into continuous frequency domain.

What do you think?

Written by Ashok Anbalan

Monsoon Fashion Trends: What’s In and What Needs to Go in the Bin

Maa