Image Processing - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Image Processing

Description:

Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform ... Image Processing Author: Hagit Hel-Or Description: Handouts Last modified by: – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 39
Provided by: Hagit5
Category:

less

Transcript and Presenter's Notes

Title: Image Processing


1
Image Processing
Fourier Transform 1D
  • Efficient Data Representation
  • Discrete Fourier Transform - 1D
  • Continuous Fourier Transform - 1D
  • Examples

2
The Fourier Transform
Jean Baptiste Joseph Fourier
3
Efficient Data Representation
  • Data can be represented in many ways.
  • There is a great advantage using an appropriate
    representation.
  • Examples
  • Equalizers in Stereo systems.
  • Noisy points along a line
  • Color space red/green/blue v.s. Hue/Brightness

4
Why do we need representation in the frequency
domain?
Relatively easy solution
Problem in Frequency Space
Solution in Frequency Space
Inverse Fourier Transform
Fourier Transform
Difficult solution
Solution of Original Problem
Original Problem
5
How can we enhance such an image?
6
Solution Image Representation
2 1 3 5 8 7 0 3 5

2
1

3
...
5
3
23

7
...
10
7
Transforms
  1. Basis Functions.
  2. Method for finding the image given the transform
    coefficients.
  3. Method for finding the transform coefficients
    given the image.

Grayscale Image
Transformed Image
V Coordinates
Y Coordinate
U Coordinates
X Coordinate
8
Representation in different bases
  • It is possible to go back and forth between
    representations

u1
v1
a
u2
v2
9
The Inner Product
  • Discrete vectors (real numbers)
  • Discrete vectors (complex numbers)
  • The vector aH denotes the conjugate
  • transpose of a.
  • Continuous functions

10
The Fourier basis functions
Basis Functions are sines and cosines
sin(x)
cos(2x)
sin(4x)
The transform coefficients determine the
amplitude and phase
a sin(2x)
2a sin(2x)
-a sin(2x?)
11
Every function equals a sum of sines and cosines

A
3 sin(x)
1 sin(3x)
B
AB
0.8 sin(5x)
C
ABC
0.4 sin(7x)
D
ABCD
12
Sum of cosines only symmetric
functions Sum of sines only
antisymmetric functions


D
-D
13
Fourier Coefficients
Terms are considered in pairs
Ckcos(kx) Sksin(kx) Rk sin(kx qk)
Using Complex Numbers
eikx
cos(kx) , sin(kx)
Ckcos(kx) Sksin(kx) R ei? eikx
Amplitudephase
14
The 1D Continues Fourier Transform
  • The Continuous Fourier Transform finds the F(?)
    given the (cont.) signal f(x)
  • Bw(x)ei2pwx is a complex wave function for each
    (continues) given w .
  • The inverse Continuous Fourier Transform composes
    a signal f(x) given F(?)
  • F(?) and f(x) are continues.

15
Continuous vs sampled Signals
Sampling Move from f(x) (x ? R) to f(xj)
(j? Z) by sampling at equal intervals.
f(x0), f(x0Dx), f(x02Dx), .... , f(x0n-1Dx),
Given N samples at equal intervals, we redefine
f as
f(j) f(x0jDx) j 0, 1, 2, ... , N-1
f(j) f(x0 jDx)
f(x)
f(x03Dx)
f(2)
4 3 2 1
4 3 2 1
f(3)
f(x02Dx)
f(1)
f(x0Dx)
f(x0)
f(0)
0 0.25 0.5 0.75 1.0 1.25
0 1 2 3
16
  • The discrete basis functions are
  • For frequency k the Fourier coefficient is

