You are on page 1of 77

Digital Image Processing, 2nd ed.

www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
1
Frequency
Domain
Processing
Chapter 4
www.ImageProcessingPlace.com
www.csie.ntnu.edu.tw/~violet/IP93/Chapter04.ppt
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
2
Complex Numbers

http://en.wikipedia.org/wiki/Complex_number

Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
3
Polar Coordinates

http://en.wikipedia.org/wiki/Polar_coordinates
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
4
Periodic Function
period p
x x+p
x
A function f is periodic with period p greater than zero if
f(x + p) = f(x)
for all values of x in the domain of f.

If a function f is periodic with period p, then for all x in the domain of
f and all integers n,
f(x + np) = f(x)
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
5
If a function f is periodic with period p > 0
then the fundamental frequency of f is 1/p
p has units of length
1/p has units of cycles/length
Periodic Function
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
6
p is large (large period) 1/p is small (low frequency)






p is small (small period) 1/p is large (high frequency)
p
p
Periodic Function
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
7
Fourier Series & Fourier Transform
Any function that periodically repeats itself can
be expressed as the sum of sines and/or cosines of
different frequencies, each multiplied by a
different coefficient (Fourier series).
Even functions that are not periodic (but whose
area under the curve is finite) can be expressed as
the integral of sines and/or cosines multiplied by
a weighting function (Fourier transform).
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
8
Fourier Transform & Glass Prism
The prism is a physical device that separates light
into various color components, each depending
on its wavelength (or frequency) content.
The Fourier transform may be viewed as a
mathematical prism that separates
(characterizes) a function into various
components, also based on frequency content.
This is a powerful concept that lies at the heart of
linear filtering.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
9
Frequency Domain
The frequency domain
refers to the plane of the
two dimensional discrete
Fourier transform of an
image.
The purpose of the
Fourier transform is to
represent a signal as a
linear combination of
sinusoidal signals of
various frequencies.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
10
Fourier Transformation
And Its Inverse
The one-dimensional Fourier transform and its inverse
Fourier transform (continuous case)

Inverse Fourier transform:

The two-dimensional Fourier transform and its inverse
Fourier transform (continuous case)

Inverse Fourier transform:

}


= du e u F x f
ux j t 2
) ( ) (
} }


+
= dy dx e y x f v u F
vy ux j ) ( 2
) , ( ) , (
t
1 where ) ( ) (
2
= =
}



j dx e x f u F
ux j t
} }


