100% found this document useful (2 votes)
1K views63 pages

Fourier Transform

1. The document discusses complex numbers, Fourier transforms, and discrete Fourier transforms. Complex numbers represent real and imaginary parts, and can be added or multiplied. 2. Fourier transforms separate a function into frequency components, representing how the function varies with frequency. The Fourier transform of an image separates it into spatial and frequency domains. 3. A discrete Fourier transform (DFT) represents the same concepts for discrete signals like digital images, expressing a function as the sum of sinusoids of different frequencies. The DFT is useful for image processing tasks in the frequency domain.

Uploaded by

resmi_ng
Copyright
© Attribution Non-Commercial (BY-NC)
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
100% found this document useful (2 votes)
1K views63 pages

Fourier Transform

1. The document discusses complex numbers, Fourier transforms, and discrete Fourier transforms. Complex numbers represent real and imaginary parts, and can be added or multiplied. 2. Fourier transforms separate a function into frequency components, representing how the function varies with frequency. The Fourier transform of an image separates it into spatial and frequency domains. 3. A discrete Fourier transform (DFT) represents the same concepts for discrete signals like digital images, expressing a function as the sum of sinusoids of different frequencies. The DFT is useful for image processing tasks in the frequency domain.

Uploaded by

resmi_ng
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 63

Resmi N.G. Resmi N.G.

Reference: Digital Image Processing


Rafael C. Gonzalez
Richard E. Woods
Mathematical Background:
Complex Numbers
A complex number x is of the form:
a: real part, b: imaginary part
, 1 x a jb where j = + =
a: real part, b: imaginary part
Addition
Multiplication
( ) ( ) ( ) ( ) a jb c jd a c j b d + + + = + + +
( ).( ) ( ) ( ) a jb c jd ac bd j ad bc + + = + +
3/19/2012 2 CS04 804B Image Processing - Module1
Magnitude-Phase (Vector) representation
Magnitude:
Phase:

Phase Magnitude notation:


3/19/2012 3 CS04 804B Image Processing - Module1
Multiplication using magnitude-phase representation
Complex conjugate
Properties
3/19/2012 4 CS04 804B Image Processing - Module1
Sine and Cosine Functions

3/19/2012 5 CS04 804B Image Processing - Module1


Shifting or translating the sine function by a constant b.
Note: Cosine is a shifted sine function.
cos( ) sin( )
2
t t

= +
3/19/2012 6 CS04 804B Image Processing - Module1
Image Transforms
Key steps:
(1) Transform the image
(2) Perform the task(s) in the transformed domain.
(3) Apply inverse transform to return to the spatial domain. (3) Apply inverse transform to return to the spatial domain.
3/19/2012 CS04 804B Image Processing - Module1 7
Fourier Series
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.
3/19/2012 8 CS04 804B Image Processing - Module1
3/19/2012 CS04 804B Image Processing - Module1 9
3/19/2012 CS04 804B Image Processing - Module1 10
Fourier Transform
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 weighing function. and/or cosines multiplied by a weighing function.
Transforms a function from spatial domain to frequency
domain.
3/19/2012 11 CS04 804B Image Processing - Module1
Why is Fourier Transform Useful?
Easier to remove undesirable frequencies.
Faster to perform certain operations in the frequency Faster to perform certain operations in the frequency
domain than in the spatial domain.
3/19/2012 12 CS04 804B Image Processing - Module1
Example: Removing undesirable
frequencies
frequencies
noisy signal
remove high
frequencies
reconstructed
signal
To remove certain frequencies, set their corresponding F(u)
coefficients to zero!
3/19/2012 13 CS04 804B Image Processing - Module1
How do frequencies show up in an
image?
Low frequencies correspond to slowly varying
information (e.g., continuous surface).
High frequencies correspond to quickly varying
information (e.g., edges) information (e.g., edges)
Original Image Low-passed
3/19/2012 14 CS04 804B Image Processing - Module1
A function expressed in either a Fourier Series or Fourier
Transform can be reconstructed completely via an inverse
process. process.
3/19/2012 CS04 804B Image Processing - Module1 15
Fourier Transforms of Some Simple
Shapes
3/19/2012 CS04 804B Image Processing - Module1 16
3/19/2012 CS04 804B Image Processing - Module1 17
3/19/2012 CS04 804B Image Processing - Module1 18
One Dimensional Fourier
Transform and its Inverse
The Fourier Transform F(u) of a single variable
continuous function f(x) is defined by
where
2
( ) ( ) (1)
j ux
F u f x e dx

