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

Frequency Domain Filtering Final

The document outlines the principles of filtering in the frequency domain, focusing on the Fourier Transform and its applications in image processing. It details the steps for filtering, including the use of various filters, the Nyquist-Shannon sampling theorem, and the effects of aliasing. Additionally, it discusses different types of filters such as lowpass, highpass, and selective filters, along with examples of their application in image enhancement and denoising.

Uploaded by

royeh85261
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)
24 views112 pages

Frequency Domain Filtering Final

The document outlines the principles of filtering in the frequency domain, focusing on the Fourier Transform and its applications in image processing. It details the steps for filtering, including the use of various filters, the Nyquist-Shannon sampling theorem, and the effects of aliasing. Additionally, it discusses different types of filters such as lowpass, highpass, and selective filters, along with examples of their application in image enhancement and denoising.

Uploaded by

royeh85261
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/ 112

Filtering in the Frequency Domain

Outline

► Fourier Transform

► Filtering in Fourier Transform Domain

1/22/2025 2
Fourier Series and Fourier Transform: History

► Fourier Series
Any periodic function can be expressed as the sum of sines
and /or cosines of different frequencies, each multiplied by
a different coefficients

► Fourier Transform
Any function that is not periodic can be expressed as the
integral of sines and /or cosines multiplied by a weighing
function

1/22/2025 3
Preliminary Concepts

1/22/2025 4
Fourier Series

1/22/2025 5
Impulses and the Sifting Property (1)

1/22/2025 6
Impulses and the Sifting Property (2)

1/22/2025 7
Impulses and the Sifting Property (3)

1/22/2025 8
Fourier Transform: One Continuous Variable

1/22/2025 9
Fourier Transform: One Continuous Variable

1/22/2025 10
Fourier Transform: One Continuous Variable

1/22/2025 11
Fourier Transform: Impulses

1/22/2025 12
Fourier Transform: Impulse Trains

1/22/2025 13
Fourier Transform: Impulse Trains

1/22/2025 14
Fourier Transform: Impulse Trains

1/22/2025 15
Fourier Transform and Convolution

1/22/2025 16
Fourier Transform and Convolution

Fourier Transform Pairs

1/22/2025 17
Fourier Transform of Sampled Functions

1/22/2025 18
Fourier Transform of Sampled Functions

1/22/2025 19
Question
The Fourier transform of the
sampled function (shown in
the
following figure) is

1. Continuous

2. Discrete

1/22/2025 20
Fourier Transform of Sampled Functions
► A bandlimited signal is a signal whose Fourier transform
is zero above a certain finite frequency. In other words, if
the Fourier transform has finite support then the signal is
said to be bandlimited.

An example of a simple bandlimited signal is a sinusoid of


the form,

1/22/2025 21
Fourier Transform of Sampled Functions

1/22/2025 22
Nyquist–Shannon sampling theorem

► We can recover from its sampled version if we can


isolate a copy of from the periodic sequence of copies
of this function contained in , the transform of the
sampled function

► Sufficient separation is guaranteed if

Sampling theorem: A continuous, band-limited function


can be recovered completely from a set of its samples if
the samples are acquired at a rate exceeding twice the
highest frequency content of the function
1/22/2025 23
Nyquist–Shannon sampling theorem

1/22/2025 24
Aliasing

If a band-limited function is sampled at a rate that is less


than twice its highest frequency?

The inverse transform will yield a corrupted function. This


effect is known as frequency aliasing or simply as
aliasing .

1/22/2025 25
Aliasing

1/22/2025 26
Aliasing

1/22/2025 27
Function Reconstruction from Sampled Data

1/22/2025 28
The Discrete Fourier Transform (DFT) of One
Variable

1/22/2025 29
2-D Impulse and Sifting Property: Continuous

1/22/2025 30
2-D Impulse and Sifting Property: Discrete

1/22/2025 31
2-D Fourier Transform: Continuous

