Digital Image Processing. Filtering in the Frequency Domain (Application)

Similar documents
Digital Image Processing

Digital Image Processing. Image Enhancement: Filtering in the Frequency Domain

Smoothing frequency domain filters

Frequency Domain Enhancement

Fourier Transforms and the Frequency Domain

Smoothing frequency domain filters

1.Discuss the frequency domain techniques of image enhancement in detail.

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Lecture #10. EECS490: Digital Image Processing

Transforms and Frequency Filtering

TDI2131 Digital Image Processing

DIGITAL IMAGE PROCESSING UNIT III

Image Smoothening and Sharpening using Frequency Domain Filtering Technique

Midterm Review. Image Processing CSE 166 Lecture 10

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Image acquisition. Midterm Review. Digitization, line of image. Digitization, whole image. Geometric transformations. Interpolation 10/26/2016

SYLLABUS CHAPTER - 2 : INTENSITY TRANSFORMATIONS. Some Basic Intensity Transformation Functions, Histogram Processing.

8. Lecture. Image restoration: Fourier domain

The Fourier Transform

Digital Image Processing. Frequency Domain Filtering

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

Image Enhancement. Image Enhancement

Fourier analysis of images

Digital Image Processing 3/e

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Lecture - 10 Image Enhancement in the Frequency Domain

Lecture 12: Image Processing and 2D Transforms

Sharpening Spatial Filters ( high pass)

Analysis of Image Enhancement Techniques Used in Remote Sensing Satellite Imagery

Understanding Digital Signal Processing

Examples of image processing

Automatic processing to restore data of MODIS band 6

Image Processing for feature extraction

Computer Vision, Lecture 3

Digital Image Processing

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

EEL 6562 Image Processing and Computer Vision Image Restoration

Head, IICT, Indus University, India

Digital Signal Processing

Design of FIR Filters

2D Discrete Fourier Transform

Introduction Approach Work Performed and Results

Practical Image and Video Processing Using MATLAB

Enhancement. Degradation model H and noise must be known/predicted first before restoration. Noise model Degradation Model

MATLAB 6.5 Image Processing Toolbox Tutorial

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Module 3: Video Sampling Lecture 18: Filtering operations in Camera and display devices. The Lecture Contains: Effect of Temporal Aperture:

Signal Processing Toolbox

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

F I R Filter (Finite Impulse Response)

Final Exam Solutions June 14, 2006

Investigation of Optimal Denoising Filter for MRI Images

Filters. Materials from Prof. Klaus Mueller

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

Filtering in the spatial domain (Spatial Filtering)

Computer Graphics (Fall 2011) Outline. CS 184 Guest Lecture: Sampling and Reconstruction Ravi Ramamoorthi

Reconstruction of Non-Cartesian MRI Data

IDENTIFICATION OF FISSION GAS VOIDS. Ryan Collette

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

1. (a) Explain the process of Image acquisition. (b) Discuss different elements used in digital image processing system. [8+8]

EE482: Digital Signal Processing Applications

FFT Convolution. The Overlap-Add Method

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012

A New Method of Emission Measurement

Digital Image Processing

MATLAB for Audio Signal Processing. P. Professorson UT Arlington Night School

TDI2131 Digital Image Processing (Week 4) Tutorial 3

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Image Enhancement using Histogram Equalization and Spatial Filtering

Chapter 2 Image Enhancement in the Spatial Domain

Image Deblurring and Noise Reduction in Python TJHSST Senior Research Project Computer Systems Lab

Digital Processing of Continuous-Time Signals

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

Digital Imaging Systems for Historical Documents

Signal processing preliminaries

Digital Processing of

Teaching Scheme. Credits Assigned (hrs/week) Theory Practical Tutorial Theory Oral & Tutorial Total

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Continuous-Time Analog Filters

Images and Filters. EE/CSE 576 Linda Shapiro

Digital Image Processing

Digital Image Processing

E Final Exam Solutions page 1/ gain / db Imaginary Part

Experiment 4- Finite Impulse Response Filters

NO-REFERENCE PERCEPTUAL QUALITY ASSESSMENT OF RINGING AND MOTION BLUR IMAGE BASED ON IMAGE COMPRESSION

