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

Slides:



Advertisements
Similar presentations
Image Enhancement in the Frequency Domain (2)
Advertisements

Basic Properties of signal, Fourier Expansion and it’s Applications in Digital Image processing. Md. Al Mehedi Hasan Assistant Professor Dept. of Computer.
Frequency Domain Filtering (Chapter 4)
1 Image Processing Ch4: Filtering in frequency domain Prepared by: Tahani Khatib AOU.
Digital Image Processing
Digital Image Processing Frequency Filtering Ashourian
Image Enhancement in the Frequency Domain Part III
Image processing (spatial &frequency domain) Image processing (spatial &frequency domain) College of Science Computer Science Department
Digital Image Processing Lecture 11: Image Restoration Prof. Charlene Tsai.
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Enhancement in Frequency Domain.
Chap 4 Image Enhancement in the Frequency Domain.
Digital Image Processing
Digtial Image Processing, Spring ECES 682 Digital Image Processing Oleh Tretiak ECE Department Drexel University.
Digital Image Processing: Revision
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Chapter 4 Image Enhancement in the Frequency Domain.
CHAPTER 4 Image Enhancement in Frequency Domain
Image Enhancement in the Frequency Domain Part III Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement in the Frequency Domain Part II Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Chapter 4 Image Enhancement in the Frequency Domain.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Filters in the Frequency Domain.  Image Smoothing Using Frequency Domain Filters: ◦ Ideal Lowpass Filters ◦ Butterworth Lowpass Filters ◦ Gaussian Lowpass.
Presentation Image Filters
Introduction to Image Processing
Image Restoration and Reconstruction (Noise Removal)
Medical Image Analysis Image Enhancement Figures come from the textbook: Medical Image Analysis, by Atam P. Dhawan, IEEE Press, 2003.
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
CS654: Digital Image Analysis
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.
Digital Image Processing CSC331 Image Enhancement 1.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
Computer Vision – Enhancement(Part III) Hanyang University Jong-Il Park.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain 22 June 2005 Digital Image Processing Chapter 4: Image Enhancement in the.
Digital Image Processing Lecture 11: Image Restoration March 30, 2005 Prof. Charlene Tsai.
Lecture Nine Figures from Gonzalez and Woods, Digital Image Processing, Copyright 2002.
Frequency Domain Processing Lecture: 3. In image processing, linear systems are at the heart of many filtering operations, and they provide the basis.
Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial  Transformed domain Transformation.
1 CMPB 345: IMAGE PROCESSING DISCRETE TRANSFORM 2.
Fourier Transform.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
© 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain Slide
Digital Image Processing Lecture 9: Filtering in Frequency Domain Prof. Charlene Tsai.
Frequency Domain Filtering. Frequency Domain Methods Spatial Domain Frequency Domain.
Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh.
Digital Image Processing Lecture 8: Image Enhancement in Frequency Domain II Naveed Ejaz.
Digital Image Processing Chapter - 4
Digital Image Processing , 2008
Medical Image Analysis
Jean Baptiste Joseph Fourier
IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN
IMAGE PROCESSING FREQUENCY DOMAIN PROCESSING
The content of lecture This lecture will cover: Fourier Transform
Spatial & Frequency Domain
Gaussian Lowpass Filter
Image Enhancement in the
Digital Image Processing
Image Enhancement in the Frequency Domain Part I
ENG4BF3 Medical Image Processing
Frequency Domain Analysis
4. Image Enhancement in Frequency Domain
Digital Image Processing
Digital Image Processing
Lecture 4 Image Enhancement in Frequency Domain
Digital Image Processing Lecture 11: Image Restoration
Presentation transcript:

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

2 C. Nikou – Digital Image Processing (E12) DFT & Images The DFT of a two dimensional image can be visualised by showing the spectrum of the image component frequencies Images taken from Gonzalez & Woods, Digital Image Processing (2002) DFT

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

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

5 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) DFT Scanning electron microscope image of an integrated circuit magnified ~2500 times Fourier spectrum of the image

6 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

7 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

8 C. Nikou – Digital Image Processing (E12) Periodicity of the DFT The range of frequencies of the signal is between [-M/2, M/2]. The DFT covers two back-to-back half periods of the signal as it covers [0, M-1].

9 C. Nikou – Digital Image Processing (E12) Periodicity of the DFT (cont...) For display and computation purposes it is convenient to shift the DFT and have a complete period in [0, M-1]. From DFT properties: Letting N 0 =M/2 : And F(0) is now located at M/2.

