0% found this document useful (0 votes)
24 views27 pages

2c. Filtering in Frequency Domain

The document discusses image enhancement techniques in the frequency domain, focusing on filtering methods using Fourier transforms. It explains the steps for frequency domain filtering, the types of filters (lowpass, highpass, and Gaussian), and their properties. Additionally, it highlights the relationship between spatial and frequency domain filtering through the convolution theorem and provides practical applications for lowpass filtering.

Uploaded by

atik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views27 pages

2c. Filtering in Frequency Domain

The document discusses image enhancement techniques in the frequency domain, focusing on filtering methods using Fourier transforms. It explains the steps for frequency domain filtering, the types of filters (lowpass, highpass, and Gaussian), and their properties. Additionally, it highlights the relationship between spatial and frequency domain filtering through the convolution theorem and provides practical applications for lowpass filtering.

Uploaded by

atik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 27

Ch4.

Image enhancement in Frequency


domain

Filtering in Frequency Domain

-1-
Ch4. Image enhancement in Frequency

4.2.3 Filtering in the Frequency


domain

Domain
 Some basic properties of the
frequency domain
– Spatial characteristics of an image
is related to frequency
components of the Fourier
transform
 Fig. 4.4
– Prominent components in the
Fourier spectrum along the 45
directions correspond to the edges
in the image
– The off-axis angle of the frequency
component corresponds to the
inclination off horizontal of the
long white element

-2-
Ch4. Image enhancement in Frequency
domain

 Basics of filtering in the frequency domain


- filtering steps in the frequency domain
1. multiply the input image by (-1)x+y to center the
transform
2. compute F(u,v)
3. multiply F(u,v) by H(u,v)
4. compute the inverse DFT
5. obtain the real part of the result in (4)
6. multiply the result in (5) by (-1)x+y

- H(u,v) is called a filter

-3-
Ch4. Image enhancement in Frequency
domain

- Fourier transform of the output image


G (u , v )  H (u , v ) F (u , v )

- Filtered Image

 1  G (u , v ) 

- Final image :
multiplying the real part of the filtered image by (-
1)x+y

- Fig 4.5 : next slide

-4-
Ch4. Image enhancement in Frequency
domain

-5-
Ch4. Image enhancement in Frequency

Some basic filters and their domain

properties
 Notch filter:

0.......if (u , v) ( M / 2, N / 2)
H (u , v ) 
1.......otherwise

-6-
Ch4. Image enhancement in Frequency

Some basic filters and their domain

properties
 Lowpass filter -> Fig 4.7 (a), (b)
- attenuates high frequencies while passing low
frequencies
- filtered image has less sharp detail
 Highpass filter -> Fig 4.7 (c), (d)
- opposite characteristic
- filtered image has less gray level variations in smooth
areas,
- emphasizes transitional (e.g., edge) gray level detail

-7-
Ch4. Image enhancement in Frequency

Some basic filters and their


domain

properties

-8-
Ch4. Image enhancement in Frequency
domain

-9-
Ch4. Image enhancement in Frequency
domain
4.2.4 Correspondence between Filtering in
the Spatial and Frequency Domains
 Relationship between S.D and F.D -> convolution
theorem
 Discrete convolution of f(x,y) and h(x,y), size M x N
M 1 N1
1
f ( x, y )* h( x, y ) 
MN
  f ( m, n ) h ( x  m, y  n )
m 0 n 0

 From the convolution theorem


f ( x , y ) * h ( x , y )  F ( u , v ) H (u , v )

f ( x , y ) h ( x , y )  F (u , v ) * H (u , v )

-10-
Ch4. Image enhancement in Frequency
domain

 Impulse function of strength A at (x0,y0)


M 1 N1

  s( x, y ) A ( x  x , y 
x 0 y 0
0 y0 ) As ( x0 , y0 )

 Unit impulse at the origin


M 1 N1

  s( x, y ) ( x, y ) s(0, 0)
x 0 y 0

 Fourier transform of unit impulse at the origin


1 M 1 N1 1
F (u , v )  
MN x 0 y 0
 ( x , y ) e  2 j ( ux / M  vy / N )

MN
 When f ( x, y )  ( x, y )
