0% found this document useful (0 votes)
14 views

Chapter 6

This document discusses image enhancement techniques in the frequency domain. It describes how images can be manipulated by modifying their frequency domain representations using filters. Common filters discussed include low-pass filters, high-pass filters, and notch filters.

Uploaded by

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

Chapter 6

This document discusses image enhancement techniques in the frequency domain. It describes how images can be manipulated by modifying their frequency domain representations using filters. Common filters discussed include low-pass filters, high-pass filters, and notch filters.

Uploaded by

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

Image Enhancement In

Frequency Domain

Original image Filtered image


Image Enhancement
 Purposes: To make an image better appealing
and easier to deal with than the original image

 Three categories:
1. Spatial domain methods: operate on the
images itself,
 Point processing, e.g., image averaging;
logic operation; contrast stretching ...
 Mask processing, e.g., filtering or mask
operation, (blurring, median
Image Enhancement …
2. Frequency domain methods:
work on the Fourier transformed output of the image,
examples: from the convolution theory
 g(x,y) = f(x,y) h(x,y)
 => G(u,v) = F(u,v) • H(u,v)
 => certain properties of F(u,v) can be
 emphasized into G(u,v)

 => spatial domain g(x,y) = F-1{G(u,v)}

3. Combination of the above two categories


Image Operations in Different
Domains
1) Gray value (histogram) domain
- Histogram equalization, specification, etc...
2) Spatial (image) domain
- Average filter, median filter, gradient, laplacian, etc…
3) Frequency (Fourier) domain

3 X 3 Average 5 X 5 Average
3500

3000
+
Original histogram
3500

3000
=
Equalized histogram
2500 2500

Noisy image
2000 2000

(Salt & Pepper noise) Original image f


1500 1500 Gradient magnitude
f Sharpened
f x 2  f yImage
2
1000 1000

500
Blurry Image Laplacian 500

0 0
0 50 100 150 200 250 0 50 100 150 200 250

7 X 7 Average Median
Frequency Domain
 FREQUENCY refers to the RATE OF REPETITION of
some periodic event.
 In imaging, SPATIAL FREQUENCY is the rate at
which the brightness of an image changes with
position in space.
 High spatial frequencies correspond to rapidly varying,
fine detail; low spatial frequencies correspond to
slowly changing brightness.
 Theory shows that any varying signal (1D or 2D) can
be decomposed or TRANSFORMED into a series of
simple periodic variations.
 The Fourier Transform is one of the best known
techniques for performing such a decomposition, and
decomposes the signal into a set of sine waves of
Frequency Domain Filtering
 Steps of filtering in the frequency domain
1. Calculate the DFT of the image f
2. Generate a frequency domain filter H
– H and F should have the same size
– H should NOT be centered. Centered H is for
displaying purpose only.
– If H is centered, F needs to be centered too and
some post-processing is required
3. Multiply F by H (element by element)
4. Compute IDFT
5. Take the real part of the IDFT
Frequency Domain Filtering
Correspondence between Filtering
in the Spatial and Frequency
Domains
Filter in the Spatial Domain can be expressed
by the convolution function.
Convolution in
g(x,y)=h(x,y)f(x,y) Time Domain

Multiplication in
G(u,v)=F(u,v)H(u,v) Frequency Domain

• Filtering in Frequency Domain with H(u,v) is


equivalent to filtering in Spatial Domain with
f(x,y).
Some Basic Filters
 Notch Filter
 Forces the average value of an image to zero
 Average value of an image given by F(0, 0)
 Set F(0, 0) to zero in the Frequency domain
 Take the inverse transform
 If the transform has been centred, the average
value can be forced to zero by the following filter
function:
Notch Filter
 Using a filter H(u,v) that is 0 at the center of
the transform and 1 elsewhere,
 what’s the output image?
Some Basic Filters
 Lowpass Filter: Lowpass filtered image have
less sharp details than the original image
▪ Attenuates high frequencies
▪ Passes low frequencies

 Highpass Filter: Highpass filtered image have


less gray level variations in the smooth areas &
emphasized transitional (e.g. edge) gray level
details. Such an image appears sharper.
▪ Attenuates low frequencies
▪ Passes high frequencies
Lowpass Filter & Highpass
Filter
Smoothing
Frequency Domain
Filters
Smoothing (blurring) is achieved in the
frequency domain by attenuating a
specified range of high frequency
components in the transform of a given
image
Lowpass Filtering
 3 types of filters in the order of increasing
smoothness
 Ideal filter
 Very sharp
 Butterworth filter
 For high values of “filter order” the
Butterworth filter approaches the form of the
ideal filter
 For lower-order values, the Butterworth filter
has a smooth form similar to the Gaussian
filter
 Gaussian filter
Ideal Lowpass filters (ILPF)
 Cuts – off all high frequency components
of the Fourier transform which are at a
distance greater than a specified distance
D0 from the origin of the (centred)
transform

D(u, v)  [(u  M / 2)  (v  N / 2) ]
2 2 1/ 2

(M/2,N/2): center in frequency domain


D0 is called the cutoff frequency.
Cutoff frequency

cutoff
frequency

Frequency domain

h(x,y)

Spatial domain
Ideal Lowpass filters (ILPF):
Example
 When the cut off
