Digital Image Processing

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

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

Fourier Transforms and the Frequency Domain

Smoothing frequency domain filters

Frequency Domain Enhancement

Smoothing frequency domain filters

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

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

Lecture #10. EECS490: Digital Image Processing

Transforms and Frequency Filtering

TDI2131 Digital Image Processing

DIGITAL IMAGE PROCESSING UNIT III

Midterm Review. Image Processing CSE 166 Lecture 10

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

Image Smoothening and Sharpening using Frequency Domain Filtering Technique

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

The Fourier Transform

8. Lecture. Image restoration: Fourier domain

Digital Image Processing. Frequency Domain Filtering

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

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

Image Enhancement. Image Enhancement

Head, IICT, Indus University, India

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

Practical Image and Video Processing Using MATLAB

Digital Image Processing 3/e

Sharpening Spatial Filters ( high pass)

TDI2131 Digital Image Processing (Week 4) Tutorial 3

Fourier analysis of images

Digital Image Processing

Introduction Approach Work Performed and Results

Lecture - 10 Image Enhancement in the Frequency Domain

2D Discrete Fourier Transform

Lecture 12: Image Processing and 2D Transforms

Analysis of Image Enhancement Techniques Used in Remote Sensing Satellite Imagery

Understanding Digital Signal Processing

Examples of image processing

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

Filtering in the spatial domain (Spatial Filtering)

Signal Processing Toolbox

Computer Vision, Lecture 3

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

EEL 6562 Image Processing and Computer Vision Image Restoration

Investigation of Optimal Denoising Filter for MRI Images

Digital Signal Processing

Automatic processing to restore data of MODIS band 6

Digital Image Processing

Chrominance Assisted Sharpening of Images

Image Processing for feature extraction

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

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

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Digital Imaging Systems for Historical Documents

Image Enhancement using Histogram Equalization and Spatial Filtering

Prof. Feng Liu. Fall /04/2018

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

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

Design of FIR Filters

EE482: Digital Signal Processing Applications

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

Filters. Materials from Prof. Klaus Mueller

Filtering. Image Enhancement Spatial and Frequency Based

UNIVERSITY OF WEST BOHEMIA

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

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

ELEC Dr Reji Mathew Electrical Engineering UNSW

Digital Image Processing

MATLAB 6.5 Image Processing Toolbox Tutorial

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

ZÁPADOČESKÁ UNIVERZITA V PLZNI

Images and Filters. EE/CSE 576 Linda Shapiro

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

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

Chapter 2 Image Enhancement in the Spatial Domain

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

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

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

Signal processing preliminaries

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

Circular averaging filter (pillbox) Approximates the two-dimensional Laplacian operator. Laplacian of Gaussian filter

IDENTIFICATION OF FISSION GAS VOIDS. Ryan Collette

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

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

Digital Image Processing

Digital Image Processing

Digital Image Processing. Lecture 5 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Digital Image Processing

FFT Convolution. The Overlap-Add Method

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

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

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

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

Prof. Feng Liu. Winter /10/2019

Final Exam Solutions June 14, 2006

F I R Filter (Finite Impulse Response)

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

COMPREHENSIVE EXAMINATION WEIGHTAGE 40%, MAX MARKS 40, TIME 3 HOURS, DATE Note : Answer all the questions

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

Syllabus of the course Methods for Image Processing a.y. 2016/17

Spatial Domain Processing and Image Enhancement

Transcription:

Digital Image Processing Filtering in the Frequency Domain (Application) Christophoros Nikou cnikou@cs.uoi.gr University of Ioannina - Department of Computer Science and Engineering

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].

3 Periodicity of the DFT (cont...) j 0 From DFT properties: f n e F k N 2 ( N n/ M ) [ ] ( 0) Letting N 0 =M/2: f [ n]( 1) n F( k M / 2) And F(0) is now located at M/2.

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) is now located at (M/2, N/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

7 DFT & Images

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

9 DFT & Images (cont )

10 DFT & Images (cont )

11 DFT & Images (cont )

12 DFT & Images (cont )

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 )

15 DFT synopsis

16 DFT synopsis (cont.)

17 DFT synopsis (cont.)

