Escolar Documentos
Profissional Documentos
Cultura Documentos
Image Processing
And a little
Digital Signal Processing
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
m =+ ∞ n=+ ∞
F (ω 1 , ω 2 ) = ∑ ∑
m =− ∞ n=− ∞
f ( m, n)e − jω 1 m − j ω 2 n
e
π π
1
∫ ∫
jω 1m jω 2 n
f ( m, n) = F (ω ω ) e e dω 1 dω 2
2π ω 1 = − π ω 2 =− π
1 2
Examples
Examples
Examples
MatLab Code
• r2=imread('d:\images\2rect.jpg');
• r2f=fft2(r2);
• imshow(log(abs(r2f)),[3 10]); colormap(jet); colorbar
Discrete Fourier Transform
• Digital sampling of FT
• Fast Fourier Transform
• f(m,n) defined over 0 =< m,n =< M-1,N-1
• DFT
M − 1N− 1 2π 2π
− j pm − j qn
F ( p, q ) = ∑ ∑ f ( m, n)e M
e N
p=0 n=0
First 56 periodic basis patterns in the DFT
Inverse DFT
1 M − 1N − 1
(
j 2π )pm j (2π N )qn
f ( m, n) =
MN
∑ ∑ F ( p, q ) e
p =0 q =0
M
e
Why use Fourier?
• Fast convolution
– Convolution in image domain is multiplication in
Fourier 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
Phase and Amplitude
• In Fourier space an image has two
pieces of information jϕ a
ra e
– 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
Amplitude Phase Amplitude
RANDOM SIGNALS
• A Random Process
– A model for a digital signal
• A signal is a probabilistic combination of
multiple random signals (c.f. Fourier)
• Given a signal we need to estimate its
underlying Probability law.
Correlation and Power Spectra
• We often want to analyse images according
to 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…
• Autocorrelation
Q− 1 Q − 1
R ff (m, n; m′ )=∑
, n′ ∑ f q f q′p(q, q′
; m, n;m′
, n′
)
q = 0 q′
=0
• Autocovariance
M− 1N− 1
1
C ff ( m, n) =
MN
∑ ∑ (F
m′
= 0 n′
=0
m′
n′ − Fm′n′)( Fm′+ m, n′+ n − Fm′+ m, n′+ n )
Where: