Home >
Documents >
Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering...

Share this document with a friend

28

Transcript

EC-433 Digital Image Processing

Lecture 13

Filtering in the Frequency Domain

Dr. Arslan Shaukat

Acknowledgement: Lecture slides material from

Dr. Rehan Hafiz, Gonzalez and Woods

Highpass Filtering

),(1),( vuHvuH LPHP

Highpass Filters

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Highpass Filters - Spatial Domain

26/05/2011 EME (NUST) EC-433 Digital Image Processing

IHPF

BHPF

GHPF

Do = 30, 60, 160

26/05/2011 EME (NUST) EC-433 Digital Image Processing

HPF and Thresholding

Application: Finger Print Enhancement

HP Filtered image lost the gray-level Zero DC Term

Dark tones pre-dominate in HP Filtered Images (-ve & +ve values)

Binary Thresholding

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Scaling considerations for:

– Can have different scaling

– Need to normalize

Solution:

– Pre-Scale f(x,y)

– Re-Scale Laplacian Image after DFT application

The Laplacian in the Frequency Domain

),(4),( 22 vuDvuH

26/05/2011 EME (NUST) EC-433 Digital Image Processing

)],(),([),( 12 vFvHyxf

)],([),(),( 2 yxfcyxfyxg

The Laplacian in the Frequency Domain

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Implementation

gmask(x,y) = f(x,y) - fLP(x,y)

g(x,y) = f(x,y)+ k*gmask(x,y)

Unsharp Masking k =1

Highboost Filtering k>1

Unsharp Masking and Highboost Filtering

),()],(1[*1),( 1 vuFvuHkyxg LP

),(),(*1),( 1 vuFvuHkyxg HP

26/05/2011 EME (NUST) EC-433 Digital Image Processing

)],(),([),( 1 vFvHyxf LPLP

DC Term is not forced to ZERO !!

High-Frequency Emphasis Filtering

High-pass filtering emphasizes edges but fine details in

the image (i.e., low frequencies) are lost.

Add a constant to H(u,v) to preserve low frequencies.

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Combining Spatial and Frequency Domain Techniques

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Homomorphic Filtering

Homomorphic Filtering

Consider the following model of image formation:

The illumination component is characterized by slow

spatial variations

The reflectance component tends to vary abruptly,

particularly at the junctions of dissimilar objects

Associate the low frequencies of the Fourier transform of

the logarithm of an image with illumination and the high

frequencies with reflectance

So probable solution is to specify H(u,v):

– Enhance high frequencies

– Attenuate low frequencies but preserve fine detail26/05/2011 EME (NUST) EC-433 Digital Image Processing

Separating Low from High Frequencies

Here, low and high frequencies from i(x,y) and r(x,y)

have been mixed together

Difficult to operate on low/high frequencies separately

Solution?

– Attempt to separate signals combined in a nonlinear way by

making the problem become linear (Homomorphic techniques)

26/05/2011 EME (NUST) EC-433 Digital Image Processing

)],([)],([)],([ yxryxiyxf

Homomorphic Filtering

Take the log( )Idea

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Homomorphic Filtering - STEPS

(1) Take Log

(2) Apply FT:

or

(3) Apply H(u,v)

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Homomorphic Filtering (cont’d)

(4) Take Inverse FT:

or

(5) Take exp( )

or

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Homomorphic Filtering (cont’d)

How to choose H(u,v)?

– If l<1 and H>1, the filter tends to decrease the contribution

made by the low frequencies (illumination) and amplify the

contribution made by high frequencies (reflectance)

]/),([ 22

1),( DovuDc

LH evuH

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Application: PET Scan

Blurry Image

Low intensity features obscured by high intensity

of “hot spots”

High Detail

Reduction of effects of dominant illumination allows dynamic

range of lower intensity to be displayed properly

Reflectance components are sharpened26/05/2011 EME (NUST) EC-433 Digital Image Processing

Selective Filtering

Bandreject and Bandpass Filters

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Rejects/Passes a predefined neighborhood of frequencies

Zero phase shift filters must be symmetric about origin.

H(u,v)=H(-u,-v)

Can be defined as product of high pass filters centered at

notch location

Let Q be the no. of notches

Notch Filter

26/05/2011 EME (NUST) EC-433 Digital Image Processing

),(),(),(1

vuHvuHvuH kk

Q

kNR

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Notch Filters - Applications

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Separability of the 2-D DFT

2-D DFT: Separability

The 2-D DFT can be computed using 1-D transforms

– Forward DFT:

– Inverse DFT:

26/05/2011 EME (NUST) EC-433 Digital Image Processing

DFT Properties: Separability (cont’d)

Rewrite F(u,v) as follows:

Let’s set:

Then:

26/05/2011 EME (NUST) EC-433 Digital Image Processing

DFT Properties: (cont’d)

26/05/2011 EME (NUST) EC-433 Digital Image Processing

Recommended