frequency loci is small, Original D=5
all details are lost due to
blurring. Large objects
appear as blobs.
 As the filter radius
increases, blurring D=15 D=30
becomes less severe.
 A “ringing” effect
becomes finer in texture
as the amount of high
D=80 D=230
frequency content
removed decreases. The
“ringing” effect is a
characteristic of ideal
Ideal Lowpass filters (ILPF):
Example

 Typically, frequencies are concentrated


around the center of the spectrum.
orig r=8 (90% power) r=18 (93% power)

r=43 (95%) r=78 (99%) r=152


(99.5%)
Butterworth Lowpass filters
(BLPF)
 The transfer function of a BLPF of order n & with
a cut off frequency at a distance D0 from the
origin is given as:

 The BLPF (unlike ILPF), does not have a sharp


discontinuity that establishes a clear cut off between
passed & filtered frequencies.
 A BLPF of order 1 has no ringing. Ringing generally
is imperceptible in filters of order of 2, but can
become a significant factor in filters of higher order.
Butterworth Lowpass filters
(BLPF)
Butterworth Lowpass filters
(BLPF)
Spatial representation of BLPFs of different
orders

No ringing
Filter of order 20 approximates the
ringing behavior of ILPF
Gaussian Lowpass filters
(GLPF)
 The form of these filters in 2-D

D(u,v) :the distance from the origin of the


Fourier transform
 : a measure of the spread of the
Gaussian curve
Gaussian Lowpass filters
(GLPF)
Gaussian Lowpass filters (GLPF):
Example

The GLPF did not achieve as


much smoothing as the BLPF of
order 2 for the same value of
cutoff frequency
Gaussian Lowpass filters (GLPF):
Example
 Examples : fax transmissions, duplicated
material & historical records
 The characters have distorted shapes due to
lack of resolution, and many of the characters
are broken
 Solution: bridge small gaps by blurring
 D0 : 80
Gaussian Lowpass filters (GLPF):
Example
 Produce a smoother, softer-looking result from
a sharp original Reduction in skin
fine lines in the
magnified sections
Sharpening
Frequency Domain
associated with highFilters
Edges & other abrupt changes in gray levels are
frequency components. Image
sharpening can be achieved in the frequency
domain by a highpass filtering process, which
attenuates the low frequency components without
disturbing high frequency components in the
Fourier transform.
Highpass Filtering
 3 types of filters in the order of increasing
Sharpening
▪ Ideal filter
▪ Butterworth filter
▪ Gaussian filter
High-pass filter function can be obtained
using the relation:
H hp (u, v)  1  H lp (u, v)
Frequency domain highpass
filters
Image
Perspective plot Cross section
representation

Ideal highpass filter

Butterworth
highpass filter

Gaussian
highpass filter
Ideal Highpass filters (IHPF)
 Opposite to low-pass filtering: eliminating center
and keeping the others
Butterworth Highpass filters
(BHPF)

D0=15 D0=30 D0=80


These results are much smoother than those obtained
with an IHPF
Gaussian Highpass filters (GHPF)

D0=15 D0=30 D0=80


Only the edges are predominant in the
Example image because the low-frequency
components were severely attenuated

Amplifies the high-frequency components to values


that are higher than in the original transform

Histogram equalization is ideally suited for this


purpose because of its ability to increase contrast
Homomorphic Filtering
 Many times, we want
to remove shading
effects from an image
(i.e., due to uneven
illumination)
 Enhance high
frequencies
 Attenuate low
frequencies but
preserve fine detail.
Homomorphic Filtering
 Consider the following model of image
formation:
i(x,y): illumination
r(x,y): reflection

In general, the illumination component i(x,y) varies


slowly and affects low frequencies mostly.

In general, the reflection component r(x,y) varies


faster and affects high frequencies mostly.
Homomorphic Filtering
 A frequency domain procedure for improving the
appearance of an image by
 Simultaneous gray-level range compression
 Contrast enhancement
 Express an image as illumination & reflectance
components

 Characteristic: Because the Fourier transform of the product


of two functions is not separable
 illumination component : slow spatial variation (low
frequency)
 reflectance component : tend to vary abruptly, particular
at the junctions of dissimilar objects (high frequency)
Can we separate low from high
frequencies?

• Lowand high frequencies from i(x,y) and r(x,y)


have been mixed together...

• Difficult to handle low/high frequencies separately …


Can we separate low from high
frequencies?

 Idea !

Take the ln( ) of


Homomorphic Filtering …
Homomorphic Filtering …
 The enhanced image g(x, y)

Homomorphic filtering approach for image enhancement


Homomorphic Filtering …
 A good deal of control can be gained over the
illumination & reflectance components with a
homomorphic filter
 Treat the low & high frequency components in different
ways

If the parameters rL and rH are chosen so


that rL < 1 and rH > 1, the filter function
tends to decrease the low frequencies and
amplify the high frequencies
Homomorphic Filtering:
Example
 The result ofofprocessing
A reduction dynamic range this image
in the by
brightness, together
with an increase
homomorphic rin contrast,
filtering
L is with rH out
brought the and
=0.5 details of
objects inside the room and balanced the gray levels of
=2.0 in the above filter function
the outside wall
Homomorphic Filtering:
Example

 L  0.25
H  2
c 1
D0  80
Any Questions ?

You might also like