1/22/2025 32
2-D Fourier Transform: Continuous

1/22/2025 33
2-D Sampling and 2-D Sampling Theorem

1/22/2025 34
2-D Sampling and 2-D Sampling Theorem

1/22/2025 35
2-D Sampling and 2-D Sampling Theorem

1/22/2025 36
Aliasing in Images: Example
In an image system, the
number of samples is fixed at
96x96 pixels. If we use this
system to digitize checkerboard
patterns …

Under-sampling

1/22/2025 37
Aliasing in Images: Example

Re-sampling

1/22/2025 38
Aliasing in Images: Example

Re-sampling

1/22/2025 39
Moiré patterns

► Moiré patterns are often an undesired artifact of images


produced by various digital imaging and computer graphics
techniques
e. g., when scanning a halftone picture or ray tracing a
checkered plane. This cause of moiré is a special case of
aliasing, due to under-sampling a fine regular pattern

http://en.wikipedia.org/wiki/Moiré_pattern

1/22/2025 40
2-D Discrete Fourier Transform and Its
Inverse

1/22/2025 41
Properties of the 2-D DFT
relationships between spatial and frequency intervals

1/22/2025 42
Properties of the 2-D DFT
translation and rotation

1/22/2025 43
Properties of the 2-D DFT
periodicity

1/22/2025 44
Properties of the 2-D DFT
periodicity

1/22/2025 45
Properties of the 2-D DFT
Symmetry

1/22/2025 46
Properties of the 2-D DFT
Fourier Spectrum and Phase Angle

1/22/2025 47
1/22/2025 48
1/22/2025 49
Example: Phase Angles

1/22/2025 50
Example: Phase Angles and The Reconstructed

1/22/2025 51
The Basic Filtering in the Frequency Domain

Why is the spectrum at


almost ±45 degree stronger
than the spectrum at other
directions?

1/22/2025 52
The Basic Filtering in the Frequency Domain

► Modifying the Fourier transform of an image

► Computing the inverse transform to obtain the processed


result

1/22/2025 53
The Basic Filtering in the Frequency Domain

► In a filter H(u,v) that is 0 at the center of the transform


and 1 elsewhere, what’s the output image?

1/22/2025 54
The Basic Filtering in the Frequency Domain

1/22/2025 55
Zero-Phase-Shift Filters

Filters affect the real and imaginary parts equally,


and thus no effect on the phase.
These filters are called zero-phase-shift filters

1/22/2025 56
Examples: Nonzero-Phase-Shift Filters

Even small
Phasechanges
angle is in the phase angle can ishave
Phase angle
dramaticmultiplied
(usually by undesirable) effects on the
multiplied by filtered
output 0.5 0.5

1/22/2025 57
Summary:
Steps for Filtering in the Frequency Domain
1. Given an input image f(x,y) of size MxN, obtain the
padding parameters P and Q. Typically, P = 2M and Q = 2N.

2. Form a padded image, fp(x,y) of size PxQ by


appending the necessary number of zeros to f(x,y)

3. Multiply fp(x,y) by (-1)x+y to center its transform

4. Compute the DFT, F(u,v) of the image from step 3

5. Generate a real, symmetric filter function*, H(u,v), of


size PxQ with center at coordinates (P/2, Q/2)
*generate from a given spatial filter, we pad the spatial filter, multiply the expadded
array by (-1)x+y, and compute the DFT of the result to obtain a centered H(u,v).
1/22/2025 58
Summary:
Steps for Filtering in the Frequency Domain
6. Form the product G(u,v) = H(u,v)F(u,v) using array
multiplication

7. Obtain the processed image

8. Obtain the final processed result, g(x,y), by extracting


the MxN region from the top, left quadrant of gp(x,y)

1/22/2025 59
An Example:
Steps for Filtering in the Frequency Domain

1/22/2025 60
Correspondence Between Filtering in the
Spatial and Frequency Domains (1)

1. Both components are Gaussian and real


2. The functions behave reciprocally

