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

Unit-3 Frequency Domain

Uploaded by

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

Unit-3 Frequency Domain

Uploaded by

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

1

Unit - 3
Frequency Domain
Image Enhancement Techniques
2

Image Enhancement

Spatial Frequency
Domain Domain
methods methods

Direct manipulation Modifying Fourier


of pixel in an image transform of image
3

Background

 The frequency domain refers to the plane of the


two dimensional discrete Fourier transform of an
image

 The purpose of Fourier transform is to represent


a signal as a linear combination of sinusoidal
signal of various frequencies
4

Background

 Any function that periodically repeats itself can


be expressed as he sum of sines and/or cosines

different coefficient (Fourier Series)


of different frequencies, each multiplied by a

 Even function that are not periodic can also be

multiplied by a weighting function (Fourier


expressed as the integral of sines and/or cosines

Transform)
5

1D & 2D
FOURIER TRANSFORMATIONS
6

One-Dimensional Fourier Transform


(Continues domain)

 f(x) is single value continues function


 Its Fourier Transform F(u) can be given as:


where

 f(x) can be obtain from F(u) by inverse Fourier


Transform:


7

Two-Dimensional Fourier Transform


(Continues domain)

 These equations make Fourier Transform Pair


 These equations can easily extended to two
variables:


 Similarly for inverse transform:


8

One-Dimensional Fourier Transform


(Discrete domain)

 f(x) is single value discrete function


where x = 0 , 1 , 2 , … , M-1
 Its Fourier Transform F(u) can be given as:


 This is called DFT (Discrete Fourier Transform)
 Inverse DFT can be given as:


9

One-Dimensional Fourier Transform


(Discrete domain)

 In previous equations DFT is multiply by while


inverse DFT is not

 If you want to multiply both equations by some


constant then both need to be multiply by

 Altimetry the multiplication of both constant (in


DFT and in inverse DFT) must be
10

One-Dimensional Fourier Transform


(Discrete domain)

 Euler’s formula

 Substitute this expression into DFT equation


11

One-Dimensional Fourier Transform


(Discrete domain)

 Equation ⑤ and ⑦ are complex quantities


 From analysis of complex numbers it is found
that, sometimes it is convenient to express F(u)
in polar domain
( in polar domain )

Real part
Magnitude/spectrum Imaginary Phase angle / Phase spectrum
of Fourier transform part of Fourier transform
12

One-Dimensional Fourier Transform


(Discrete domain)

Power spectrum / Spectral density


13

One-Dimensional Fourier Transform


(Discrete domain)

 Form interval [0,M-1] samples can be taken at


equally spaced or arbitrary

 denotes first point of sample

 First value of sampled function is

 Next sample has taken at fixed interval

 Next value of sample function is


14

One-Dimensional Fourier Transform


(Discrete domain)

 kth sample given by

 Final sample given by

 So is understood as

 So is understood as
15

Example
F(u)
f(x)
AK
M

K points
A

x u
M points
M points

A discrete function Fourier spectrum of it


of M points
16

Two-Dimensional Fourier Transform


(Discrete domain)

 These equations make Fourier Transform Pair


 These equations can easily extended to two
variables:


 Similarly for inverse transform:


17

Two-Dimensional Fourier Transform


(Discrete domain)

 Fourier spectrum, phase angle and power


spectrum given as:


18

Two-Dimensional Fourier Transform


(Discrete domain)

 It is common practice to multiply the input


image by (-1)x+y prior to computing the Fourier
transform

 Due to properties of exponential

Fourier Transform
of argument
19

Two-Dimensional Fourier Transform


(Discrete domain)

 So origin of Fourier Transform is located at


u=M/2 and v=N/2

 Means, multiplying by shifts the origin of to


frequency coordinates

 This will be the center point of area occupied by


DFT (M×N size)

 We refer to this area of frequency domain as the


frequency rectangle
20

Two-Dimensional Fourier Transform


(Discrete domain)

 In computer implementation we need to take

 So the actual center of DFT will be at


21

Two-Dimensional Fourier Transform