= where
Given F(u), f(x) can be obtained by means of inverse
Fourier Transform
(1) and (2) constitute the Fourier Transform pair.
3/19/2012 CS04 804B Image Processing - Module1 19

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

/ 2
2 2
/ 2
2 2 / 2
2
2 2
/ 2
2 2
( ) ( ) 1.
2 2
2
sin
2
T
j ux j ux
T
T T
j u j u T
j ux
T
T T
j u j u
F u f x e dx e dx
e e e
j u j u
uT
e e uT

= =
(
(
(
= =
(
(


(

(
| |
| |
|
(

| |

3/19/2012 CS04 804B Image Processing - Module1 20
2 2
2 2
sin
2
2
sin
2 2
2
sin
2
2
2
j u j u
e e uT
u j
uT
T
uT

| |
|
(

| |
\ |
( = =
|
|

\ (
|
\
(

| |
|
\
=
|

\
Q
(
(
(
|
(
|
(


3/19/2012 CS04 804B Image Processing - Module1 21
/ 4
2 2
/ 4
2 2 / 4
2
4 4
/ 4
2 2
( ) ( ) 2.
2
2 2
2
sin
2
T
j ux j ux
T
T T
j u j u T
j ux
T
T T
j u j u
F u f x e dx e dx
e e e
j u j u
uT
e e uT

= =
(
(
(
= =
(
(


(

(
| |
| |
|
(

| |

3/19/2012 CS04 804B Image Processing - Module1 22
2 2
4 4
sin
2
4
2 sin
2 4
2
sin
4
2
2
4
j u j u
e e uT
u j
uT
T
uT

| |
|
(

| |
\ |
( = =
|
|

\ (
|
\
(

| |
|
\
=
Q
(
(
(
| |
(
|
(
\

3/19/2012 CS04 804B Image Processing - Module1 23
Discrete Fourier Transform (DFT)
Fourier Transform of a discrete function of one variable,
f(x), x = 0, 1, 2, , M-1 is given by
where u = 0, 1, 2, , M-1.
3/19/2012 CS04 804B Image Processing - Module1 24
1
2
0
1
( ) ( )
M
j ux
M
x
F u f x e
M


=
=

Inverse DFT
1
2
0
1
( ) ( )
M
j ux
M
u
f x F u e
M

=
=

where x = 0, 1, 2, , M-1.
The product of multipliers used in DFT and its inverse
should be equal to 1/M.
3/19/2012 CS04 804B Image Processing - Module1 25
Eulers Formula :
Therefore,
cos sin
j
e j

= +
( ) ( )
1
1
2 2
( ) ( ) cos sin
M
ux ux
F u f x j
M M

(
=

where u = 0, 1, 2, , M-1.
Each term of Fourier Transform F(u), for each value of u,
is composed of sum of all values of function f(x).
3/19/2012 CS04 804B Image Processing - Module1 26
( ) ( )
0
2 2
( ) ( ) cos sin
x
ux ux
F u f x j
M M
M

=
(
=

Values of f(x) are in turn multiplied by sines and cosines


of various frequencies.
The domain (values of u) over which the values of F(u)
range is called the frequency domain, because u range is called the frequency domain, because u
determines the frequency components of the transform.
Each of the M terms of F(u) is called a frequency
component of the transform.
3/19/2012 CS04 804B Image Processing - Module1 27
Analogy
Prism separates light into various color components each
depending on its wavelength or frequency content.
Fourier Transform separates a function into various
components based on frequency content.
3/19/2012 CS04 804B Image Processing - Module1 28
Fourier Transformin Polar Co-ordinates
where
( )
( ) ( )
j u
F u F u e

=
1
2 2 2
( ) ( ) ( ) F u R u I u ( = +

is called the magnitude or spectrum of Fourier Transform
and
is called the phase angle of Fourier Transform.
3/19/2012 CS04 804B Image Processing - Module1 29
( ) ( ) ( ) F u R u I u ( = +

1
( )
( ) tan
( )
I u
u
R u


| |
=
|
\
Power Spectrum or Spectral Density

2
2 2
( ) ( )
( ) ( )
P u F u
R u I u
=
= +
3/19/2012 CS04 804B Image Processing - Module1 30
Fourier Transform is centered at origin, but DFT is centered at
M/2.
3/19/2012 CS04 804B Image Processing - Module1 31
DFT spectrum can be centered at u=0, by multiplying f(x) by
(-1)
x
before taking the transform (Centering). F(0) will then be
at u=M/2.
3/19/2012 CS04 804B Image Processing - Module1 32
3/19/2012 CS04 804B Image Processing - Module1 33
Height of the spectrum doubles as area under the curve in
x-domain doubles.
Number of zeroes in the spectrum in the same interval
doubles as the length of the function doubles. doubles as the length of the function doubles.
3/19/2012 CS04 804B Image Processing - Module1 34
More on DFT
Samples are equally spaced.
Samples need not be at integer values of x in [0, M-1].
Can be spaced at x
0
, x
0
+x, , x
0
+(M-1)x.
k
th
sample f(k) is at x
0
+kx.
3/19/2012 CS04 804B Image Processing - Module1 35
0
( ) (x x) f x f x = +
( ) ( ) F u F u u =
1
x
u
M
=

2D-Fourier Transform
2 ( )
( , ) ( , )
j ux vy
F u v f x y e dxdy


+

=

3/19/2012 CS04 804B Image Processing - Module1 36
2 ( )
( , ) ( , )
j ux vy
f x y F u v e dudv


+

=

2D-Discrete Fourier Transform and
its Inverse
2D-DFT of image f(x,y) of size MxN is given by
( )
1 1
2
0 0
1
( , ) ( , )
vy M N
ux
j
M N
x y
F u v f x y e
MN


+
= =
=

These equations constitute a 2D-DFT pair.
u, v are transform or frequency variables.
x, y are spatial or image variables.
3/19/2012 CS04 804B Image Processing - Module1 37
( )
1 1
2
0 0
( , ) ( , )
vy M N
ux
j
M N
u v
f x y F u v e


+
= =
=

Fourier Spectrum:
Phase Angle:
1
2 2 2
( , ) ( , ) ( , ) F u v R u v I u v
(
= +

1
( , )
( , ) tan
( , )
I u v
u v
R u v


(
=
(

Power Spectrum:

3/19/2012 CS04 804B Image Processing - Module1 38


( , ) R u v
(

2
2 2
( , ) ( , )
( , ) ( , )
P u v F u v
R u v I u v
=
= +
Centering is done by multiplying the input image function
by (-1)
x+y
prior to computing the transform. F(0,0) will then
be at u=M/2, v=N/2.
M N
3/19/2012 CS04 804B Image Processing - Module1 39
( , ).( 1) ( , )
2 2
x y
M N
f x y F u v
+
(
=

gives the average of f(x,y).
That is, the value of Fourier Transform at the origin is
1 1
0 0
1
(0, 0) ( , )
M N
x y
F f x y
MN

= =
=

That is, the value of Fourier Transform at the origin is
equal to the average gray level of the image.
It corresponds to the dc component of the spectrum
(frequencies are zero at the origin).
3/19/2012 CS04 804B Image Processing - Module1 40
Properties of Fourier Transform
Linearity
If F(u) and G(u) are Fourier transforms of f(x) and g(x) If F(u) and G(u) are Fourier transforms of f(x) and g(x)
respectively, then
where a and b are constants.
3/19/2012 CS04 804B Image Processing - Module1 41
[ ( ) ( )] ( ) ( ) F af x bg x aF u bG u + = +
Proof:
2
2 2
[ ( ) ( )] [ ( ) ( )]
( ) ( )
j ux
j ux j ux
F af x bg x af x bg x e dx
af x e dx bg x e dx



+ = +
= +


3/19/2012 CS04 804B Image Processing - Module1 42
2 2
( ) ( )
( ) ( )
( ) ( )
j ux j ux
af x e dx bg x e dx
a f x e dx b g x e dx
aF u bG u





= +
= +
= +


Linearity
Additivity: The property that performing a linear process on
the sum of inputs is same as that of performing the
operations individually and then summing up the resuts. operations individually and then summing up the resuts.
Homogeneity: The property that the response of a linear
system to a constant times an input is same as the response
to the original input multiplied by a constant.
3/19/2012 CS04 804B Image Processing - Module1 43
Change of Scale Property
If F(u) is the Fourier transform of f(x), then
Proof:
1
[ ( )] , 0
u
F f ax F a
a a
| |
=
|
\
2
[ ( )] ( )
j ux
F f ax f ax e dx

=

3/19/2012 CS04 804B Image Processing - Module1 44
2
[ ( )] ( )
,
,
j ux
F f ax f ax e dx
Let ax t
t
Or x
a
dt
dx
a

=
=
=
=

2
2
[ ( )] ( )
1
( )
1
j ux
t
j u
a
u
F f ax f ax e dx
f t e dt
a

=
=

3/19/2012 CS04 804B Image Processing - Module1 45


2
1
( )
1
u
j t
a
f t e dt
a
u
F
a a

=
| |
=
|
\

Shifting Property
If F(u) is the Fourier transform of f(x), then
Proof:
0
2
0
[ ( )] ( )
j ux
F f x x e F u

=
2
[ ( )] ( )
j ux
F f x x f x x e dx

3/19/2012 CS04 804B Image Processing - Module1 46


0 0
0
0
[ ( )] ( )
,
,
F f x x f x x e dx
Let x x t
Or x x t
dx dt

=
=
= +
=

0
0
2 ( )
0
2 2
[ ( )] ( )
( ) .
j u t x
j ux j ut
F f x x f t e dt
f t e e dt

=
=

3/19/2012 CS04 804B Image Processing - Module1 47


0
0
2 2
2
( )
( )
j ux j ut
j ux
e f t e dt
e F u

=
=

Properties of 2D-DFT
1. Translation
0 0
2
( , ) ( , ) (1)
u x v y
j
M N
f x y e F u u v v

| |
+
|
\

3/19/2012 CS04 804B Image Processing - Module1 48
0 0
( , ) ( , ) (1)
M N
f x y e F u u v v
\

0 0
2
0 0
( , ) ( , ) (2)
u x v y
j
M N
f x x y y F u v e

| |
+
|
\

When
Therefore, (1) and (2) can be written as:
0 0
2 2
N M
u and v = =
0 0
2
( )
( 1)
u x v y
j
M N
j x y x y
e e


| |
+
|
+ +
\
= =
M N
| |
3/19/2012 CS04 804B Image Processing - Module1 49
( , )( 1) ,
2 2
x y
M N
f x y F u v
+
| |

|
\
, ( , )( 1)
2 2
u v
M N
f x y F u v
+
| |

|
\
2. Distributivity
[ ] [ ] [ ]
1 2 1 2
( , ) ( , ) ( , ) ( , ) f x y f x y f x y f x y + = +
[ ] [ ] [ ]
1 2 1 2
( , ). ( , ) ( , ) . ( , ) f x y f x y f x y f x y
3. Scaling
3/19/2012 CS04 804B Image Processing - Module1 50
( , ) ( , ) af x y aF u v
1
( , ) ,
u v
f ax by F
ab a b
| |

|
\
4. Rotation
Representation in terms of polar coordinates
cos , sin
cos , sin
x r y r
u w v w


= =
= =
Rotating f(x,y) by an angle
0
rotates F(u,v) by the same
angle.
Rotating F(u,v) rotates f(x,y) by the same angle.
3/19/2012 CS04 804B Image Processing - Module1 51
0 0
( , ) ( , ) f r F w + +
5. Periodicity
Inverse Transform is also periodic.
( , ) ( , ) ( , ) ( , ) F u v F u M v F u v N F u M v N = + = + = + +
( , ) ( , ) ( , ) ( , ) f x y f x M y f x y N f x M y N = + = + = + +
6. Conjugate Symmetry
3/19/2012 CS04 804B Image Processing - Module1 52
*
( , ) ( , ) F u v F u v =
7. Separability
1 1
2 2
0 0
1
2
1 1
( , ) . ( , )
1
( , )
M N
j ux M j vy N
x y
M
j ux M
F u v e f x y e
M N
F x v e
M



= =

| |
=
|
\
=

F(x,v) Fourier Transform along one row of f(x,y).


1Dimensional Fourier Transform is computed
for each value of x, with v varying from 0 to N-1.
3/19/2012 CS04 804B Image Processing - Module1 53
0 x
M
=

By varying x from 0 to M-1, Fourier Transform is


computed along all rows of f(x,y), with u remaining
constant.
To complete the 2D transform, vary u from 0 to M-1.
Compute 1D transform along each column of F(x,v). Compute 1D transform along each column of F(x,v).
3/19/2012 CS04 804B Image Processing - Module1 54
( , ) ( , ) ( , ) f x y F x v F u v
1D Row Transform 1D ColumnTransform
Fast Fourier Transform
1D-transform of M points requires order of M
2
multiplications / additions.
FFT requires order of Mlog M operations. FFT requires order of Mlog
2
M operations.
where and M=2k; k is a positive integer.
3/19/2012 CS04 804B Image Processing - Module1 55
1
0
1
( ) ( )
M
ux
M
x
F u f x W
M

=
=

2 j
M
M
W e

=
1
0
2 1
2
1
( ) ( )
1
( )
M
ux
M
x
k
ux
k
F u f x W
M
f x W

=
=

3/19/2012 CS04 804B Image Processing - Module1 56


2
0
1 1
(2 ) (2 1)
2 2
0 0
( )
2
1 1 1
(2 ) (2 1)
2
k
x
k k
u x u x
k k
x x
f x W
k
f x W f x W
k k
=

+
= =
=
(
= + +
(


2
2 (2 )
,
,
j
M
M
j u x
We have
W e
Therefore

=
3/19/2012 CS04 804B Image Processing - Module1 57
2 (2 )
(2 )
2
2
2
j u x
u x
k
k
j ux
k
ux
k
W e
e
W

=
=
=
1 1
(2 ) (2 )
2 2 2
0 0
1 1 1
( ) (2 ) (2 1)
2
k k
u x u x u
k k k
x x
F u f x W f x W W
k k

= =
(
= + +
(


1 1
2
0 0
1 1 1
(2 ) (2 1)
2
k k
ux ux u
k k k
x x
f x W f x W W
k k

= =
(
= + +
(


3/19/2012 CS04 804B Image Processing - Module1 58
0 0
2
x x
k k
= =
(


F
even
(u) F
odd
(u)
2
1
( ) ( )
2
u
even odd k
F u F u W
(
= +

1
( )
0
2 1
2 2
0
1
( ) ( )
1
( )
2
M
u k x
M
x
k
ux kx
k k
x
F u k f x W
M
f x W W
k

+
=

=
+ =
=

3/19/2012 CS04 804B Image Processing - Module1 59


1
(2 ) (2 )
2 2
0
1
(2 1) (2 1)
2 2
0
1 1
(2 )
2
1 1
(2 1)
2
k
u x k x
k k
x
k
u x k x
k k
x
f x W W
k
f x W W
k

+ +
=
(
=
(

(
+ +
(

1
2 2
2 2
0
1
2 2
2 2 2 2
0
1 1
(2 )
2
1 1
(2 1)
2
k
ux kx
k k
x
k
ux u kx k
k k k k
x
f x W W
k
f x W W W W
k

=
(
=
(

(
+ +
(

3/19/2012 CS04 804B Image Processing - Module1 60


0
2 2
2 2
2
2
2
2
2
2
, 1
1
x
j kx
kx j x
k
k
j k
k j
k
k
k
But W e e
and W e e


= = =
= = =
1
0
1
2
0
1
1 1
( ) (2 ) .1
2
1 1
(2 1) .1.( 1)
2
1 1
(2 )
k
ux
k
x
k
ux u
k k
x
k
ux
F u k f x W
k
f x W W
k
f x W

(
+ =
(

(
+ +
(

(
=

3/19/2012 CS04 804B Image Processing - Module1 61


0
1
2
0
2
1 1
(2 )
2
1 1
(2 1) ( )
2
1
( ) ( )
2
ux
k
x
k
ux u
k k
x
u
even odd k
f x W
k
f x W W
k
F u F u W
=

=
(
=
(

(
+ +
(

(
=

2
1
( ) ( ) ( )
2
u
even odd k
F u F u F u W
(
= +

Fast Fourier Transform Computation Steps
3/19/2012 CS04 804B Image Processing - Module1 62
2
1
( ) ( ) ( )
2
u
even odd k
F u k F u F u W
(
+ =

Requires only two M/2-point transforms.
Thank You Thank You
3/19/2012 CS04 804B Image Processing - Module1 63

You might also like