Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 13 The frequency Domain (1)

Similar presentations


Presentation on theme: "Lecture 13 The frequency Domain (1)"— Presentation transcript:

1 Lecture 13 The frequency Domain (1)
Dr. Masri Ayob

2 The Twilight Zone Spatial Domain
Image data can be represented in either the spatial domain or the frequency domain. The frequency domain contains the same information as the spatial domain but in a vastly different form. Useful for data compression More efficient for certain image operations Spatial Domain For each location in the image, what is the value of the light intensity at that location? Frequency Domain For each frequency component in the image, what is power or its amplitude? Various frequency domain representations exist but the two predominant representations are the Fourier and Discrete Cosine representations. Frequency domain - an alternative representation of an image based on the frequencies of brightness or colour variation in the image.

3 Fourier Transform Spatial Domain vs Frequency Domain t f

4 Fourier Transform Why? alternative description efficient calculation less sensitive for disturbances Obey the convolution thorem More efficient, easier: convolution correlation filtering differentiating shifting compression

5 Applications wide ranging and ever present in modern life
Fourier Transform Applications wide ranging and ever present in modern life Telecomms - GSM/cellular phones, Electronics/IT - most DSP-based applications, Entertainment - music, audio, multimedia, Accelerator control (tune measurement for beam steering/control), Imaging, image processing, Industry/research - X-ray spectrometry, chemical analysis (FT spectrometry), PDE solution, radar design, Medical - (PET scanner, CAT scans & MRI interpretation for sleep disorder & heart malfunction diagnosis, Speech analysis (voice activated “devices”, biometry, …).

6 Fourier Analysis Many different transforms are used in image processing (far too many begin with the letter H: Hilbert, Hartley, Hough, Hotelling, Hadamard, and Haar). The Fourier representation of any function is possible by determining The fundamental frequency The coefficient of each harmonic Fourier coefficients are typically Complex-valued Fundamental frequency is determined by the resolution of a discrete image

7 Spatial Frequency L = length of the cycle (period of the function).
If the variation is spatial and L is a distance, then 1/L is termed the spatial frequency of the variation.

8 Spatial Frequency

9 Spatial Frequency Variation in the x – direction (u) N=100, u=3, A=127
Sin Cosine N=100, u=3, A=127, phase = 90

10 Fourier Theory Techniques for the analysis and manipulation of spatial frequency. Developed a representation of functions based on frequency. The idea is “any periodic function can be represented as a sum of these simpler sinusoids”.

11 Fourier Analysis Any function can be represented as the sum of sine and cosine waves having different amplitudes and wavelengths. Fourier analysis is a way of determining the individual sin/cosine waves that, when added together, construct the desired signal Consider a square wave. Can it be represented as the sum of sin and cosine waves?

12 Fourier Theory A set of sine and cosine functions having particular frequencies are choose for the representation.  basic function

13 Fourier Analysis

14 Fourier Theory A weighted sum of these basic function is called a Fourier Series. Add a 3rd “harmonic” to the fundamental frequency. The amplitude is less than that of the base and the frequency is 3 times that of the base.

15 The summation of basic function
Fourier Theory The weighting factors for each sine and cosine function are known as the Fourier coefficients. The summation of basic function No. of terms

16 Fourier Theory

17 Fourier Theory Add a 3rd “harmonic” to the fundamental frequency. The amplitude is less than that of the base and the frequency is 3 times that of the base.

18 Fourier Theory Add a 5th “harmonic” to the fundamental frequency. The amplitude is less than that of the base and the frequency is 5 times that of the base.

19 Add a 7th and 9th“harmonic” to the fundamental frequency.
Fourier Theory Add a 7th and 9th“harmonic” to the fundamental frequency.

20 Adding all harmonics up to the 100th.
Fourier Theory Adding all harmonics up to the 100th.

21 Adding all harmonics up to the 200th.
Fourier Theory Adding all harmonics up to the 200th.

22 Fourier Theory L: period; u and v are the number of cycles fitting into one horizontal and vertical period, respectively of f(x,y).

23 Fourier Theory

24 Discrete Fourier Transform
Fourier theory provides us with a means of determining the contribution made by any basic function to the representation of some function f(x). The contribution is determined by projecting f(x) onto that basis function. This procedure is described as a Fourier transform.

25 Discrete Fourier Transform
When applying the procedure to images, we must deal explicitly with the fact that an image is: Two-dimensional Sampled Of finite extent These consideration give rise to the Discrete Fourier Transform (DFT). The DFT of an NxN image can be written: or (8.5) Complex number Processing the image in frequency domain

26 Discrete Fourier Transform
For any particular spatial frequency specified by u and v, evaluating equation 8.5 tell us how much of that particular frequency is present in the image. There also exist an inverse Fourier Transform that convert a set of Fourier coefficients into an image. Processing the image in spatial domain

27 Discrete Fourier Transform
F(u,v) is a complex number:

28 Discrete Fourier Transform
The magnitudes correspond to the amplitudes of the basic images in our Fourier representation. The array of magnitudes is termed the amplitude spectrum (or sometime ‘spectrum’). The array of phases is termed the phase spectrum. The power spectrum is simply the square of its amplitude spectrum:

29 Discrete Fourier Transform

30 Discrete Fourier Transform
If we attempt to reconstruct the image with an inverse Fourier Transform after destroying either the phase information or the amplitude information, then the reconstruction will fail.

31 FFT The Fast Fourier Transform is one of the most important algorithms ever developed Developed by Cooley and Tukey in mid 60s. Is a recursive procedure that uses some cool math tricks to combine sub-problem results into the overall solution.

32 DFT vs FFT

33 DFT vs FFT

34 DFT vs FFT

35 Periodicity The DFT assumes that an image is part of an infinitely repeated set of “tiles” in every direction. This is the same effect as “circular indexing”.

36 Periodicity and Windowing
Since “tiling” an image causes “fake” discontinuities, the spectrum includes “fake” high-frequency components Spatial discontinuities Windowing minimizes the artificial discontinuities by pre-processing pixel values prior to computing the DFT. Pixel values are modulated so that they gradually fall to zero at the edges. Three well-known windowing functions: Bartlett Hanning Blackman

37 Windowing Functions Bartlett Hanning Blackman
R is a distance from the centre of the image and rmax is its maximum value. Hanning Bartlett Blackman

38 FFT Package com.pearsoneduc.ip.op

39 FFT Package com.pearsoneduc.ip.op

40 Thank you Q&A


Download ppt "Lecture 13 The frequency Domain (1)"

Similar presentations


Ads by Google