Lecture 12: Image Processing and 2D Transforms

Similar documents
Frequency Domain Enhancement

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

Transforms and Frequency Filtering

8. Lecture. Image restoration: Fourier domain

Digital Image Processing COSC 6380/4393

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

The Fourier Transform

Digital Image Processing COSC 6380/4393

Digital Image Processing

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

IMAGE PROCESSING (RRY025) THE CONTINUOUS 2D FOURIER TRANSFORM

Fourier Transforms and the Frequency Domain

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

2D Discrete Fourier Transform

33. Riemann Summation over Rectangular Regions

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

A slope of a line is the ratio between the change in a vertical distance (rise) to the change in a horizontal

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

Multiple Integrals. Advanced Calculus. Lecture 1 Dr. Lahcen Laayouni. Department of Mathematics and Statistics McGill University.

Laboratory Assignment 4. Fourier Sound Synthesis

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Linear Time-Invariant Systems

Digital Image Processing

Lecture XII: Ideal filters

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

6.02 Fall 2012 Lecture #12

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

Lecture 17 z-transforms 2

Digital Image Processing

(Refer Slide Time: 02:00-04:20) (Refer Slide Time: 04:27 09:06)

DFT: Discrete Fourier Transform & Linear Signal Processing

Reading Instructions Chapters for this lecture. Computer Assisted Image Analysis Lecture 2 Point Processing. Image Processing

Computer Vision, Lecture 3

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Interference in stimuli employed to assess masking by substitution. Bernt Christian Skottun. Ullevaalsalleen 4C Oslo. Norway

Final Exam Solutions June 14, 2006

Experiment 2 Effects of Filtering

Module 3 : Sampling and Reconstruction Problem Set 3

Chapter 5 THE APPLICATION OF THE Z TRANSFORM. 5.6 Transfer Functions for Digital Filters 5.7 Amplitude and Delay Distortion

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

Definitions and claims functions of several variables

Data Acquisition Systems. Signal DAQ System The Answer?

completing Magic Squares

Biosignal filtering and artifact rejection. Biosignal processing I, S Autumn 2017

Midterm Review. Image Processing CSE 166 Lecture 10

Digital Processing of Continuous-Time Signals

Midterm 1. Total. Name of Student on Your Left: Name of Student on Your Right: EE 20N: Structure and Interpretation of Signals and Systems

Final Exam Solutions June 7, 2004

Applying the Filtered Back-Projection Method to Extract Signal at Specific Position

Lecture - 10 Image Enhancement in the Frequency Domain

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

Digital Processing of

6.02 Practice Problems: Modulation & Demodulation

Introduction to Wavelet Transform. Chapter 7 Instructor: Hossein Pourghassem

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

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

Sect 4.5 Inequalities Involving Quadratic Function

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

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 3

Chapter 2 Fourier Integral Representation of an Optical Image

USE OF FT IN IMAGE PROCESSING IMAGE PROCESSING (RRY025)

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Image Filtering. Median Filtering

FX Basics. Filtering STOMPBOX DESIGN WORKSHOP. Esteban Maestre. CCRMA - Stanford University August 2013

Two-Dimensional Wavelets with Complementary Filter Banks

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

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

Introduction to Wavelets. For sensor data processing

CS 591 S1 Midterm Exam Solution

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

F I R Filter (Finite Impulse Response)

Frequency Domain Representation of Signals

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Frequency Response Analysis

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

Graphing Sine and Cosine

Solutions to the problems from Written assignment 2 Math 222 Winter 2015

Orthonormal bases and tilings of the time-frequency plane for music processing Juan M. Vuletich *

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

VECTOR CALCULUS Julian.O 2016

ECE 484 Digital Image Processing Lec 09 - Image Resampling

EE228 Applications of Course Concepts. DePiero

Signals and Systems Using MATLAB

A Simple Recursive Digital Filter

TDI2131 Digital Image Processing

IMAGE PROCESSING Vedat Tavşanoğlu

Brief Introduction to Signals & Systems. Phani Chavali

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

5.3 Trigonometric Graphs. Copyright Cengage Learning. All rights reserved.

Experiment 4- Finite Impulse Response Filters

11/1/2017 Second Hourly Practice 2 Math 21a, Fall Name:

Chapter-2 SAMPLING PROCESS

ECE 201: Introduction to Signal Analysis

Logarithms. Since perhaps it s been a while, calculate a few logarithms just to warm up.

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

EECE 301 Signals & Systems Prof. Mark Fowler

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

What is image enhancement? Point operation

Transcription:

Lecture 12: Image Processing and 2D Transforms Harvey Rhody Chester F. Carlson Center for Imaging Science Rochester Institute of Technology rhody@cis.rit.edu October 18, 2005 Abstract The Fourier transform provides information about the global frequency-domain characteristics of an image. The Fourier description can be computed using discrete techniques, which are natural for digital images. Here we focus on the relationship between the spatial and frequency domains. DIP Lecture 12