1/22/2025 61
Correspondence Between Filtering in the
Spatial and Frequency Domains (2)

1/22/2025 62
Correspondence Between Filtering in the
Spatial and Frequency Domains (3)

1/22/2025 63
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example

600x600

1/22/2025 64
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example

1/22/2025 65
Generate H(u,v)

1/22/2025 66
Generate H(u,v)

1/22/2025 67
Image Smoothing Using Filter Domain Filters:
ILPF

1/22/2025 68
ILPF Filtering
Example

Ringing artifacts

1/22/2025 69
Image Smoothing Using Filter Domain Filters:
ILPF

1/22/2025 70
ILPF Filtering Example

1/22/2025 71
The Spatial Representation of ILPF

1/22/2025 72
Image Smoothing Using Filter Domain Filters:
BLPF

1/22/2025 73
1/22/2025 74
The Spatial Representation of BLPF

1/22/2025 75
Image Smoothing Using Filter Domain Filters:
GLPF

1/22/2025 76
Image Smoothing Using Filter Domain Filters:
GLPF

1/22/2025 77
1/22/2025 78
Examples of smoothing by GLPF (1)

1/22/2025 79
Examples of smoothing by GLPF (2)

1/22/2025 80
Examples of smoothing by GLPF (3)

1/22/2025 81
Question

82
Question

In Figure below, why multiplying the phase angle by −1 flipped


the image with respect to both coordinate axes ?

83
Image Sharpening Using Frequency Domain
Filters

A highpass filter is obtained from a given lowpass filter


using

1/22/2025 84
Image Sharpening Using Frequency Domain
Filters

1/22/2025 85
1/22/2025 86
Filtering Results by IHPF

1/22/2025 87
Filtering Results by BHPF

1/22/2025 88
Filtering Results by GHPF

1/22/2025 89
Using Highpass Filtering and Threshold for
Image Enhancement

BHPF
(order 4 with a cutoff
frequency 50)

1/22/2025 90
The Laplacian in the Frequency Domain

1/22/2025 91
The Laplacian in the Frequency Domain

1/22/2025 92
The Laplacian in the Frequency Domain

1/22/2025 93
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering

1/22/2025 94
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering

1/22/2025 95
Gaussian Filter
D0=40

High-Frequency-Emphasis Filtering
Gaussian Filter
K1=0.5, k2=0.75

1/22/2025 96
Homomorphic Filtering

= ?

1/22/2025 97
Homomorphic Filtering

1/22/2025 98
Homomorphic Filtering

The illumination component of an image generally is


characterized by slow spatial variations, while the
reflectance component tends to vary abruptly

1/22/2025 99
Homomorphic Filtering

Attenuate the contribution


made by illumination and
amplify the contribution made
by reflectance

1/22/2025 100
Homomorphic Filtering

1/22/2025 101
Homomorphic Filtering

1/22/2025 102
Selective Filtering

Non-Selective Filters:
operate over the entire frequency rectangle

Selective Filters
operate over some part, not entire frequency rectangle
• bandreject or bandpass: process specific bands
• notch filters: process small regions of the frequency
rectangle

1/22/2025 103
Selective Filtering:
Bandreject and Bandpass Filters

1/22/2025 104
Selective Filtering:
Bandreject and Bandpass Filters

1/22/2025 105
Example: Image Denoising by Using DCT Transform

Weeks 1 & 2 106


Selective Filtering:
Notch Filters
Zero-phase-shift filters must be symmetric about the origin.
A notch with center at (u0, v0) must have a corresponding
notch at location (-u0,-v0).

Notch reject filters are constructed as products of highpass


filters whose centers have been translated to the centers of
the notches.

1/22/2025 107
Selective Filtering:
Notch Filters

1/22/2025 108
Examples:
Notch Filters
(1)

1/22/2025 109
Examples:
Notch Filters
(2)

1/22/2025 110
1/22/2025 111
Question

112

You might also like