Human Visual System. Digital Image Processing. Digital Image Fundamentals. Structure Of The Human Eye. Blind-Spot Experiment.

INTRODUCTION TO COMPUTER MUSIC SAMPLING SYNTHESIS AND FILTERS. Professor of Computer Science, Art, and Music

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

UNIVERSITY OF WEST BOHEMIA

Image processing in the spatial and frequency domain

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Continuing Education. Filtering in Frequency Space. THE FREQUENCY DOMAIN Frequency Space

Chrominance Assisted Sharpening of Images

Digital Image Processing

Transcription:

Digital Image Processing Filtering in the Frequency Domain (Application) Christophoros Nikou cnikou@cs.uoi.gr University of Ioannina - Department of Computer Science 2 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]. For display and computation purposes it is convenient to shift the DFT and have a complete period in [0, M-1]. 1

3 Periodicity of the DFT (cont...) j2 π ( N0n/ M) From DFT properties: f [ ne ] F( k N ) Letting N 0 =M/2: f [ n ]( 1) n Fk ( M /2) And F(0) is now located at M/2. 0 4 Periodicity of the DFT (cont...) In two dimensions: m+ n f[ m, n]( 1) F( k M /2, l N /2) and F(0,0) 0) is now located at (M/2, N/2). 2

5 DFT & Images The DFT of a two dimensional image can be visualised by showing the spectrum of the image component frequencies DFT 6 DFT & Images 3

7 DFT & Images 8 DFT & Images (cont ) Scanning electron microscope image of an integrated circuit magnified ~2500 times DFT Fourier spectrum of the image 4

9 DFT & Images (cont ) 10 DFT & Images (cont ) 5

11 DFT & Images (cont ) 12 DFT & Images (cont ) 6

13 DFT & Images (cont ) Although the images differ by a simple geometric transformation no intuitive information may be extracted from their phases regarding their relation. 14 DFT & Images (cont ) 7

15 DFT synopsis 16 DFT synopsis (cont.) 8

17 DFT synopsis (cont.) 18 DFT synopsis (cont.) 9

19 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 20 Some Basic Frequency Domain Filters The DFT is centered after multiplication of the image by (-1) m+n 10

21 Some Basic Frequency Domain Filters (cont.) Low Pass Filter High Pass Filter 22 The importance of zero padding The image and the DFT are considered to be periodic. The vertical edges of the middle image are not blurred if no padding is applied. Why? 11

23 The importance of zero padding (cont.) 24 Spatial zero-padding and filters Padding is performed in the spatial domain. The filter is defined in the frequency domain. A naïve approach: Compute the inverse DFT of the filter. Pad the filter in the spatial domain to have the same size as the image. Compute its DFT to return to the frequency domain. 12

25 Spatial zero-padding and filters (cont.) The filter and its inverse DFT of length 256 (continuous line) 26 Spatial zero-padding and filters (cont.) Zero-padded filter and its DFT Spatial truncation of the filter results in ringing effects. 13

27 Spatial zero-padding and filters (cont.) We cannot work with an infinite number of filter components and simultaneously perform zeropadding to avoid aliasing. A decision on which limitation to accept is required. One solution to zero-pad the image and then use a filter of the same size with no zero-padding Small errors due to aliasing but it is generally preferable than ringing. Another solution is to choose filters attenuating gradually instead of ideal filters. 28 Steps of filtering in the DFT domain 14

29 Steps of filtering in the DFT domain (cont.) What if the filter is known in the spatial domain? -1 0 1-2 0 2-1 0 1 Apply a 3x3 Sobel filter to the 600x600 image in the frequency domain. 30 Steps of filtering in the DFT domain (cont.) 1. Pad the image and the filter to 602x602. 2. Place the filter to the center of the 602x602 padded array. 3. Multiply the filter by (-1) m+n to place the center of the filter to (0,0) of the array. 4. Compute the DFT of the filter. 5. Multiply the DFT by (-1) m+n to place it to the center of the array. 6. Perform filtering in the frequency domain. 15