(Discrete domain)

 Place in ⑩


 is image then Fourier Transform of origin is
equal to the average gray level of the image
22

Two-Dimensional Fourier Transform


(Discrete domain)

 is real, its Fourier transform is conjugate


symmetric

∴ ⑰

∴ ⑱

 Sampling in spatial and frequency domain has


relationship:


23

FILTERING IN
FREQUENCY DOMAIN
24

Steps of filtering in Frequency Domain

1. Multiply the input image by (-1)x+y to center the


transform

2. Compute

3. Multiply by a filter function

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


25

Steps of filtering in Frequency Domain

Filter Inverse
Fourier
Function Fourier
Transform
H(u,v) Transform

Pre- Post-
Processin Processin
g g

f(x,y) g(x,y)

Input Enhanced
image image
26

Steps of filtering in Frequency Domain

𝐹 (𝑢,𝑣)=ℑ[𝑓 ( 𝑥 ,𝑦)]
20

Fourier
transform

Input image f(x,y)


Fourier Transform Input
image
27

Steps of filtering in Frequency Domain

𝐺 ( 𝑢 , 𝑣 )= 𝐻 ( 𝑢 , 𝑣 ) 𝐹 ( 𝑢 , 𝑣 )
21

Filter
function

Fourier transform of
Input image

output image g(x,y)


Fourier transform of
28

Steps of filtering in Frequency Domain

−1
22

( )
𝑔(𝑥,𝑦)=ℑ [𝐺 𝑢,𝑣 ]
Filtered
Output
image
Inverse Fourier
transform

output image g(x,y)


Fourier transform of
29

Notch Filter

 Force average value of an image to zero

 Set F(0,0) to zero in frequency

 Do this by multiplying all values of F(u,v) by


filter function:

23
30

Notch Filter

 This filter
 Set F(u,v) to zero
 Other frequency components remain untouched

 Processed image obtained by inverse Fourier


transform of

 This filter is called notch filter because


it is a constant function with a hole (notch) at
the origin
31

Notch Filter

SEM image of Result of filtering


a damaged IC With Notch filter
32

LPF & HPF

 LPF ( Low pass filter )

 Reduces high frequencies


 Passing low frequencies
 Smoothing images

 HPF ( High pass filter )

 Reduces low frequencies


 Passing high frequencies
 Sharpening images
33

LPF & HPF

2D LPF
Result
function
of
LPF

Result
2D HPF of
function HPF
34

Correspondence between filtering


Spatial domain & Frequency domain

 Convolution of and of size M×N

24
35

Correspondence between filtering


Spatial domain & Frequency domain
 Let and denote the Fourier transformation of an
respectively then Fourier transform pair is:

25
36

Correspondence between filtering


Spatial domain & Frequency domain
 Let and denote the Fourier transformation of an
respectively then Fourier transform pair is:

Fourier transform

Inverse Fourier transform


37

Correspondence between filtering


Spatial domain & Frequency domain
 Let and denote the Fourier transformation of an
respectively then Fourier transform pair is:

Fourier transform

Inverse Fourier transform


 Visa versa of previous equation is:
38

SMOOTHING
FREQUENCY DOMAIN FILTERS
39

Basic

 Smoothing (blurring) is achieved by


attenuating a specified range of high-frequency
components in the transform of a given image

 Done by Low Pass Filters (LPF)

 3 types of LPF need to study


 Ideal
 Butterworth
 Gaussian
40

1. Ideal Lowpass Filters ( ILPF )

 Simplest low pass filter


 Cuts off all high frequency components of FT
> D0 (distance from origin)

26

Non negative

Distance from point


(u,v) to origin
41

1. Ideal Lowpass Filters ( ILPF )

 If image size is M×N then


center of the frequency rectangle is at

 Distance of point (u,v) from origin is

27
42

1. Ideal Lowpass Filters ( ILPF )

Frequency in this Frequency in this


range will pass Range is attenuated

Cutoff
frequency

3D perspective H(u,v) Filter radial


plot of H(u,v) as image cross section
43

1. Ideal Lowpass Filters ( ILPF )

 Cutoff frequency

 The point of transition between and in ideal low pass


