Digital Image Processing. Filtering in the Frequency Domain

Similar documents
Chapter 4: Filtering in the Frequency Domain. Fourier Analysis R. C. Gonzalez & R. E. Woods

Chapter 4 Image Enhancement in the Frequency Domain

Image Enhancement in the frequency domain. GZ Chapter 4

Digital Image Processing COSC 6380/4393

Filtering in Frequency Domain

Convolution Spatial Aliasing Frequency domain filtering fundamentals Applications Image smoothing Image sharpening

EECS490: Digital Image Processing. Lecture #11

Filtering in the Frequency Domain

Digital Image Processing. Chapter 4: Image Enhancement in the Frequency Domain

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016

Fourier series: Any periodic signals can be viewed as weighted sum. different frequencies. view frequency as an

IMAGE ENHANCEMENT: FILTERING IN THE FREQUENCY DOMAIN. Francesca Pizzorni Ferrarese

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

Digital Image Processing COSC 6380/4393

CITS 4402 Computer Vision

ECG782: Multidimensional Digital Signal Processing

Machine vision. Summary # 4. The mask for Laplacian is given

Machine vision, spring 2018 Summary 4

Introduction to Computer Vision. 2D Linear Systems

COMP344 Digital Image Processing Fall 2007 Final Examination

EXAMINATION QUESTION PAPER

Computer Vision. Filtering in the Frequency Domain

G52IVG, School of Computer Science, University of Nottingham

Definition. A signal is a sequence of numbers. sequence is also referred to as being in l 1 (Z), or just in l 1. A sequence {x(n)} satisfying

Responses of Digital Filters Chapter Intended Learning Outcomes:

Review Smoothing Spatial Filters Sharpening Spatial Filters. Spatial Filtering. Dr. Praveen Sankaran. Department of ECE NIT Calicut.

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Image Enhancement: Methods. Digital Image Processing. No Explicit definition. Spatial Domain: Frequency Domain:

Image Enhancement in the frequency domain. Inel 5046 Prof. Vidya Manian

3. Lecture. Fourier Transformation Sampling

Computer Vision & Digital Image Processing. Periodicity of the Fourier transform

Lecture # 06. Image Processing in Frequency Domain

Contents. Signals as functions (1D, 2D)

Fourier Transforms 1D

ECG782: Multidimensional Digital Signal Processing

Contents. Signals as functions (1D, 2D)

Contents. Signals as functions (1D, 2D)

Image Degradation Model (Linear/Additive)

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform

Fourier Transform 2D

Computer Engineering 4TL4: Digital Signal Processing

Lecture 13: Implementation and Applications of 2D Transforms

Computer Vision Lecture 3

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Chapter 8 The Discrete Fourier Transform

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Frequency2: Sampling and Aliasing

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

E2.5 Signals & Linear Systems. Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & 2)

Local Enhancement. Local enhancement

Module 3. Convolution. Aim

Basics on 2-D 2 D Random Signal

Empirical Mean and Variance!

Continuous-Time Fourier Transform

MIT 2.71/2.710 Optics 10/31/05 wk9-a-1. The spatial frequency domain

Digital Image Processing. Lecture 8 (Enhancement in the Frequency domain) Bu-Ali Sina University Computer Engineering Dep.

LAB 6: FIR Filter Design Summer 2011

Continuous and Discrete Time Signals and Systems

IMAGE ENHANCEMENT II (CONVOLUTION)

Outline. Convolution. Filtering

Lecture 10, Multirate Signal Processing Transforms as Filter Banks. Equivalent Analysis Filters of a DFT

Linear Convolution Using FFT

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

Discrete-time Signals and Systems in

The Discrete Fourier Transform

Filter Analysis and Design

Digital Image Processing

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

VU Signal and Image Processing. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

Wiener Filter for Deterministic Blur Model

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics

Chapter 16. Local Operations

Filtering in the Frequency Domain

18.085: Summer 2016 Due: 3 August 2016 (in class) Problem Set 8

SIMG-782 Digital Image Processing Homework 6

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

E : Lecture 1 Introduction

Lecture Outline. Basics of Spatial Filtering Smoothing Spatial Filters. Sharpening Spatial Filters

Review of Fundamentals of Digital Signal Processing

Digital Signal Processing:

Multiscale Image Transforms

BOOK CORRECTIONS, CLARIFICATIONS, AND CORRECTIONS TO PROBLEM SOLUTIONS

Problem Set 8 - Solution