18 DFT synopsis (cont.)

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

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?

23 The importance of zero padding The DFT considers that the signal is periodic and produces wraparound errors. (cont.)

24 The importance of zero padding (cont.)

25 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.

26 Spatial zero-padding and filters (cont.) The filter and its inverse DFT of length 256 (continuous line)

27 Spatial zero-padding and filters Zero-padded filter and its DFT (cont.) Spatial truncation of the filter results in ringing effects.

28 Spatial zero-padding and filters 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. (cont.) 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.

29 Steps of filtering in the DFT domain

30 Steps of filtering in the DFT domain What if the filter is known in the spatial domain? (cont.) -1 0 1-2 0 2-1 0 1 Apply a 3x3 Sobel filter to the 600x600 image in the frequency domain.

31 Steps of filtering in the DFT domain 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 the top left corner (0,0) of the array. 4. Compute the DFT of the filter. 5. Compute the DFT of the image. 6. Multiply the DFTs and invert. (cont.)

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

33 The importance of zero padding (cont...)

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

35 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.

36 Ideal Low Pass Filter (cont ) The transfer function for the ideal low pass filter can be given as: H ( u, v) 1 0 if if D( u, v) D( u, v) D D 0 0 where D(u,v) is given as: D 2 ( u, v) [( u M / 2) ( v N / 2) 2 ] 1/ 2

37 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.

38 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.

39 Ideal Low Pass Filter (cont ) Original image ILPF of radius 5 ILPF of radius 15 ILPF of radius 30 ILPF of radius 80 ILPF of radius 230

40 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) 1 2n [ D ( u, v ) / D 0 ]

41 Butterworth Lowpass Filters (cont...)

42 Butterworth Lowpass Filter (cont ) Original image BLPF n=2, D 0 =5 BLPF n=2, D 0 =15 BLPF n=2, D 0 =30 BLPF n=2, D 0 =80 BLPF n=2, D 0 =230 Less ringing than ILPF due to smoother transition

43 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

44 Gaussian Lowpass Filters (cont ) Original image Gaussian D 0 =5 Gaussian D 0 =15 Gaussian D 0 =30 Gaussian D 0 =85 Gaussian D 0 =230 Less ringing than BLPF but also less smoothing

45 Lowpass Filters Compared ILPF D 0 =15 BLPF n=2, D 0 =15 Gaussian D 0 =15

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

47 Lowpass Filtering Examples

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

49 Lowpass Filtering Examples (cont )

50 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)

51 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.

52 Ideal High Pass Filters (cont ) IHPF D 0 = 15 IHPF D 0 = 30 IHPF D 0 = 80

53 Butterworth High Pass Filters The Butterworth high pass filter is given as: 1 1 [ D0 / D( u, v)] H( u, v) 2n n is the order and D 0 is the cut off distance as before.

54 Butterworth High Pass Filters (cont ) BHPF n=2, D 0 =15 BHPF n=2, D 0 =30 BHPF n=2, D 0 =80

55 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.

56 Gaussian High Pass Filters (cont ) Gaussian HPF n=2, D 0 =15 Gaussian HPF n=2, D 0 =30 Gaussian HPF, D 0 =80

57 Highpass Filter Comparison IHPF D 0 = 15 BHPF n=2, D 0 =15 Gaussian HPF, D 0 =15

58 Spatial Representation of Highpass Filters Ideal Butterworth Gaussian

59 The Laplacian in the Frequency Domain Image enhancement operations (e.g. unsharp masking, high boost filtering) may be alternatively implemented in the frequency domain. Laplacian in the DFT domain: H u v u v 2 2 2 (, ) 4 ( )

60 Steps of filtering in the DFT domain (cont.) To obtain it in the frequency domain, we zero-pad the image and repeat the content periodically. 0 1 0 1-4 1 0 1 0-4 1 1 0 1 The center of the mask is at (0,0). 1

61 Frequency Domain Laplacian Example Original image Laplacian filtered image Laplacian image scaled Enhanced image

62 Band-pass and Band-stop Filters

63 Band-Pass Filters (cont...)

64 Band-Pass Filters (cont...)

65 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 ).

66 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.