2D Fourier Transform Let f(x, y) be a 2D function that may have infinite support. The 2D Fourier transform pair is defined F(u, v) = f(x, y)e i2π(ux+vy) dxdy f(x, y) = F(u, v)e i2π(ux+vy) dudv We are interested in transforms related to images, which are defined on a finite support. If an image has width A and height B with the origin at the center, then F(u, v) = A/2 B/2 A/2 B/2 f(x, y)e i2π(ux+vy) dxdy where f(x, y) represents the image brightness at point (x, y). This expression assumes that f(x, y) is extended with f(x, y) = 0 outside the image frame. DIP Lecture 12 1

Periodic Extension If it is assumed that f(x, y) is extended periodically outside the image frame then we can use a Fourier series. f(x, y) = F (u, v)e i2π(ux/a+vy/b) u= v= Note the following: 1. (u, v) take on integer values. 2. (x, y) take on a continuum of values. 3. f(x, y) is periodic with f(x + na, y + mb) = f(x, y) for any integers (n, m). DIP Lecture 12 2

Fourier Series Coefficient Multiply both sides of the Fourier series expression by e i2π(ax/a+by/b) and integrate over the image frame. A/2 B/2 A/2 B/2 f(x, y)e i2π(ax A +by B ) dxdy = u= v= F (u, v) A/2 A/2 B/2 B/2 e i2π x(u a) A +y(v b) B dxdy = ABF (a, b) DIP Lecture 12 3

Fourier Series Coefficient (cont) Hence, the Fourier series coefficient is F (a, b) = 1 AB A/2 A/2 B/2 B/2 f(x, y)e i2π(ax A +by B ) dxdy = 1 AB F ( a A, b ) B for integer (a, b) DIP Lecture 12 4

Bandwidth Limited Approximation Suppose that F(u, v) 0 outside a region S uv = {u, v W u u W u, W v v W v } Then it can be extended periodically outside S uv and expressed as a Fourier series over the spatial domain. F(u, v) = x= y= i2π( ux f(x, y)e 2Wu + vy 2Wv ) Note that: 1. (x, y) take on integer values. 2. (u, v) take on a continuum of values. 3. F(u, v) is periodic with F(u + 2nW u, v + 2mW v ) = F(u, v) for any integers (n, m) DIP Lecture 12 5

Fourier Series Coefficient We can use an analysis similar to the above to find the value of f(s, t) at integer values of (s, t). We find f(s, t) = ( 1 s f, 4W u W v 2W u t 2W v ( The image plane is sampled on a grid with spacing number of samples that are needed in each dimension are ) 1 1 2W u, 2W v ). The N = 2AW u M = 2BW v DIP Lecture 12 6

We have already seen that Discrete Fourier Transform F (a, b) = 1 AB F ( a A, b ) B All of the information we need is provided by samples of F(u, v) on a grid with spacing ( 1 A, 1 B). The number of points need are N = 2AW u M = 2BW v We need the same number of values to describe the image, whether the values are from the spatial domain or the frequency domain. The samples of F are complex numbers, but the information is the same because of symmetries. DIP Lecture 12 7

Discrete Fourier Transform We can now construct the DFT pair by substituting into F(u, v) = x= y= i2π( ux f(x, y)e 2Wu + vy 2Wv ) ABF (a, b) = F ( a A, b ) B = N 1 x=0 M 1 y=0 1 f( x, 4W u W v 2W u y 2W v )e i2π ax 2AWu + by 2BWv F (a, b) = 1 MN N 1 x=0 M 1 y=0 f( x 2W u, y )e i2π ax N + by M 2W v DIP Lecture 12 8

Discrete Fourier Transform It is conventional to replace f with f without keeping track of the extra 4W u W v factor. We ll follow convention and worry about the scaling when we do numerical computations. We ll also replace (a, b) by (u, v). This produces the transform pair F (u, v) = 1 MN N 1 x=0 M 1 y=0 f(x, y)e i2π ( ux N +vy M ) f(x, y) = N 1 u=0 M 1 v=0 F (u, v)e i2π ( ux N +vy M ) It is often the case that the origin of an array that represents F (u, v) is at a corner. This does no harm because F (u, v) is periodic with period (N, M), but one must pay attention. DIP Lecture 12 9

Example: G&W Figure 4.3 40 20 Rectangle F (u, v) Row and Column Profiles DIP Lecture 12 10

Example: G&W Figure 4.6 Original Spectrum Image with F (0, 0) = 0 Spectrum contours DIP Lecture 12 11

Fourier Image Components An image, represented by f(x, y) is the sum of a set of component images We can write the image as f(x, y; u, v) = F (u, v)e i2π ( ux N +vy M ) f(x, y) = N 1 u=0 M 1 v=0 f(x, y; u, v) It is important to understand the nature of the image components. DIP Lecture 12 12

What is f(x, y; u, v)? 1. F (u, v) is just a complex number. There are MN of them one for each (u, v) combination. 2. F (u, v) = A(u, v)e iθ(u,v) where A(u, v) is the size and θ(u, v) is the angle of the complex number. 3. It is a compact way to write f(x, y; u, v) = F (u, v)e i2π ( ux N +vy [ ( ux = A(u, v) cos 2π N + vy M + ia(u, v) sin M ) [ 2π ) ( ux N + vy M ] + θ(u, v) ) ] + θ(u, v) DIP Lecture 12 13

