Professional Documents
Culture Documents
Fourier Descriptor
Fourier Descriptor
Fourier Descriptors
(Due 13.11.2009)
The Discrete Fourier Transform in
The Discrete Fourier Transform in
MATLAB (1)
MATLAB (1)
DFT
IDFT
Frequancy domain
(complex spectrum)
Time domain
(complex signal)
Signal
Reconstructe !rom
t"e spectrum A(m) .
Spectrum
#re$uency omain
representation.
%eig"t an p"ase o!
!re$uency .
Basis Function
&omplex exponential(oscillation).
#re$uency m/N o'er entire signal
0 x < N .
Forward DFT
(MATLAB fft)
Inverse DFT
(MATLAB ifft)
The Discrete Fourier Transform in
The Discrete Fourier Transform in
MATLAB (2)
MATLAB (2)
...
Real
Imaginary
The Discrete Fourier Transform in
The Discrete Fourier Transform in
MATLAB (4)
MATLAB (4)
2umerous application
)"e contour o! a 5no(n o01ect can t"ere!ore 0e recognise irrespecti'ely o! its position4
si*e an orientation
1. Data0ase (it" 5no(n
o01ect types
2. Extraction o!
o01ect contours
...
3. &omputation o! in'ariant
#ourier Descriptors
F F
1. Image (it"
un5no(n o01ects
2. Extraction o! o01ect contours
an in'ariant escriptors
...
F F
3. Recognition 0y
comparison (it" ata0ase
App%ica
App%ica
tion: eco!nisin! an' c%assif&in!
tion: eco!nisin! an' c%assif&in!
%eaves
%eaves
Database
)(o types o! lea'es are to 0e
recognise an classi!ie
App%ica
App%ica
tion: eco!nisin! an' c%assif&in!
tion: eco!nisin! an' c%assif&in!
%eaves
%eaves
Image (it" unclassi!ie o01ects
App%ica
App%ica
tion: eco!nisin! an' c%assif&in!
tion: eco!nisin! an' c%assif&in!
%eaves
%eaves
9egmente 801ects
()"res"oling)
App%ica
App%ica
tion: eco!nisin! an' c%assif&in!
tion: eco!nisin! an' c%assif&in!
%eaves
%eaves
,ea'es etecte an classi!ie
Trans%ation
Trans%ation
t
t
)ranslating U 0y t:
Derivation (Trans%ation)
Derivation (Trans%ation)
= 0:
> 0:
(9ummation o'er
perioic signal6)
All in!ormation regaring (glo0al) translation is containe in element 0 o! t"e escriptor
"han!es in (ca%e
"han!es in (ca%e
+agni!ication 0y !actor s:
Derivation ("han!es in (ca%e)
Derivation ("han!es in (ca%e)
otation
otation
Rotation 0y an angle :
(Deri'ation ientical to scale c"ange: +ultiplication 0y constant)
(tartin! point
(tartin! point
Di!!erent staring points a!!ect t"e orer o! elements in U an t"e F o0taine.
&"anging t"e starting point 0y m places (pixels):
Derivation
Derivation
((tartin! #oint an' Mirrorin!)
((tartin! #oint an' Mirrorin!)
Rotation an changes in starting point: A!!ect only t"e p"ase o! t"e escriptor
function plotFD(F)
function [G]=shiftFD(F, x, y)
x: <7)ranslation
y: =7)ranslation
function [G]=scaleFD(F,scaleFactor)
function [G]=resizeFD(F, n)
3rocesses F to o0tain G, ("ic" "as 0een s"ortene to contain only n elements (assume F
"as more t"an n elements).
function [G]=normaliseFD(F)
function [diff]=compareFD(F, G)
function [F]=extractFD(U)
)"e 'ector must 0e sorte 0e!ore !urt"er processing (+A),A- !unction sort)
)"e orer o! pixels can 0e etermine using t"e irection4 or angle4 !rom t"e
o01ect centre to eac" pixel (assume mostly con'ex o01ects).
eco!nisin! an' "%assif&in! Leaves
eco!nisin! an' "%assif&in! Leaves
(Trainin! #hase)
(Trainin! #hase)
,oa t"e example grayscale images !or 0ot" types o! lea! an segment t"em using a
t"res"ol
)"e resulting images "a'e t"e 'alue o! 1 (true) insie lea'es4 an 0 (!alse) outsie.
)"e result is a 0inary image in ("ic" lea'es4 0ranc"es an ot"er o01ects are
assigne 1 (true) an t"e 0ac5groun is 0 (!alse)
Enumerate t"e o0taine contours o! o01ects using t"e +A),A- !unction bwlabel
3lot t"e classi!ie contours4 using colour to inicate t"e classi!ication result.