Review of Fundamentals of Digital Signal Processing

DISCRETE-TIME SIGNAL PROCESSING

Discrete Fourier Transform (DFT) & Fast Fourier Transform (FFT) Lab 9

Lecture 3: Linear Filters

Chapter 4 Image Enhancement in the Frequency Domain

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

Prof. Mohd Zaid Abdullah Room No:

Linear Systems. ! Textbook: Strum, Contemporary Linear Systems using MATLAB.

Filtering and Edge Detection

Review of Linear Systems Theory

BME 50500: Image and Signal Processing in Biomedicine. Lecture 5: Correlation and Power-Spectrum CCNY

Lecture 3: Linear Filters

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

18/10/2017. Image Enhancement in the Spatial Domain: Gray-level transforms. Image Enhancement in the Spatial Domain: Gray-level transforms

Digital Image Processing

The Discrete-Time Fourier

Grades will be determined by the correctness of your answers (explanations are not required).

Transcription:

2D Linear Systems 2D Fourier Transform and its Properties The Basics of Filtering in Frequency Domain Image Smoothing Image Sharpening Selective Filtering Implementation Tips 1

General Definition: System f x, y H g x, y,, g x y H f x y 2

Linearity,,,, H af x y bf x y ah f x y bh f x y 1 2 1 2 Shift Invariant or Spatially Invariant:,,,, g x y H f x y g x x y y H f x x y y Causality: Same as before Don t worry about it! 0 0 0 0 Stability: Same as before 3

Unit Impulse Function (Pinhole): xy, xy, 0,0 xy 0, 0,0 x, y dxdy 1 4

Point Spread Function (Impulse Response):, ;,, H x y x y H x x y y 0 0 0 0 PSD of Hubble Telescope Linear Shift Invariant Systems:, ; 0, 0 0, 0 0, 0,, H x y x y H x x y y H x x y y H x y H x y 5

Convolution/Correlation Integral:,,,, f x y h x y f s t h x s y t dsdt,,,, f x y h x y f s t h x s y t dsdt Convolution/Correlation Summation: M1N1,,,, f m n h m n f p q h m p n q p0 q0 M1N1,,,, f m n h m n f p q h m p n q p0 q0 6

The 2-D Continuous Fourier Transform j 2 ux vy F u v f x y e dxdy,, j 2 ux vy f x y F u v e dudv,, x y A rect rect A TZsinc ut sinc vz Z T 7

2-D Sampling and Sampling Theorem 2-D impulse train: x mx, y ny m m Error Free Reconstruction: 1 1 x, y 2u 2v max max 8

Aliasing in Images: See Figures 4.16-4.22 for practical examples. 9

2-D Discrete Fourier Transform M 1N 1 1 um vn F u, v f m, n exp 2 1 j m 0 n 0 M N M 1N 1 1 um vn f m, n Fu, v exp j 2 MN u0 v 0 M N Spatial and Frequency Intervals 1 1 u, v M x N y 10

Phase Significance 11

Phase Significance 12

Phase Significance 13

Symmetry Properties 14

Definition and Properties (1) 15

Definition and Properties (2) 16

DFT Pairs (1) 17

DFT Pairs (2) 18

FFT Shift, Centering and Symmetry 19

Fourier Transform Centering fftshift in Matlab 20

Example Without Shift With Shift 21

Translation Rotation 22

Phase Changes: Original Translated Rotated 23

Line Pattern in Spatial and Frequency Domain Strong ±45 edge in Spatial Strong ±45 edge in Frequency 24

Frequency Domain Filtering Fundamentals: Convolution Theorem: Zero Padding: f h g Zero-Padding is necessary to avoid Wraparound error. Circular vs. Linear Convolution,,,, f m n h m n F u v H u v 1 1 M N PQ M P N Q 25

Frequency Domain Manipulation Set F(0,0) to zero Clip negative value 26

Lowpass, Highpass, Highboost No shift 27

Zero-Padding Effect: Blurring With Gaussian Original No Zero-Padding Zero-Padding 28

Inherent Periodicity of DFT and Zero-Padding With (Right) and Without (Left) Padding 29

Zero-Padding Side effect Read Pg. 260-262! Ideal Filter (TL) Time Domain (BL) Zero Padding (TR) Ringing Effect (BR) 30

Effect of small changes in phase Why we prefer zero-phase filters? j 0.5 F IDFT F e j 0.25 F IDFT F e 31