17
The Discrete Fourier Transform (DFT)
k 0, 1, 2, ..., N-1
Matlab Ffft(f)
The Inverse Discrete Fourier Transform (IDFT) is
defined as
x 0, 1, 2, ..., N-1
Matlab Fifft(f)
Remark Normalization constant might be different!
18
Discrete Fourier Transform - Example
f(x) 2 3 4 4
3
3
F(0) S f(x) e S f(x) 1
x0
x0
(f(0) f(1) f(2) f(3)) (2344)
13
DFT of 2 3 4 4 is 13 (-2i) -1
(-2-i)
19
The Fourier Transform - Summary
  • F(k) is the Fourier transform of f(x)
  • f(x) is the inverse Fourier transform of F(k)
  • f(x) and F(k) are a Fourier pair.
  • f(x) is a representation of the signal in the
    Spatial Domain and F(k) is a representation in
    the Frequency Domain.

20
  • The Fourier transform F(k) is a function over the
    complex numbers
  • Rk tells us how much of frequency k is needed.
  • ?k tells us the shift of the Sine wave with
    frequency k.
  • Alternatively
  • ak tells us how much of cos with frequency k is
    needed.
  • bk tells us how much of sin with frequency k is
    needed.

21
The Frequency Domain
f(x)
x
The signal f(x)
Rk
?k
k
k
Amplitude (spectrum) and Phase
Real
Imag
k
k
Real and Imaginary
22
  • Rk - is the amplitude of F(k).
  • ?k - is the phase of F(k).
  • Rk2F(k) F(k) - is the power spectrum of F(k)
    .
  • If a signal f(x) has a lot of fine details Rk2
    will be high for high k.
  • If the signal f(x) is "smooth" Rk2 will be
    low for high k.


3 sin(x)
1 sin(3x)
0.8 sin(5x)
0.4 sin(7x)
23
Demo
24
Examples
The Delta Function
  • Let

0
Fourier
R
Real
?
?
?
Imag
?
?
25
The Constant Function
  • Let

f(x)
x
0
Fourier
R
Real
?
?
0
0
?
Imag
?
?
26
A Basis Function
  • Let

f(x)
x
0
Fourier
R
Real
?
?
?0
?0
?
Imag
?
?
27
The Cosine wave
  • Let

f(x)
Fourier
x
R
Real
?
?
-?0
?0
-?0
?0
?
Imag
?
?
28
The Sine wave
  • Let

x
Fourier
R?
Real
?
?
-?0
?0
??
Imag
?/2
?0
?
?
-?0
-?/2
29
The Window Function (rect)
  • Let

f(x)
x
-0.5
0.5
Fourier
R?
?
30
Proof
F(w)
sinc(w)
w
31
The Gaussian
  • Let

f(x)
x
Fourier
R?
?
32
The Comb Function
  • Let

f(x)
ck(x)
x
Fourier
R?
C1/k(?)
?
33
Properties of The Fourier Transform
  • Linearity
  • Distributive (additivity)
  • DC (average)
  • Symmetric
  • If f(x) is real then,

34
Distributive
f(x)
F(?)
x
?
g(x)
G(?)
x
?
fg
F(?)G(?)
x
?
35
Transformations
  • Translation
  • The Fourier Spectrum remains unchanged
    under translation
  • Scaling

36
Example - Translation
1D Image
real(F(u))
imag(F(u))
F(u)
1
10
10
10
0.8
5
5
8
0.6
0
0
6
0.4
-5
-5
4
0.2
-10
-10
2
0
-15
-15
0
0
50
100
0
50
100
0
50
100
0
50
100
Translated
1
10
10
10
0.8
5
5
8
0.6
0
0
6
0.4
-5
-5
4
0.2
-10
-10
2
0
-15
-15
0
0
50
100
0
50
100
0
50
100
0
50
100
10
10
10
5
5
5
Differences
0
0
0
-5
-5
-5
-10
-10
-10
-15
-15
-15
0
50
100
0
50
100
0
50
100
37
Change of Scale- 1D
f(x)
F(?)
x
?
f(x)
F(?)
x
?
f(x)
F(?)
x
?
38
Change of Scale
f(x)
F(?)
x
?
0.5 F(?/2)
f(2x)
x
?
f(x/2)
2 F(2?)
x
?
Write a Comment
User Comments (0)
About PowerShow.com