+
= dv du e v u F y x f
vy ux j ) ( 2
) , ( ) , (
t
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
11
The one-dimensional Fourier transform and its inverse
Fourier transform (discrete case)



Inverse Fourier transform:

1 ,..., 2 , 1 , 0 for ) (
1
) (
1
0
/ 2
= =

M u e x f
M
u F
M
x
M ux j t
1 ,..., 2 , 1 , 0 for ) ( ) (
1
0
/ 2
= =

=
M x e u F x f
M
u
M ux j t
Discrete Fourier Transformation
One Dimensional
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
12
Since (Eulers formula)
then discrete Fourier transform can be redefined



Frequency (time) domain: the domain (values of u) over
which the values of F(u) range; because u determines the
frequency of the components of the transform.
Frequency (time) component: each of the M terms of F(u).

1 ,..., 2 , 1 , 0 for = M u

=
=
1
0
] / 2 sin / 2 )[cos (
1
) (
M
x
M ux j M ux x f
M
u F t t
u u
u
sin cos j e
j
+ =
Discrete Fourier Transformation
One Dimensional
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
13
F(u) can be expressed in polar coordinates:




R(u): the real part of F(u)
I(u): the imaginary part of F(u)
Power spectrum:
) ( ) ( ) ( ) (
2 2
2
u I u R u F u P + = =
spectrum) phase or angle (phase
) (
) (
tan ) (
spectrum) or (magnitude ) ( ) ( ) ( where
) ( ) (
1
2 2
) (
(

=
+ =
=

u R
u I
u
u I u R u F
e u F u F
u j
|
|
Discrete Fourier Transformation (DFT)
One Dimensional
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
14
f (0) = 2

f (1) = 3

f (2) = 4

f (3) = 4
The One-Dimensional DFT
Examples
1 ,..., 2 , 1 , 0 for = M u
( ) ( )

=
=
1
0
] / 2 sin / 2 )[cos (
1
) (
M
x
M ux j M ux x f
M
u F t t
) ( ) ( ) (
2 2
u I u R u F + =
F(0) = 3.25

F(1) = -0.5 + j 0.25

F(2) = 0.25

F(3) = -0.5 - j 0.25
| F(0) | = 3.25

| F(1) | = 0.75

| F(2) | = 0.25

| F(3) | = 0.75
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
15
The One-Dimensional DFT
Examples
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
16
The One-Dimensional DFT
Examples
M = 1024 points, A = 1, K = 8 points
Spectrum is centered at u = 0 (discussed in the following slides)
1 ,..., 2 , 1 , 0 for = M u
( ) ( )

=
=
1
0
] / 2 sin / 2 )[cos (
1
) (
M
x
M ux j M ux x f
M
u F t t
) ( ) ( ) (
2 2
u I u R u F + =
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
17
The One-Dimensional DFT
Examples
Important Features:
The height of the spectrum doubled as the area
under the curve in the x-domain doubled.
The number of zeros in the spectrum in the same
interval doubled as the length of the function
doubled.
This reciprocal nature of the Fourier transform
pair is most useful in interpreting results of image
processing in the frequency domain.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
18
The One-Dimensional Fourier Transform
Some Examples
The transform of a constant function is a DC value only.




The transform of a delta function is a constant.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
19
The One-Dimensional Fourier Transform
Some Examples
The transform of an infinite train of delta functions spaced by
T is an infinite train of delta functions spaced by 1/T.




The transform of a cosine function is a positive delta at the
appropriate positive and negative frequency.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
20
The One-Dimensional Fourier Transform
Some Examples
The transform of a sin function is a negative complex delta
function at the appropriate positive frequency and a negative
complex delta at the appropriate negative frequency.




The transform of a square pulse is a sinc function.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
21
The Two Dimensional DFT
The two-dimensional Fourier transform and its inverse
Fourier transform (discrete case) DFT



Inverse Fourier transform:




u, v : the transform or frequency variables
x, y : the spatial or image variables
1 ,..., 2 , 1 , 0 , 1 ,..., 2 , 1 , 0 for
) , (
1
) , (
1
0
1
0
) / / ( 2
= =
=

=
+
N v M u
e y x f
MN
v u F
M
x
N
y
N vy M ux j t
1 ,..., 2 , 1 , 0 , 1 ,..., 2 , 1 , 0 for
) , ( ) , (
1
0
1
0
) / / ( 2
= =
=

=
+
N y M x
e v u F y x f
M
u
N
v
N vy M ux j t
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
22
The Two Dimensional DFT
Properties
| | (shift) )
2
,
2
( ) 1 )( , ( ) 1 (
N
v
M
u F y x f
y x
=
+
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
23
We define the Fourier spectrum, phase angle, and power
spectrum as follows:





R(u,v): the real part of F(u,v)
I(u,v): the imaginary part of F(u,v)
| |
spectrum) (power ) , ( ) , ( ) , ( ) (
angle) (phase
) , (
) , (
tan ) , (
spectrum) ( ) , ( ) , ( ) , (
2 2
2
1
2
1
2 2
v u I v u R v u F u,v P
v u R
v u I
v u
v u I v u R v u F
+ = =
(

=
+ =

|
The Two Dimensional DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
24
Magnitude and Phase
Of sinusoidal wave
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
25
Complex Numbers
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
26
A Memory Aid for Evaluating j
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
27
DFT Translation Property
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
28
DFT Rotation Property
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
29
DFT Periodicity
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
30
spectrum) the of component or DC (average
) , (
1
) 0 , 0 (
1
0
1
0

=
=
M
x
N
y
y x f
MN
F
The Two Dimensional DFT
Properties
F(u, v) = F(u+M, v) = F(u, v+N) = F(u+M, v+N)
(infinitely periodic in both u & v directions)

Same is for inverse DFT:
f(x, y) = f(x+M, y) = f(x, y+N) = f(x+M, y+N)
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
31
(a) f(x, y) (b) F(u, y) (c) F(u, v)
The 2D DFT F(u, v) can be obtained by:
1. taking the 1D DFT of every row of image f(x, y), F(u, y),
2. taking the 1D DFT of every column of F(u, y)
The Two Dimensional DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
32
shift
The Two Dimensional DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
33
The Two Dimensional DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
34
The Two Dimensional DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
35
Computing & Visualizing
2-D DFT
>> f = imread('rectangle.tif');
>> F = fft2(f);
>> Fc = fftshift(F);
>> imshow(abs(Fc), [])
>> S2 = log(1+abs(Fc));
>> imshow(S2, [])

Note:
[(-1)
x+y
f(x, y)]
= fftshift(fft2(f))
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
36
The Property of Two-Dimensional DFT
Rotation
DFT
DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
37
The Property of Two-Dimensional DFT
Linear Combination
DFT
DFT
DFT
A
B
0.25 * A
+ 0.75 * B
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
38
The Property of Two-Dimensional DFT
Expansion
DFT
DFT
A
Expanding the original image by a factor of n (n=2), filling
the empty new values with zeros, results in the same DFT.
B
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
39
Two-Dimensional DFT with Different Functions
Sine wave
Its DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
40
Two-Dimensional DFT with Different Functions
2D Gaussian
function
Impulses
Its DFT
Its DFT
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
41
Filtering in the Frequency Domain
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
42
1. Since frequency is directly related
to rate of change it can be
associated with frequencies in the
Fourier transform.
2. Slowest varying frequency
component (u = v = 0)
corresponds to the average gray
level of an image.
3. As we move further away from
the origin, the higher frequencies
begin to correspond to faster and
faster gray level changes in an
image, which are the edges of
objects or noise etc.
Filtering in the Frequency Domain
Some Basic Properties
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
43
Filtering in the Frequency Domain
Basics of Filtering in the Frequency Domain
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
44
1) Multiply the input image by (-1)
x+y
to center the
transform.
2) Compute F(u,v), the DFT of the image from (1).
3) Multiply F(u,v) by a filter function H(u,v).
4) Compute the inverse DFT of the result in (3).
5) Obtain the real part of the result in (4).
6) Multiply the result in (5) by (-1)
x+y
.
Filtering in the Frequency Domain
Basics of Filtering in the Frequency Domain
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
45
1. Obtain the padding parameters:
PQ = paddedsize(size(f));
2. Obtain the Fourier transform with padding:
F = fft2(f, PQ(1), PQ(2));
3. Generate a filter function, H, of size PQ using any of the methods
discussed in the later slides. Apply: H = fftshift(H) if necessary.
4. Multiply the transform by the filter:
G = H.*F;
5. Obtain the real part of the inverse FFT of G:
g = real(ifft2(G));
6. Crop the top, left rectangle to the original size:
g = g(1:size(f, 1), 1:size(f, 2));
Filtering in the Frequency Domain
Implementation Through MATLAB
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
46
Filtering in the spatial domain is described by the following
equation:
g(x, y) = h(x, y)*f(x, y)