What is F (u, v)e i2π ( ux N +vy M)? 4. If f(x, y) is real then F (u, v)=f (N u, M v). This means that A(N u, M v) = A(u, v) and θ(n u, M v) = θ(u, v). 5. We can combine the (u, v) and (N u, M v) terms as F (u, v)e i2π ( ux N +vy M ) + F (N u, M v)e i2π = 2A(u, v) cos (N u)x N [ ( ux 2π N + vy M ) +(M v)y M ] + θ(u, v) 6. Similarly, for real f(x, y), the (u, M v) and (N u, v) terms can be combined since F (u, M v) = F (N u, v) F (u, M v)e i2π ux N + (M v)y M = 2A(u, M v) cos + F (N u, v)e i2π (N u)x N [ ( ux 2π N vy ) M +vy M ] + θ(u, M v) DIP Lecture 12 14

The long version f(x, y) = A[0, 0] + + + + M/2 1 v=1 N/2 1 u=1 N/2 1 u=1 N/2 1 u=1 2A(0, v) cos M/2 1 v=1 M/2 1 v=1 2A(u, 0) cos [ 2π vy M + θ(0, v) ] 2A(u, v) cos 2A(u, M v) cos [ 2π ux N + θ(u, 0) ] [ ( ux 2π N + vy ) M [ ( ux 2π N vy ) M ] + θ(u, v) ] + θ(u, M v) Examples of some of the components are shown on the next slide. DIP Lecture 12 15

Some Components u = 1 v = 0 u = 0 v = 1 u = 1 v = 2 u = 2 v = 1 u = 3 v = 5 u = 5 v = 3 DIP Lecture 12 16

Filtering Let H(u, v) be the system function of a linear shift-invariant filter. Let f(x, y) be the input image and g(x, y) be the output image. The LSI filter operates independently on each of the exponential function image components. f(x, y; u, v) = F (u, v)e i2π ( xu N +yv M ) The corresponding component of the output image is The complete output image is g(x, y; u, v) = H(u, v)f(x, y; u, v) = H(u, v)f (u, v)e i2π ( xu N +yv M ) g(x, y) = N 1 u=0 M 1 v=0 g(x, y; u, v) DIP Lecture 12 17

The output image g(x, y) has a DFT Filtering G(u, v) = 1 MN N 1 x=0 M 1 y=0 g(x, y)e i2π ( ux N +vy M ) where g(x, y) = N 1 u=0 M 1 v=0 G(u, v)e i2π ( ux N +vy M ) G(u, v) = H(u, v)f (u, v) The filter operates by changing the magnitude and phase of each (u, v) component by multiplying F (u, v) by H(u, v). DIP Lecture 12 18

Filter Construction An image can be processed by multiplication with a filter function G(u, v) = F (u, v)h(u, v) Butterworth lowpass filter: H(u, v) = 1 + ( 1 u 2 +v 2 D 2 0 ) n Butterworth filter of order n = 2 DIP Lecture 12 19

Constructing a Filter Array Given an image of size N M, we need to construct a filter of the same size. For a Butterworth LP of order p do the following: x=indgen(n)-n/2 ;x-axis (centered) y=indgen(m)-m/2 ;y-axis (centered u=x#replicate(1,m) ;The u-coordinate plane v=y##replicate(1,n) ;The v-coordinate plane D=(u^2+v^2)/D0^2 H=1/(1+D^p) surface,h,u,v DIP Lecture 12 20

Filtering with LPF Original After LPF Spectrum H LP (u, v) DIP Lecture 12 21

HPF Characteristic A highpass filter can be constructed from a lowpass filter by subtraction. H HP (u, v) = H LP (0, 0) H LP (u, v) For the Butterworth filter H HP (u, v) = 1 1 + ( 1 u 2 +v 2 D 2 0 ) n = ( 1 + ) u 2 +v 2 n ( D 2 0 u 2 +v 2 D 2 0 ) n DIP Lecture 12 22

Filtering with HPF Original After HPF Spectrum H HP (u, v) DIP Lecture 12 23

;Construct coordinate arrays of size NxM u=(findgen(n)-n/2)#replicate(1,m) v=(findgen(m)-m/2)##replicate(1,n) ;Construct a lowpass filter D0=30 LPF=(u^2+v^2) LT D0^2 ;Show the filter response function Window,/free,xsize=300,ysize=300 Shade Surf,LPF,u,v Filter Construction DIP Lecture 12 24

A=Read Image( restest.jpg ) Sa=Size(A,/dimensions) N=Sa[0] & M=Sa[1] Window,/free,xsize=N,ysize=M TV,A AF=FFT(A) AFS=Shift(AF,N/2,M/2) AFSH=LPF*AFS A2=Abs(FFT(AFSH,/Inverse)) Window,/free,xsize=N,ysize=M TVSCL,A2 Image Filtering DIP Lecture 12 25