M 1 N1
1 1
f ( x, y ) * h ( x, y ) 
MN
   ( m, n ) h ( x  m, y  n ) 
m 0 n 0 MN
h ( x, y )

-11-
Ch4. Image enhancement in Frequency
domain

 Gaussian filter functions are important.


- Their shapes are easily specified.
- Forward and inverse F.T of Gaussian functions are real
Gaussian function.
 Gaussian filter func. in F.D -> H(u)
 u 2 / 2 2
H (u )  Ae
- : standard deviation of the Gaussian curve

 Gaussian filter func. in S.D -> h(x)

 2 2 2 x 2
h( x )  2  Ae

-12-
Ch4. Image enhancement in Frequency
domain

 Fig 4.9 (a),(c) -> Gaussian lowpass filter


- all the values are positive in both domain.
- lowpass filtering in S.D can be implemented by using a
mask with all positive coefficients.

 Fig 4.9(b),(d) -> Gaussian highpass filter

 u 2 / 2 12  u 2 / 2 22
H (u )  Ae  Be
 2 2 12 x 2  2 2 22 x 2
h( x)  2  1 Ae  2  2 Be

- spatial filter has both negative and positive.

-13-
Ch4. Image enhancement in Frequency
domain

-14-
Ch4. Image enhancement in Frequency

4.3 Smoothing Frequency-Domain domain

Filters
 Edges and noise contribute to high-frequency content
of its Fourier transform
– Smoothing (blurring) is achieved by attenuating the high-
frequency components in the transform

G (u , v) H (u , v) F (u , v)

 Three types of lowpass filters


1. Ideal filter
2. Butterworth filter
3. Gaussian filter

-15-
Ch4. Image enhancement in Frequency
domain

4.3.1 Ideal Lowpass Filters


 2-D ideal lowpass filter(ILPF) transfer function

1.......if ...D(u, v) D0


H (u , v ) 
0.......if ...D(u, v)  D0
- D0 : a specified nonnegative quantity
- D(u,v) : the distance from (u,v) to the origin

 If image size is M x N, and center of the frequency


rectangle is at (u,v) = (M/2, N/2), then the distance from
(u,v) to the center :
2 1/ 2
D (u , v )  (u  M / 2)  (v  N / 2) 
 2

 Fig 4.10
- cut off frequency -> D0
-16-
Ch4. Image enhancement in Frequency
domain

-17-
Ch4. Image enhancement in Frequency
domain

 Fig 4.11
– fourier transform : radius 5, 15, 30, 80, 230

 Fig 4.12 (next slide) -> results of ideal lowpass filtering


in fig 4.11

- as the filter radius increases, less severe blurring.

- ringing behavior is a characteristic of ideal filters.


 Fig 4.13

-18-
Ch4. Image enhancement in Frequency
domain

“ringing”
Fig. 4.13

-19-
Ch4. Image enhancement in Frequency
domain

-20-
Ch4. Image enhancement in Frequency
domain

4.3.2 Butterworth Lowpass Filters


 Transfer function of nth order BLPF with D0 cutoff
frequency -> Fig 4.14
1
H (u , v) 
1   D (u , v) / D0 
2n

-21-
Ch4. Image enhancement in Frequency
domain

4.3.2 Butterworth Lowpass Filters


 Fig 4.15
- unlike ILPF,
smooth transition in
blurring as a
function of
increasing cutoff
frequency.
- no ringing is
visible.

-22-
Ch4. Image enhancement in Frequency
domain

-23-
Ch4. Image enhancement in Frequency
domain

4.3.3 Gaussian Lowpass Filters


 2D GLPF -> Fig 4.17

 D 2 ( u ,v ) / 2 2
H (u , v) e

-24-
Ch4. Image enhancement in Frequency
domain

4.3.3 Gaussian Lowpass Filters


 Fig 4.18
- smooth transition in blurring
as cutoff frequency increases
- no ringing

-25-
Ch4. Image enhancement in Frequency
4.3.4 Additional Examples of domain

Lowpass
Filtering
 Practical applications of lowpass filtering
– Machine perception, character recognition
– Printing and publishing industry
– Satellite and aerial image processing
 Fig 4.19
– Broken character segments were joined

-26-
Ch4. Image enhancement in Frequency
domain

-27-

You might also like