Top Banner
CSC447: Digital Image Processing Chapter 4: Prof. Dr. Mostafa Gadal-Haqq M. Mostafa Computer Science Department Faculty of Computer & Information Sciences AIN SHAMS UNIVERSITY
44

Digital Image Processing: Image Enhancement in the Frequency Domain

Feb 19, 2017

Download

Education

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Digital Image Processing: Image Enhancement in the Frequency Domain

CSC447: Digital Image

Processing

Chapter 4:

Prof. Dr. Mostafa Gadal-Haqq M. Mostafa

Computer Science Department

Faculty of Computer & Information Sciences

AIN SHAMS UNIVERSITY

Page 2: Digital Image Processing: Image Enhancement in the Frequency Domain

Foundation

Fourier Theorem:

Any function that

periodically repeat itself

can be represented by the

some of sines and/or

cosines of different

frequencies, each

multiplied by a different

coefficient.

)cossin()(0

xbxaxf ii

n

i

ii

2 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 3: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

1-D Fourier Transform:

The Fourier transform, F(u), of a discrete 1-

D function, f(x); x = 0, 1, 2, …, M-1, is:

Where u= 0, 1, 2, …, M-1

1-D Inverse Fourier Transform:

1

0

/2)(1

)(M

x

MuxjexfM

uF

1

0

/2)()(M

u

MuxjeuFxf

3 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 4: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

F(u) is called the frequency component of the Fourier

Transform, and its domain (the values of u) is called the

frequency domain, because u determines the frequency

of the components of the transform:

Since F(u) is complex quantity It is convenient to

express it in polar form

|F(u)| is called the magnitude, and (u) is the phase

The Power Spectrum P(u) = |F(u)|2

)](/)([ tan (u) and ,)]()([|)(| where,

|)(|)(

1-2/122

)(

uRuIuIuRuF

euFuF uj

4 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 5: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

1-D Fourier Transform:

5 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 6: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

2-D Fourier Transform:

The Fourier transform, F(u,v), of a discrete

2-D function (MxN), f(x,y) is:

Where u= 0,1,2, …,M-1, and v = 0,1,2, …, N-1

2-D Inverse Fourier Transform:

1

0

1

0

)//(2),(1

),(M

x

N

y

NvyMuxjeyxfMN

vuF

1

0

1

0

)//(2),(),(M

u

N

v

NvyMuxjevuFyxf

6 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 7: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

the Fourier spectrum , phase angle, andpower

spectrum , are defined as before:

),(),(|),(|

and )],,(/),([ tan v)(u,

,)],(),([|),(| where,

|),(|),(

222

1-

2/122

),(

vuIvuRvuF P(u,v)

vuRvuI

vuIvuRvuF

evuFvuF vuj

7 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 8: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

2-D Fourier Transform:

8 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 9: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

2-D Fourier Transform:

9 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 10: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

2-D Fourier Transform:

10 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 11: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

2-D Fourier Transform:

11 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 12: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

Properties of the Fourier Transform:

12 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 13: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

Properties of the Fourier Transform:

13 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 14: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

Properties of the Fourier Transform:

14 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 15: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

Properties of the Fourier Transform:

15 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 16: Digital Image Processing: Image Enhancement in the Frequency Domain

The Discrete Fourier Transform (DFT)

Properties of the Fourier Transform:

16 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 17: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Basic Operations

17 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 18: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

2-D Fourier Transform

18 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 19: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

2-D Fourier Transform:

19 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 20: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Notch filter

20 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 21: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Ideal Low-pass Filter (ILPF)

cutoff

frequency

21 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 22: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

How to find the cutoff frequency for a ILPF?

Find the circle that enclose a certain amount of the

power spectrum of the image:

Where P(u,v) is the Power spectrum at frequencies

(u,v) the. Then , a circle of radius r enclose a

percentage of the power, where

22 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 23: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Distribution of the power spectrum:

23 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 24: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Filtering with power cutoff

24 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 25: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Butterworth Low-pass Filter

25 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 26: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Butterworth Low-pass Filter

26 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 27: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian Low-pass Filter

Where D(u,v) id the distance from the origin

27 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 28: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian Low-pass Filter

28 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 29: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian Low-pass and High-pass filters:

29 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 30: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian Low-pass filters:

30 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 31: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian Low-pass filters:

31 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 32: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Ideal High-pass filters:

32 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 33: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Ideal High-pass filters:

33 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 34: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Ideal High-pass filters:

34 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 35: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian High-pass filters:

35 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 36: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

High-pass filters:

36 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 37: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

High-pass filters:

37 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 38: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Ideal Band-Pass Filter

38 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 39: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

The Laplacian filters:

39 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 40: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Gaussian High-pass filters:

40 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 41: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Homomorphic filters:

41 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 42: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Homomorphic filters:

42 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 43: Digital Image Processing: Image Enhancement in the Frequency Domain

Filtering in the Frequency Domain

Homomorphic filters:

43 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

Page 44: Digital Image Processing: Image Enhancement in the Frequency Domain

HW3

4.9 and 4.12

44 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.