University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Fundamentals) Digital Image Processing Christophoros Nikou

Slides:



Advertisements
Similar presentations
Computer Vision Lecture 7: The Fourier Transform
Advertisements

University of Ioannina - Department of Computer Science Wavelets and Multiresolution Processing (Background) Christophoros Nikou Digital.
Basic Properties of signal, Fourier Expansion and it’s Applications in Digital Image processing. Md. Al Mehedi Hasan Assistant Professor Dept. of Computer.
Digital Image Processing
Fourier Transform (Chapter 4)
Chapter Four Image Enhancement in the Frequency Domain.
Chapter 8: The Discrete Fourier Transform
Sep 15, 2005CS477: Analog and Digital Communications1 Modulation and Sampling Analog and Digital Communications Autumn
MSP15 The Fourier Transform (cont’) Lim, MSP16 The Fourier Series Expansion Suppose g(t) is a transient function that is zero outside the interval.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
lecture 5, Sampling and the Nyquist Condition Sampling Outline  FT of comb function  Sampling Nyquist Condition  sinc interpolation Truncation.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
First semester King Saud University College of Applied studies and Community Service 1301CT.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
… Representation of a CT Signal Using Impulse Functions
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
Copyright © Shi Ping CUC Chapter 3 Discrete Fourier Transform Review Features in common We need a numerically computable transform, that is Discrete.
The sampling of continuous-time signals is an important topic It is required by many important technologies such as: Digital Communication Systems ( Wireless.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Discrete-Time and System (A Review)
DTFT And Fourier Transform
1 7.1 Discrete Fourier Transform (DFT) 7.2 DFT Properties 7.3 Cyclic Convolution 7.4 Linear Convolution via DFT Chapter 7 Discrete Fourier Transform Section.
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
Fourier (1) Hany Ferdinando Dept. of Electrical Eng. Petra Christian University.
Fourier Series Summary (From Salivahanan et al, 2002)
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Image Enhancement in the Frequency Domain Spring 2006, Jen-Chang Liu.
Chapter 7: The Fourier Transform 7.1 Introduction
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 14/15 – TP6 Frequency Space Miguel Tavares Coimbra.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Background Any function that periodically repeats itself.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
Digital Signal Processing Chapter 3 Discrete transforms.
Wavelets and Multiresolution Processing (Wavelet Transforms)
Fourier Analysis of Discrete Time Signals
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Application) Digital Image Processing Christophoros Nikou
Lecture 7 Transformations in frequency domain 1.Basic steps in frequency domain transformation 2.Fourier transformation theory in 1-D.
2D Sampling Goal: Represent a 2D function by a finite set of points.
Fourier Transform.
Sampling of Continuous-Time Signals Quote of the Day Optimist: "The glass is half full." Pessimist: "The glass is half empty." Engineer: "That glass is.
DTFT continue (c.f. Shenoi, 2006)  We have introduced DTFT and showed some of its properties. We will investigate them in more detail by showing the associated.
2D Fourier Transform.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Circulant Matrices and Convolution) Digital Image Processing.
Frequency domain analysis and Fourier Transform
Digital Image Processing Lecture 7: Image Enhancement in Frequency Domain-I Naveed Ejaz.
The Fourier Transform.
Computer Vision – 2D Signal & System Hanyang University Jong-Il Park.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
DIGITAL SIGNAL PROCESSING ELECTRONICS
CE Digital Signal Processing Fall Discrete-time Fourier Transform
Miguel Tavares Coimbra
ENG4BF3 Medical Image Processing
The sampling of continuous-time signals is an important topic
CSCE 643 Computer Vision: Thinking in Frequency
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Filtering in the Frequency Domain
Chapter 8 The Discrete Fourier Transform
Chapter 3 Sampling.
CE Digital Signal Processing Fall Discrete Fourier Transform (DFT)
Presentation transcript:

University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Fundamentals) Digital Image Processing Christophoros Nikou

2 C. Nikou – Digital Image Processing (E12) Filtering in the Frequency Domain Filter: A device or material for suppressing or minimizing waves or oscillations of certain frequencies. Frequency: The number of times that a periodic function repeats the same sequence of values during a unit variation of the independent variable. Webster’s New Collegiate Dictionary