Steps for Frequency Domain Filtering a) Original b) Padding c) Multiply by (-1) x+y d) FFT e) GLP (Centered) f) Multiply and (e) g) Multiply IFFT Real by (-1) x+y h) Cropping 32

Spatial-Frequency Correspondences h x, y H u, v The most used Filter (Gaussian) 1 2 2 e 2 2 x y 2 2 2 2 u v e 2 2 2 2 2 33

Example (1) 34

Example (2) An image and its spectrum 35

Filtering in Spatial and Frequency Domain 36

Image Smoothing in Frequency Domain Ideal Lowpass Filter Butterworth Lowpass Filter Gaussian Lowpass Filter More Examples 2 2, D u v u v 37

Ideal Lowpass Filter 38

Test Pattern and Energy Circles 460 (99.2%) 160 (97.8%) 60 (95.7%) 30 (93.1%) 10 (87.0%) 39

Ideal Lowpass Filter 10, 30, 60, 160, and 460 (Radius) Smoothing Blurring Ringing Effect 40

Origin of Ringing Effect 41

Butterworth Lowpass Filter: 42

Butterworth Lowpass Filter: Order (2) Same radius Smoothing Blurring Less Ringing Effect 43

Less Ringing Effect of Butterworh Filter: Order 1,2,5, and 20 44

Gaussian Lowpass Filter: 45

Gaussian Lowpass Filter: Smoothing Blurring No Ringing Effect! 46

Low Resolution Images Repairing 47

Pre-print Processing (Smooth and soft-looking) Original, D 0 =100, and D 0 =80 48

Remove Unwanted Pattern: Remove Horizontal Lines (Imaging System Deficiency) Large Recognizable Features Original, D 0 =50, and D 0 =20 49

Image Sharpening in Frequency Domain Ideal Highpass Filter Butterworth Highpass Filter Gaussian Highpass Filter More Examples, 1, H u v H u v HP LP 50

Highpass Filters 51

Spatial Representation of Highpass Filters Ringing (Ideal, Butterworth, and Gaussian) 52

Ideal Highpass Filter D 0 =30 D 0 =60 D 0 =160 53

Butterworth (n=2) Highpass Filters D 0 =30 D 0 =60 D 0 =160 54

Gaussian Highpass Filter D 0 =30 D 0 =60 D 0 =160 55

Thumb Print Processing: Original (Left) Butterworth Highpass Filter with n=4, D 0 =50 (Middle) Thresholding (Right) Setting Negative Value to Black and Positive value to White 56

Laplacian in Frequency Domain: 2 2 2 2 2, 4 4, H u v u v D u v Image Laplacian: 2 f x, y 1 H u, v F u, v Enhanced Image: 2,,, 1 F u, v H u, v F u, v g x y f x y c f x y 1 2 2 u v F u v 1 4 D,, 57

Example (Laplacian): Similar But Not identical to Spatial Domain 58

Unsharp Masking, Highboost, High-Frequency Emphasis: gmask x, y f x, y flp x, y 1 f x, y H u, v F u, v LP LP Unsharp Masking (K=1) and Highboost Filters(K>1): g x, y f x, y kg x, y High Frequency Emphasing: 1 g x, y 1 kh u, vf u, v mask 1 LP, 1 1,, g x y k H u v F u v 1, y k k H u, vf u, v g x 1 2 HP HP 59

Example: GHPF, D 0 =40 HFE, k 1 =0.5, k 2 =0.25 Histogram EQ. 60

Homomorphic Filtering: Linear Process is not Possible: Summary of Steps,,, f x y i x y r x y ln f x, y ln i x, y ln r x, y 61

Illumination-Reflection Control Filter cd 2 u, v D, 1 2 H u v 0 H L e L 62

Example: Whole Body PET Scan Enhancement L 0 0.25 H 2 c 1 D 80 63

Selective Filtering: Bandpass Band Reject Notch 64

Bandreject and Bandpass Filter H BP (u, v)= 1- H BR (u, v) 65

Notch Filters: Pass/Reject predefined, both (u 0, v 0 ) and (-u 0, -v 0 ) H NP (u, v)= 1- H NR (u, v) 66

Example (1) Spot in Frequency Domain Spectrum Multiplied Spectrum 67

Example (2) Vertical sin Pattern 68

Example (2) Cont. Extract Vertical sin Pattern 69

Matlab Command fft2, ifft2, fftshift, ifftshift freqz2, fspecial 70