where f(x,y) is the original image, h(x,y) is the filter and * denotes the
convolution operation.

Filtering in the frequency domain is described by the following
equation:
G(u, v) = H(u, v)F(u, v)
where
F(u, v) is the Fourier transform of an image
H(u, v) is the frequency domain filter
G(u, v) is the Fourier transform of the filtered image
Filtering in the Spatial and Frequency Domain
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
47
Correspondence between Filtering in
the Spatial and Frequency Domain
Convolution Theorem:
The foundation for linear filtering in both the spatial and
frequency domains is the convolution theorem, which may
be written as:


where
F(u,v) and H(u,v) denote the Fourier transforms of f(x,y) and h(x,y).
* Indicates the convolution of the two functions.
The discrete convolution of two functions f(x,y) and h(x,y) of size M N
is defined as:

=
= -
1
0
1
0
) , ( ) , (
1
) , ( ) , (
M
m
N
n
n y m x h n m f
MN
y x h y x f
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
48
Correspondence between Filtering in
the Spatial and Frequency Domain
The third equivalence relation says that given a filter in the
frequency domain, we can obtain the corresponding filter in the
spatial domain by taking the inverse Fourier transform of the
former. The reverse is also true.
The convolution theorem links filters in both domains (spatial and
frequency). Filtering is often more intuitive in the frequency
domain, since one can easily foresee the results, given a filter.
However, filters in the spatial domain have smaller masks than
those in the frequency domain. That is, one can first specify a
filter in the frequency domain, take its inverse Fourier transform,
and then use the resulting filter in the spatial domain as a guide for
constructing smaller spatial filter masks!
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
49
Spatial domain Frequency domain
Average filter Gaussian lowpass filter
Laplacian Gaussian highpass filter
The convolution theorem establishes a correspondence
between filtering in the spatial and frequency domains as
shown in the following table.
Correspondence between Filtering in
the Spatial and Frequency Domain
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
50
Let f(x, y) and h(x, y) are of size A B and C D, resp., then wraparound
error can be avoided by choosing:
P A + C -1
Q B + D -1
Filtering in the Frequency Domain
Padding
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
51
Filtering in the Frequency Domain
Padding
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
52
Filtering in the Frequency Domain
Padding Function
Exercises:
(1) [1, 4.3.1]
Write an M-function:
function PQ = paddedsize(AB, CD, PARAM)
and use it on figure squareBW.tif to visualize the
difference between images with padding and without
padding.
(2) [1, 4.3.3]
Write an M-function for filtering in the frequency
domain.
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
53
Notch Filter: Force the average value of an image to zero.
Multiply all values of F(u,v) by the filter function:


All this filter would do is set F(0,0) to zero and leave all
frequency components of the Fourier transform untouched.

=
=
otherwise. 1
) 2 / , 2 / ( ) , ( if 0
) , (
N M v u
v u H
Filtering in the Frequency Domain
Some Basic Filters & Their Properties
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
54
Filtering in the Frequency Domain
Some Basic Filters & Their Properties
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
55
Filtering in the Frequency Domain
Some Basic Filters & Their Properties
Lowpass filter is a filter that attenuates high frequencies
while passing' low frequencies. Low frequencies
correspond to the slowly varying components of an image
(e.g., uniform background).

Highpass filter is a filter that attenuates low frequencies
while passing high frequencies. High frequencies
correspond to the sharply varying components of an image
(e.g., edges).
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
56
Filtering in the Frequency Domain
Some Basic Filters & Their Properties
Lowpass Filter
Highpass Filter
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
57
Filtering in the Frequency Domain
Some Basic Filters & Their Properties
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
58
A 2-D ideal low-pass filter is one whose transfer
function satisfies the relation:

1 if D(u, v) <= Do
H(u, v) =
0 if D(u, v) > Do

where Do is a non-negative quantity and D(u,v) is the distance from
the point (u,v) to the origin of the frequency plane:
Filtering in the Spatial and Frequency Domain
Ideal Filters
2 2
2 2
) , (
|
.
|

\
|
+
|
.
|

\
|
=
N
v
M
u v u D
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
59
H(u, v)
D(u, v)
0
1
Do
Do
Remove (multiply by zero) all frequencies > Do
Ideal Low Pass Filter
Filtering in the Spatial and Frequency Domain
Ideal Filters
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
60
Filtering in the Spatial and Frequency Domain
Ideal Filters
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
61
Ideal low pass filter
Spatial domain image Filtered frequency domain image Frequency domain image
Forward
FFT
Filtered spatial domain image
Inverse
FFT
Ideal Frequency
Domain Filtering
causes ringing
Filtering in the Spatial and Frequency Domain
Ideal Filters
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
62
Filtering in the Spatial and Frequency Domain
Ideal Lowpass Filters (ILPF)
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
63
Ideal Lowpass Filters
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
64
Spatial domain image Filtered frequency domain image Frequency domain image
Forward
FFT
Filtered spatial domain image
Inverse
FFT
Ideal Frequency
Domain Filtering
causes ringing
Ideal high pass filter
Filtering in the Spatial and Frequency Domain
Ideal Filters
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
65
Butterworth Lowpass Filters (BLPFs)
With order n
| |
n
D v u D
v u H
2
0
/ ) , ( 1
1
) , (
+
=
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
66
Butterworth Lowpass
Filters (BLPFs)


n=2
D
0
=5,15,30,80,and 230
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
67
Butterworth Lowpass Filters (BLPFs)
Spatial Representation
n=1
n=2 n=5
n=20
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
68
Gaussian Lowpass Filters (GLPFs)
2
0
2
2 / ) , (
) , (
D v u D
e v u H

=
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
69
Gaussian Lowpass
Filters (GLPFs)


D
0
=5,15,30,80,and 230
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
70
Additional Examples of Lowpass Filtering
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
71
Additional Examples of Lowpass Filtering
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
72
Spatial domain image Filtered frequency domain image Frequency domain image
Forward
FFT
Filtered spatial domain image
Inverse
FFT
Smoother Gaussian
Filtering in the
Frequency
Domain shows no
ringing
Filtering in the Spatial and Frequency Domain
Ideal Filters
Gaussian high pass filter
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
73
Sharpening Frequency Domain Filter
) , ( ) , ( v u H v u H
lp hp
=
Ideal highpass filter
Butterworth highpass filter
Gaussian highpass filter

>
s
=
) , ( if 1
) , ( if 0
) , (
0
0
D v u D
D v u D
v u H
| |
n
v u D D
v u H
2
0
) , ( / 1
1
) , (
+
=
2
0
2
2 / ) , (
1 ) , (
D v u D
e v u H

=
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
74
Highpass Filters
Spatial Representations
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
75
Ideal Highpass Filters

>
s
=
) , ( if 1
) , ( if 0
) , (
0
0
D v u D
D v u D
v u H
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
76
Butterworth Highpass Filters
| |
n
v u D D
v u H
2
0
) , ( / 1
1
) , (
+
=
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
2002 R. C. Gonzalez & R. E. Woods
77
Gaussian Highpass Filters
2
0
2
2 / ) , (
1 ) , (
D v u D
e v u H

=

You might also like