3 C. Nikou – Digital Image Processing (E12) Jean Baptiste Joseph Fourier Fourier was born in Auxerre, France in –Most famous for his work “La Théorie Analitique de la Chaleur” published in –Translated into English in 1878: “The Analytic Theory of Heat”. Nobody paid much attention when the work was first published. One of the most important mathematical theories in modern engineering.

4 C. Nikou – Digital Image Processing (E12) The Big Idea = Any function that periodically repeats itself can be expressed as a sum of sines and cosines of different frequencies each multiplied by a different coefficient – a Fourier series Images taken from Gonzalez & Woods, Digital Image Processing (2002)

5 C. Nikou – Digital Image Processing (E12) 1D continuous signals Images taken from Gonzalez & Woods, Digital Image Processing (2002) It may be considered both as continuous and discrete. Useful for the representation of discrete signals through sampling of continuous signals.

6 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Impulse train function

7 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

8 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The Fourier series expansion of a periodic signal f (t).

9 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The Fourier transform of a continuous signal f (t). Attention: the variable is the frequency ( Hz ) and not the radial frequency ( Ω=2πμ ) as in the Signals and Systems course.

10 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

11 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Convolution property of the FT.

12 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Intermediate result −The Fourier transform of the impulse train. It is also an impulse train in the frequency domain. Impulses are equally spaced every 1/ΔΤ.

13 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Sampling

14 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Sampling −The spectrum of the discrete signal consists of repetitions of the spectrum of the continuous signal every 1/ΔΤ. −The Nyquist criterion should be satisfied.

15 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Nyquist theorem

16 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Oversampling Undersampling Aliasing appears Critical sampling with the Nyquist frequency FT of a continuous signal

17 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Reconstruction (under correct sampling).

18 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Reconstruction −Provided a correct sampling, the continuous signal may be perfectly reconstructed by its samples.

19 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Under aliasing, the reconstruction of the continuous signal not correct.

20 C. Nikou – Digital Image Processing (E12) 1D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Aliased signal

21 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform Images taken from Gonzalez & Woods, Digital Image Processing (2002) The Fourier transform of a sampled (discrete) signal is a continuous function of the frequency. For a N -length discrete signal, taking N samples of its Fourier transform at frequencies: provides the discrete Fourier transform (DFT) of the signal.

22 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) DFT pair of signal f [n] of length N.

23 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Property –The DFT of a N -length f [n] signal is periodic with period N. –This is due to the periodicity of the complex exponential:

24 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Property: sum of complex exponentials The proof is left as an exercise.

25 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) DFT pair of signal f [n] of length N may be expressed in matrix-vector form.

26 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.)

27 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) Example for N=4

28 C. Nikou – Digital Image Processing (E12) The Discrete Fourier Transform (cont.) The inverse DFT is then expressed by: This is derived by the complex exponential sum property.

29 C. Nikou – Digital Image Processing (E12) Linear convolution is of length N=N 1 +N 2 -1=4

30 C. Nikou – Digital Image Processing (E12) Linear convolution (cont.)

31 C. Nikou – Digital Image Processing (E12) Circular shift Signal x[n] of length N. A circular shift ensures that the resulting signal will keep its length N. It is a shift modulo N denoted by Example: x[n] is of length N =8.

32 C. Nikou – Digital Image Processing (E12) Circular convolution The result is of length g[n]=f [n]  h[n] Circular shift modulo N

33 C. Nikou – Digital Image Processing (E12) Circular convolution (cont.) g[n]=f [n]  h[n]

34 C. Nikou – Digital Image Processing (E12) DFT and convolution g[n]=f [n]  h[n] The property holds for the circular convolution. In signal processing we are interested in linear convolution. Is there a similar property for the linear convolution?

35 C. Nikou – Digital Image Processing (E12) DFT and convolution (cont.) g[n]=f [n]  h[n] Let f [n] be of length N 1 and h[n] be of length N 2. Then g[n]=f [n]*h[n] is of length N 1 +N If the signals are zero-padded to length N=N 1 +N 2 -1 then their circular convolution will be the same as their linear convolution: Zero-padded signals

36 C. Nikou – Digital Image Processing (E12) DFT and convolution (cont.) Zero-padding to length N=N 1 +N 2 -1 =4 The result is the same as the linear convolution.