filter cross section
44

1. Ideal Lowpass Filters ( ILPF )

 Can compare the behavior of ILPF with different


cutoff frequency
 One way to establish a set of standard cutoff
frequency is to compute circles that enclose
specified amounts of total image power PT

28

 P(u,v) is given in Eq. ⑭


45

1. Ideal Lowpass Filters ( ILPF )

 Transform is a circle with radius r and origin as


center
 Then it encloses ⍺ percentage of power

29

 Summation is taken over the values of (u,v) that


lie inside the circle or on boundary
46

1. Ideal Lowpass Filters ( ILPF )


47

1. Ideal Lowpass Filters ( ILPF )


48

2. Butterworth Lowpass Filters (BLPF)

 Transform function of Butterworth filter is

30

 No sharp discontinuity like ILPF that establishes


a clear cutoff between passed and cutoff
frequency
49

2. Butterworth Lowpass Filters (BLPF)


50

2. Butterworth Lowpass Filters (BLPF)


51

2. Butterworth Lowpass Filters (BLPF)


52

3. Gaussian Lowpass Filter ( GLPF )

 Transform function of Gaussian filter is

31

 is a measure of the spread of the Gaussian


curve
 Rewrite the above equation by letting =D0
32
53

3. Gaussian Lowpass Filter ( GLPF )


54

3. Gaussian Lowpass Filter ( GLPF )


55

3. Gaussian Lowpass Filter ( GLPF )


56

3. Gaussian Lowpass Filter ( GLPF )


57

3. Gaussian Lowpass Filter ( GLPF )


58

SHARPENING
FREQUENCY DOMAIN FILTERS
59

Basic

 Sharpening is achieved by
attenuating a specified range of low-frequency
components in the transform of a given image

 Done by High Pass Filters (HPF)


60

1. Ideal Highpass Filter ( IHPF )

 Ideal Highpass Filter ( IHPF ) is defined as

33
61

1. Ideal Highpass Filter ( IHPF )


62

2. Butterworth Highpass Filter (BHPF)

 Transfer function of the BHPF of order n and with


cutoff frequency D0 is given as

34
63

2. Butterworth Highpass Filter (BHPF)


64

3. Gaussian Highpass Filter ( GHPF )

 Transfer function of the GHPF with cutoff


frequency D0 is given as

35
65

3. Gaussian Highpass Filter ( GHPF )


66

4. Laplacian in frequency domain

 Fourier transform of nth order derivation of


function with one variable is given as :

36
67

4. Laplacian in frequency domain

 Laplacian work with 2nd order derivation & our


image is having two variables x and y so the
equation will be given as :

37
68

4. Laplacian in frequency domain

 We second order derivation of function as


above equation can be written as:

38

39

 Center of frequency domain is at ( M/2 , N/2 )

40
69

4. Laplacian in frequency domain

 From 38 and 40

41

42

43
70

4. Laplacian in frequency domain

 In spatial domain Generate enhanced image by


subtracting Laplacian image from original image

 In frequency domain task is done by taking one


filter:

44
71

4. Laplacian in frequency domain

 Enhanced image is given as

45
72

HOMOMORPHIC FILTERING
73

Basic idea

 Method based on special case of a class of


system known as Homomorphic System

 Approach is the separation of the illumination


and reflection components

 The Homomorphic Filter Function H(u,v) can


then operate on these components separately
74

Homomorphic Filtering

 Image f(x,y) can be expressed as two


components (illumination and reflection)
46

 Fourier transform of the product of two function


is not separable

 So need to follow the following steps to get


enhanced image
75

Homomorphic Filtering

f(x,y) g(x,y)

ln exp

DFT (DFT)-1

H(u,v)
76

Homomorphic Filtering

1) Find ln (natural log) of f(x,y)

47

2) Find Fourier transform

48
77

Homomorphic Filtering

3) Process Z(u,v) with filter H(u,v)

49

4) Find inverse Fourier transform

50
78

Homomorphic Filtering

5) Find exp of s(x,y)

51
79

END
OF
UNIT - 3

You might also like