10 C. Nikou – Digital Image Processing (E12) Periodicity of the DFT (cont...) In two dimensions: and F(0,0) is now located at ( M/2, N/2).

11 C. Nikou – Digital Image Processing (E12) Periodicity of the DFT (cont...)

12 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

13 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

14 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Although the images differ by a simple geometric transformation no intuitive information may be extracted from their phases regarding their relation.

15 C. Nikou – Digital Image Processing (E12) DFT & Images (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

16 C. Nikou – Digital Image Processing (E12) The DFT and Image Processing To filter an image in the frequency domain: 1.Compute F(u,v) the DFT of the image 2.Multiply F(u,v) by a filter function H(u,v) 3.Compute the inverse DFT of the result Images taken from Gonzalez & Woods, Digital Image Processing (2002)

17 C. Nikou – Digital Image Processing (E12) The importance of zero padding Images taken from Gonzalez & Woods, Digital Image Processing (2002)

18 C. Nikou – Digital Image Processing (E12) The importance of zero padding (cont...) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

19 C. Nikou – Digital Image Processing (E12) The importance of zero padding (cont...) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

20 C. Nikou – Digital Image Processing (E12) Some Basic Frequency Domain Filters Images taken from Gonzalez & Woods, Digital Image Processing (2002) Low Pass Filter High Pass Filter

21 C. Nikou – Digital Image Processing (E12) Some Basic Frequency Domain Filters Images taken from Gonzalez & Woods, Digital Image Processing (2002)

22 C. Nikou – Digital Image Processing (E12) Some Basic Frequency Domain Filters Images taken from Gonzalez & Woods, Digital Image Processing (2002)

23 C. Nikou – Digital Image Processing (E12) Smoothing Frequency Domain Filters Smoothing is achieved in the frequency domain by dropping out the high frequency components The basic model for filtering is: G(u,v) = H(u,v)F(u,v) where F(u,v) is the Fourier transform of the image being filtered and H(u,v) is the filter transform function Low pass filters – only pass the low frequencies, drop the high ones.

24 C. Nikou – Digital Image Processing (E12) Ideal Low Pass Filter Simply cut off all high frequency components that are a specified distance D 0 from the origin of the transform. Changing the distance changes the behaviour of the filter. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

25 C. Nikou – Digital Image Processing (E12) Ideal Low Pass Filter (cont…) The transfer function for the ideal low pass filter can be given as: where D(u,v) is given as:

26 C. Nikou – Digital Image Processing (E12) Ideal Low Pass Filter (cont…) An image, its Fourier spectrum and a series of ideal low pass filters of radius 5, 15, 30, 80 and 230 superimposed on top of it. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

27 C. Nikou – Digital Image Processing (E12) Ideal Lowpass Filters (cont...) ILPF in the spatial domain is a sinc function that has to be truncated and produces ringing effects. The main lobe is responsible for blurring and the side lobes are responsible for ringing. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

28 C. Nikou – Digital Image Processing (E12) Ideal Low Pass Filter (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Original image ILPF of radius 5 ILPF of radius 30 ILPF of radius 230 ILPF of radius 80 ILPF of radius 15

29 C. Nikou – Digital Image Processing (E12) Butterworth Lowpass Filters The transfer function of a Butterworth lowpass filter of order n with cutoff frequency at distance D 0 from the origin is defined as: Images taken from Gonzalez & Woods, Digital Image Processing (2002)

30 C. Nikou – Digital Image Processing (E12) Butterworth Lowpass Filters (cont...) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

31 C. Nikou – Digital Image Processing (E12) Butterworth Lowpass Filter (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Original image BLPF n=2, D 0 =5 BLPF n=2, D 0 =30 BLPF n=2, D 0 =230 BLPF n=2, D 0 =80 BLPF n=2, D 0 =15 Less ringing than ILPF due to smoother transition

32 C. Nikou – Digital Image Processing (E12) Gaussian Lowpass Filters The transfer function of a Gaussian lowpass filter is defined as: Images taken from Gonzalez & Woods, Digital Image Processing (2002)

33 C. Nikou – Digital Image Processing (E12) Gaussian Lowpass Filters (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Original image Gaussian D 0 =5 Gaussian D 0 =30 Gaussian D 0 =230 Gaussian D 0 =85 Gaussian D 0 =15 Less ringing than BLPF but also less smoothing

34 C. Nikou – Digital Image Processing (E12) Lowpass Filters Compared ILPF D 0 =15 BLPF n=2, D 0 =15 Gaussian D 0 =15 Images taken from Gonzalez & Woods, Digital Image Processing (2002)

35 C. Nikou – Digital Image Processing (E12) Lowpass Filtering Examples A low pass Gaussian filter is used to connect broken text Images taken from Gonzalez & Woods, Digital Image Processing (2002)

36 C. Nikou – Digital Image Processing (E12) Lowpass Filtering Examples Images taken from Gonzalez & Woods, Digital Image Processing (2002)

37 C. Nikou – Digital Image Processing (E12) Lowpass Filtering Examples (cont…) Different lowpass Gaussian filters used to remove blemishes in a photograph. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

38 C. Nikou – Digital Image Processing (E12) Lowpass Filtering Examples (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

39 C. Nikou – Digital Image Processing (E12) Sharpening in the Frequency Domain Edges and fine detail in images are associated with high frequency components High pass filters – only pass the high frequencies, drop the low ones High pass frequencies are precisely the reverse of low pass filters, so: H hp (u, v) = 1 – H lp (u, v)

40 C. Nikou – Digital Image Processing (E12) Ideal High Pass Filters The ideal high pass filter is given by: D 0 is the cut off distance as before. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

41 C. Nikou – Digital Image Processing (E12) Ideal High Pass Filters (cont…) IHPF D 0 = 15IHPF D 0 = 30IHPF D 0 = 80 Images taken from Gonzalez & Woods, Digital Image Processing (2002)

42 C. Nikou – Digital Image Processing (E12) Butterworth High Pass Filters The Butterworth high pass filter is given as: n is the order and D 0 is the cut off distance as before. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

43 C. Nikou – Digital Image Processing (E12) Butterworth High Pass Filters (cont…) BHPF n=2, D 0 =15 Images taken from Gonzalez & Woods, Digital Image Processing (2002) BHPF n=2, D 0 =30 BHPF n=2, D 0 =80

44 C. Nikou – Digital Image Processing (E12) Gaussian High Pass Filters The Gaussian high pass filter is given as: D 0 is the cut off distance as before. Images taken from Gonzalez & Woods, Digital Image Processing (2002)

45 C. Nikou – Digital Image Processing (E12) Gaussian High Pass Filters (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Gaussian HPF n=2, D 0 =15 Gaussian HPF n=2, D 0 =30 Gaussian HPF n=2, D 0 =80

46 C. Nikou – Digital Image Processing (E12) Highpass Filter Comparison IHPF D 0 = 15 Images taken from Gonzalez & Woods, Digital Image Processing (2002) Gaussian HPF n=2, D 0 =15 BHPF n=2, D 0 =15

47 C. Nikou – Digital Image Processing (E12) Highpass Filtering Example Original image Highpass filtering result High frequency emphasis result After histogram equalisation Images taken from Gonzalez & Woods, Digital Image Processing (2002)

48 C. Nikou – Digital Image Processing (E12) Laplacian In The Frequency Domain Laplacian in the frequency domain (not centered) 2-D image of Laplacian in the frequency domain (not centered) Inverse DFT of Laplacian in the frequency domain Zoomed section of the image on the left compared to spatial filter Images taken from Gonzalez & Woods, Digital Image Processing (2002)

49 C. Nikou – Digital Image Processing (E12) Frequency Domain Laplacian Example Original image Laplacian filtered image Laplacian image scaled Enhanced image

50 C. Nikou – Digital Image Processing (E12) Band-pass and Band-stop Filters

51 C. Nikou – Digital Image Processing (E12) Band-Pass Filters (cont...)

52 C. Nikou – Digital Image Processing (E12) Band-Pass Filters (cont...)

53 C. Nikou – Digital Image Processing (E12) Fast Fourier Transform The reason that Fourier based techniques have become so popular is the development of the Fast Fourier Transform (FFT) algorithm. It allows the Fourier transform to be carried out in a reasonable amount of time. Reduces the complexity from O(N 4 ) to O(N 2 logN 2 ).

54 C. Nikou – Digital Image Processing (E12) Frequency Domain Filtering & Spatial Domain Filtering Similar jobs can be done in the spatial and frequency domains. Filtering in the spatial domain can be easier to understand. Filtering in the frequency domain can be much faster – especially for large images.