37 C. Nikou – Digital Image Processing (E12) DFT and convolution (cont.) Verification using DFT

38 C. Nikou – Digital Image Processing (E12) DFT and convolution (cont.) Element-wise multiplication

39 C. Nikou – Digital Image Processing (E12) DFT and convolution (cont.) Inverse DFT of the result The same result as their linear convolution.

40 C. Nikou – Digital Image Processing (E12) 2D continuous signals Images taken from Gonzalez & Woods, Digital Image Processing (2002) Separable:

41 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The 2D impulse train is also separable:

42 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The Fourier transform of a continuous 2D signal f (x,y).

43 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Example: FT of f (x,y)=δ(x) x y f (x,y)=δ(x) μ ν F(μ,ν)=δ(ν)

44 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Example: FT of f (x,y)=δ(x-y) x y f (x,y)=δ(x-y) μ ν F(μ,ν)=δ(μ+ν)

45 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

46 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) 2D continuous convolution We will examine the discrete convolution in more detail. Convolution property

47 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) 2D sampling is accomplished by The FT of the sampled 2D signal consists of repetitions of the spectrum of the 1D continuous signal.

48 C. Nikou – Digital Image Processing (E12) 2D continuous signals (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The Nyquist theorem involves both the horizontal and vertical frequencies. Over-sampled Under-sampled

49 C. Nikou – Digital Image Processing (E12) Aliasing Images taken from Gonzalez & Woods, Digital Image Processing (2002)

50 C. Nikou – Digital Image Processing (E12) Aliasing - Moiré Patterns Effect of sampling a scene with periodic or nearly periodic components (e.g. overlapping grids, TV raster lines and stripped materials). In image processing the problem arises when scanning media prints (e.g. magazines, newspapers). The problem is more general than sampling artifacts.

51 C. Nikou – Digital Image Processing (E12) Aliasing - Moiré Patterns (cont.) Superimposed grid drawings (not digitized) produce the effect of new frequencies not existing in the original components.

52 C. Nikou – Digital Image Processing (E12) Aliasing - Moiré Patterns (cont.) In printing industry the problem comes when scanning photographs from the superposition of: The sampling lattice (usually horizontal and vertical). Dot patterns on the newspaper image.

53 C. Nikou – Digital Image Processing (E12) Aliasing - Moiré Patterns (cont.)

54 C. Nikou – Digital Image Processing (E12) Aliasing - Moiré Patterns (cont.) The printing industry uses halftoning to cope with the problem. The dot size is inversely proportional to image intensity.

55 C. Nikou – Digital Image Processing (E12) 2D discrete convolution Images taken from Gonzalez & Woods, Digital Image Processing (2002) m n 32 f [m,n] m n h [m,n] Take the symmetric of one of the signals with respect to the origin. Shift it and compute the sum at every position [m,n].

56 C. Nikou – Digital Image Processing (E12) 2D discrete convolution (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) n m 32 f [m,n] n m h [m,n] l k h [1-k,1-l] l k h [-k,-l] g [0,0]=0 g [1,1]=0

57 C. Nikou – Digital Image Processing (E12) 2D discrete convolution (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) n m 32 f [m,n] n m h [m,n] l k h [3-k,2-l] l k h [2-k,2-l] g [2,2]=3 g [3,2]=-1

58 C. Nikou – Digital Image Processing (E12) 2D discrete convolution (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) n m 32 f [m,n] n m h [m,n] n m g[m,n] M 1 +M 2 -1=3 N 1 +N 2 -1=2

59 C. Nikou – Digital Image Processing (E12) The 2D DFT Images taken from Gonzalez & Woods, Digital Image Processing (2002) 2D DFT pair of image f [m,n] of size MxN.

60 C. Nikou – Digital Image Processing (E12) The 2D DFT (cont.) Images taken from Gonzalez & Woods, Digital Image Processing (2002) All of the properties of 1D DFT hold. Particularly: –Let f [m,n] be of size M 1 xN 1 and h[m,n] of size M 2 xN 2. –If the signals are zero-padded to size ( M 1 +M 2 - 1)x(N 1 +N 2 -1) then their circular convolution will be the same as their linear convolution and: