Sie sind auf Seite 1von 43

FREQUENCY DOMAIN

FILTERS

Introduction

Make use of convolution property of fourier


transform.
Image

FFT

Image spectrum
Filter mask in
fourier domain

Pixel by pixel
multiplication
Filtered Image

Fourier
spectrum
Inverse FFT

Computationally faster to perform two 2D Fourier


transforms and a filter multiply than to perform a
convolution in the image (spatial) domain.

Smoothing Frequency Domain


Filters

Ideal Low Pass Filters (ILPF):

Simplest filter
Cuts off all high frequency components that are at a distance
greater than the specified distance D0 from the origin of the
centered spectrum.
The 2-D Ideal Low Pass Filter has a transfer function

1
H (u, v)
0

Where

if D(u, v) D0

if D(u , v) D0

D(u , v) (u M / 2) 2 (v N / 2) 2

Smoothing Frequency Domain


Filters Cont..

D0 is the cut off frequency


One way to the specify cutoff frequency is by
calculating the amount of power enclosed by the
spectrum.
The percentage of power is calculated by taking the
summation over the values of u and v that lie inside a
circle of radius D0

100 p(u , v) / pT

M 1 N 1

Where pT is

pT p(u, v);
u 0 v 0

p (u, v) R 2 (u , v) I 2 (u, v)

ILPF

With
D0 =
8,16,32
=
90.55,
91.27,
91.59

Example

Ringing in ILPF

Smoothing Frequency Domain


Filters Cont..

Butterworth Low Pass filters (BPLF):

The transfer function of Butterworth low pass filter is given by


1
H (u , v)
1 D (u , v) / D0 2 n

Smooth transition between low and high frequencies, so no


ringing effect.

BLPF

With
D0 =
8,16,32

Smoothing Frequency Domain


Filters Cont..

Gaussian Low Pass filters (GPLF):


The transfer function of Gaussian low pass filter is
given by
2
H (u , v) exp D 2 (u , v) / 2 D0

Smooth transition between low and high frequencies,


so no ringing effect.

GLPF

With
D0 =
8,16,32

Comparison b/w ILPF, BLPF and GLPF

Applications of low pass filtering

Applications of low pass filtering

Applications of low pass filtering

Sharpening Frequency Domain


Filters

Ideal High Pass Filters


(IHPF):

The transfer function for a


2-D ideal high pass filter is
defined as

Butterworth High Pass


Filters (BHPF):

The transfer function is


given by

0
H (u, v)
1

if D(u, v) D0
if D(u, v) D0

1
H (u , v)
1 D0 / D (u, v) 2 n

Sharpening Frequency Domain


Filters Cont..

Gaussian High Pass Filters (GHPF):


The transfer function of a Gaussian HPF is given
by
2
2
H (u , v) 1 exp D (u , v) / 2 D0

IHPF

IHPF
D0 =
8,16,32

BHPF

BHPF
D0 =
8,16,32

GHPF

GHPF
D0 =
8,16,32

Comparison b/w IHPF, BHPF and GHPF

The Laplacian in Frequency


domain

From the differentiation property of Fourier transform


d n f ( x)
n
F

(
ju
)
F (u )

n
dx

The Laplacian operator in Fourier domain can then be


found as
2 f 2 f
F f F
2
2
y
x

2
2

(
ju
)
F
(
u
,
v
)

(
jv
)
F (u, v)

(u 2 v 2 ) F (u , v)

The Laplacian in Frequency


domain Cont..

So we can implement the Laplacian using the filter,

H(u,v) = -(u2+v2)

Homomorphic Filtering

The homomorphic filter is an approach based on an


illumination-reflectance image model, where the image
f(x,y) is taken as the product of illumination and
reflectance components.
f(x,y) = i(x,y) r(x,y)
To compute the Fourier representation we take
z(x,y) = ln f(x,y)

=ln i(x,y) + ln r(x,y)


F [z(x,y)] = F [ln f(x,y)] = F [ln i(x,y)] +F[ ln r(x,y)]
Z(u,v) = F (u,v) + F (u,v)
i
r

Homomorphic Filtering Cont..

Now if we process Z(u,v) by means of a filter function


H(u,v), then

S(u,v) = H(u,v) Z(u,v)


= H(u,v) Fi(u,v) + H(u,v) Fr(u,v)

Taking the inverse transform, to get the processed


image,

s(x,y) = F-1[S(u,v)]
= F-1[H(u,v) Fi(u,v) ]+F-1[H(u,v) Fr(u,v)]
= i'(x,y) + r'(x,y)

Homomorphic Filtering Cont..

The enhanced image g(x,y) is obtained by taking


the exponential,

g(x,y) = e s(x,y) = e i'(x,y) + r'(x,y)


= e i'(x,y) e r'(x,y)

Homomorphic Filtering Cont..

A filter function used for simultaneous dynamic range


compression and contrast enhancement is given

Homomorphic Filtering Cont..

The filter function is given by

H (u, v) H L [1 e

c ( D 2 ( u ,v ) / D0 2 )

] L

Example

Spatial masks and corresponding


frequency domain filters
1 1 1
s 1 / 9 1 1 1
1 1 1

Spatial masks and corresponding


frequency domain filters
1 / 8 1 / 8 1 / 8
s 1 / 8 1 1 / 8
1 / 8 1 / 8 1 / 8

Spatial masks and corresponding


frequency domain filters

Spatial masks and corresponding


frequency domain filters
0 1 0
s 1 4 1
0 1 0

Spatial masks and corresponding


frequency domain filters
1 2 1
s 2 12 2
1 2 1

Das könnte Ihnen auch gefallen