mathematics - fouriertransform in image processing
TRANSCRIPT
-
8/14/2019 Mathematics - FourierTransform in Image Processing
1/23
The Fourier Transform in
Image ProcessingAnd a little
Digital Signal Processing
-
8/14/2019 Mathematics - FourierTransform in Image Processing
2/23
The Basics
Image as a function f(m,n) = grey level
Alternative transforms make certain types of image manipulation easier
The Fourier Transform Image processing
Image restoration
Image filtering
Image analysis
-
8/14/2019 Mathematics - FourierTransform in Image Processing
3/23
This is the 2-D Fourier transform:
1 and 2 are frequencies (- =< =< radians) F(1,2) is the frequency domain
representation of the image
F(0,0) is the sum of all frequencies
+=
=
+=
==
n
n
njmjm
meenmfF 21),(),( 21
-
8/14/2019 Mathematics - FourierTransform in Image Processing
4/23
Inverse Fourier Transform
= =
=
1 2
21
2121 )(21),( ddeeFnmf njmj
-
8/14/2019 Mathematics - FourierTransform in Image Processing
5/23
Examples
-
8/14/2019 Mathematics - FourierTransform in Image Processing
6/23
Examples
-
8/14/2019 Mathematics - FourierTransform in Image Processing
7/23
Examples
-
8/14/2019 Mathematics - FourierTransform in Image Processing
8/23
MatLab Code
r2=imread('d:\images\2rect.jpg');
r2f=fft2(r2);
imshow(log(abs(r2f)),[3 10]); colormap(jet); colorbar
-
8/14/2019 Mathematics - FourierTransform in Image Processing
9/23
Discrete Fourier Transform
Digital sampling of FT
Fast Fourier Transform
f(m,n) defined over 0 =< m,n =< M-1,N-1 DFT
=
=
=
1
0
1
0
22
),(),(M
p
N
n
qnN
jpmM
j
eenmfqpF
-
8/14/2019 Mathematics - FourierTransform in Image Processing
10/23
First 56 periodic basis patterns in the DFT
-
8/14/2019 Mathematics - FourierTransform in Image Processing
11/23
Inverse DFT
( ) ( )
=
==
1
0
1
0
22
),(1
),(
M
p
N
q
qn
N
jpm
M
j
eeqpFMNnmf
-
8/14/2019 Mathematics - FourierTransform in Image Processing
12/23
Why use Fourier?
Fast convolution
Convolution in image domain is multiplication inFourier domain
Linear filter convolution
Filters designed according to frequency response
Locating features (template match)
Rotate filter by 180 degrees
Convolve with test image
Peaks indicate matches
-
8/14/2019 Mathematics - FourierTransform in Image Processing
13/23
Phase and Amplitude
In Fourier space an image has twopieces of information
Amplitude (real) Strength of the wave front
Information on the frequencies in the the image
Phase (complex) Position within the wave front
Information in the structure within the image
aj
a er
-
8/14/2019 Mathematics - FourierTransform in Image Processing
14/23
Amplitude AmplitudePhase
-
8/14/2019 Mathematics - FourierTransform in Image Processing
15/23
RANDOM SIGNALS
A Random Process
A model for a digital signal
A signal is a probabilistic combination ofmultiple random signals (c.f. Fourier)
Given a signal we need to estimate itsunderlying Probability law.
-
8/14/2019 Mathematics - FourierTransform in Image Processing
16/23
Correlation and Power Spectra
We often want to analyse images accordingto their statistical content
Signal Noise can be produced by
Signal Processing with finite length buffers Systems with stochastic outputs
Noise cannot be modelled by a function
Images represented in terms statistical
combination of discrete time signals These do not have a Fourier Transform
Some properties can be modelled
-
8/14/2019 Mathematics - FourierTransform in Image Processing
17/23
Autocorrelation
Probability of measuring grey value q at (m,n) andq at (m,n)
Autocovariance
Remove the average of the signal and thencalculate correlation
),;,;,(),;,(1
0
1
0
nmnmqqpffnmnmRQ
q
Q
q
qqff=
=
=
))((1
),( ,,
1
0
1
0
nnmmnnmm
M
m
N
n
nmnmff FFFFMN
nmC ++++
=
= =
-
8/14/2019 Mathematics - FourierTransform in Image Processing
18/23
We can get Fourier transform of
Autocovariance Describes the distribution of power across
the frequency range
Effect of linear filters on stochastic signals
can be described in terms of the effect onthe autocovariance function
Digital Signal Processing
Design and analysis of filters for signals
and systems.
-
8/14/2019 Mathematics - FourierTransform in Image Processing
19/23
Discrete Cosine Transform
Inverse Discrete Cosine Transform
-
8/14/2019 Mathematics - FourierTransform in Image Processing
20/23
DCT Image seen as the combination of MxN
functions
If we perform the DCT in 8*8 functionwindows the Bpq are the weights applied tothe 64 basis functions
Used in JPEG Image broken into 8*8
DCT
Coded Coefficients sent
Inverse DCT Try dctdemo in matlab
-
8/14/2019 Mathematics - FourierTransform in Image Processing
21/23
Radon Transform
Compute Projections of objects inimages
Similar to the Hough transform find
lines and shapes
-
8/14/2019 Mathematics - FourierTransform in Image Processing
22/23
Radon Transform for any
+= ydyxyxfxR )cossin,sincos()(
Where:
=
y
x
y
x
cossin
sincos
-
8/14/2019 Mathematics - FourierTransform in Image Processing
23/23
Find straight lines
Edge detect image
Perform radon transform for all angles
Peaks in Radon Transform representstraight lines
Matlab function radon(Image, angle)