31 Steps of filtering in the DFT domain (cont.) Alternatively, pad to 602x602, repeat the filter periodically and compute the DFT. -1 0 1-2 0 2-1 0 1 0 2 0 1-2 -1 0 1-1 32 The importance of zero padding (cont...) 16

33 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. 34 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. 17

35 Ideal Low Pass Filter (cont ) The transfer function for the ideal low pass filter can be given as: 1 H ( u, v) = 0 if if D( u, v) D 0 D( u, v) > D 0 where D(u,v) is given as: D 2 ( u, v) = [( u M / 2) + ( v N / 2) ] 2 1/ 2 36 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. 18

37 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. 38 Ideal Low Pass Filter (cont ) Original image ILPF of radius 15 ILPF of radius 80 ILPF of radius 5 ILPF of radius 30 ILPF of radius 230 19

39 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: 1 H ( u, v) = 2n 1+ [ D( u, v) / D0] 40 Butterworth Lowpass Filters (cont...) 20

41 Butterworth Lowpass Filter (cont ) Original image BLPF n=2, D 0 =5 BLPF n=2, D 0 =15 BLPF n=2, D 0 =80 Less ringing than ILPF due to smoother transition BLPF n=2, D 0 =30 BLPF n=2, D 0 =230 42 Gaussian Lowpass Filters The transfer function of a Gaussian lowpass filter is defined as: H ( u, v) = e D 2 ( u, v)/ 2D 2 0 21

43 Gaussian Lowpass Filters (cont ) Original image Gaussian D 0 =5 Gaussian D 0 =15 Gaussian D 0 =85 Less ringing than BLPF but also less smoothing Gaussian D 0 =30 Gaussian D 0 =230 44 Lowpass Filters Compared ILPF D 0 =15 BLPF n=2, D 0 =15 0 Gaussian D 0 =15 22

45 Lowpass Filtering Examples A low pass Gaussian filter is used to connect broken text 46 Lowpass Filtering Examples 23

47 Lowpass Filtering Examples (cont ) Different lowpass Gaussian filters used to remove blemishes in a photograph. p 48 Lowpass Filtering Examples (cont ) 24

49 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) 50 Ideal High Pass Filters The ideal high pass filter is given by: 0 if D ( u, v ) D0 H ( u, v) = 1 if D( u, v) > D0 D 0 is the cut off distance as before. 25

51 Ideal High Pass Filters (cont ) IHPF D 0 = 15 IHPF D 0 = 30 IHPF D 0 = 80 52 Butterworth High Pass Filters The Butterworth high pass filter is given as: 1 ( u, v) = 1+ [ D0 / D( u, v)] H 2n n is the order and D 0 is the cut off distance as before. 26

53 Butterworth High Pass Filters (cont ) BHPF n=2, D 0 =15 BHPF n=2, D 0 =30 BHPF n=2, D 0 =80 54 Gaussian High Pass Filters The Gaussian high pass filter is given as: H ( u, v) = 1 e D 2 ( u, v)/ 2D 2 0 D 0 is the cut off distance as before. 27

55 Gaussian High Pass Filters (cont ) Gaussian HPF n=2, D 0 =15 Gaussian HPF n=2, D 0 =30 Gaussian HPF n=2, D 0 =80 56 Highpass Filter Comparison IHPF D 0 = 15 BHPF n=2, D 0 =15 Gaussian HPF n=2, D 0 =15 28

57 Highpass Filtering Example Original ima age t High frequency emphasis result Highpas ss filtering result After histogram equalisation 58 Laplacian In The Frequency Domain Laplacian in the frequency do omain (not center red) n Inverse DFT of Laplacian in the frequency domain d (not domain centered) 2-D imag in the ge of Laplacian e frequency Zoomed section of the image on the left compared to spatial filter 29

59 Frequency Domain Laplacian Example Original image Laplacian filtered image Laplacian image scaled Enhanced image 60 Band-pass and Band-stop Filters 30

61 Band-Pass Filters (cont...) 62 Band-Pass Filters (cont...) 31

63 Fast Fourier Transform The reason that Fourier based techniques have become so popular p 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 ). 64 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. 32