Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 1
Affine invariant Fourier descriptors
Sought: a generalization of the previously introduced similarity-invariant Fourier descriptors
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 2
Geometrical transformations
translationscongruenciessimilarities
(preserves angles)
affine mappings
(preserves parallelisms)
central projections
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 3
Real, vectorial, parametric description of a closed contour
u
v
x(t) t=s
( )( )
( )u t
tv t⎡ ⎤
= ⎢ ⎥⎣ ⎦
x
possible parameterization:t=s (arc length)
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 4
Affine mapping of a contour
0 0
11 12 1
21 22 2
0
0 0
( ) ( ( ))
with: det( ) 0
Additonally starting point translation:( , )
In case arc length is used for parameterization: ( , ) ( )
Thus 7 degre
t t t
A A bA A b
t t
t t t t
τ
τ τ
= +
⎡ ⎤ ⎡ ⎤= = ≠⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
= +
x Ax b
A b A
es of freedom resultfor affine mapping!
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 5
Equivalent structures• In the equivalence class of similar maps with
equivalence relation ~ applies:
circle1 ~ circle2circle ellipseparallelogramm rectangle square
• In the equivalence class of affine maps though applies:
circle ~ ellipseparallelogramm ~ rectangle ~ square
but: circle square
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 6
Developing the contour as a periodic function into a Fourier series
2 /
2 /1
0
( )( )
( )
with the complex valued Fourier coefficient vector:
= = ( )
kj kt T
kk
Tk j kt T
k Tk t
u tt e
v t
Ut e dt
V
π
π
=+∞
=−∞
−
=
⎡ ⎤= =⎢ ⎥⎣ ⎦
⎡ ⎤⎢ ⎥⎣ ⎦
∑
∫
x X
X x
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 7
Choosing a parameterization, which guarantees a linear (homogeneous) mapping t 0→t with the effect of the
affine map A
0 0( , ) ( )t t tμ= ⋅A A
The arc length does not meet this requirement!
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 8
Non-linear map over arc length with shear of objects
t0
t
t
t0
t
T0
verticalcompression
horizontaldilation
T0/2T0/4
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 9
Choosing an appropriate parameterization
2nd possibility: Using differential invariants of first order and additionally area centre of gravity xs (semi-differential approach). Needed are:
1st possibility: Using differential invariants of second order in form of affine length. Needed are:
[ ],x x
[ ],x x
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 10
The outer (tensor) product and its geometric meaning
The outer product of two vectors [x,y] is a (signed) real number, which corresponds to the area of the included parallelogram (or: 2 times the area of the triangle)
x
y
F
Fϕ
sin( )h ϕ= xϕ
h
y
x12/ 2 sin( )F h ϕΔ = ⋅ =y y x
[ ]
[ ]
1 11 2 2 1
2 2
outer product:
, det( , ) ( ) sin( )
, 2
x yx y x y
x y
F
ϕ
Δ
= = = − =
= ⋅
x y x y x y
x y
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 11
Results from differential geometryWe differentiate the parameterization t adequately from the arc length s.For an analytical curve (which is differentiable arbitrary number of times) applies by
means of [x,y]:
( ) ( 1)
( ) ( 1)
0
( ) ( 1) 0 0(2 1) (2 1)
0 0(2 1) (2 1)
( )
(1)( )
(2)
( ) , ,
= , n 1
( ) tangential vectorwith: e.g. is
( ) ( )
n n
n n
n nn n
n n
dt
nn
n
dt s ds ds
ds
sd xds s s
μ
κ
+
+
++ +
+ +
⎡ ⎤⎡ ⎤= =⎣ ⎦ ⎣ ⎦
⎡ ⎤ ≥⎣ ⎦
==
=
A
x x Ax Ax
A x x
x xx
x n curvature vector
0 ( )dt dtμ⇒ = ⋅A( )sx( ) tangentsx
( ) normalsn ( ) = (s) =1sx n
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 12
1st possibility: Using differential invariants of second order in form of affine length
[ ]
[ ]0
0 0
( )
0 0
, ( ) affine length
( )with: ( arc length)
it applies: , ,
and thus: ( )
t t
t ds s ds
d s sds
ds ds
t t t
μ
κ
μ
= =
=
⎡ ⎤= ⋅ ⎣ ⎦
= =
∫ ∫
∫ ∫A
x x
xx
x x A x x
A A
33
C C
3 3 3
C C
3
problem for polygons: the second derivative disappears along the line and the first derivative is non-continuous in the corners and therefore the 2nd derivative is not defined!
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 13
2nd possibility: using differential invariants of first order and additionally normalization by center of gravity (COG) xs (semi-differential approach)
0
0
( )det( )
dF dFdF
α= ⋅
= ⋅
AA
The vector starting from the COG to the contour are used for parameterization (outer product of pointer and tangential vector)
[ ]0
0 00
0 0
,
,
( ) ( )
dF
s
dF
s
t F ds
ds
F tμ μ
= = −
⎡ ⎤= −⎣ ⎦
= ⋅ = ⋅
∫
∫
x x x
A x x x
A A
C
C
xs0 xs
ds0dF0
dsdF
A
[ ] [ ]
due to: det( , ) det( ( , )) det(
) det( , )
, det( ) , =
⇒ =
⋅ = ⋅
⋅
Ax Ay A x y A x yAx Ay A x y
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 14
It applies: The affine transformation maps area COG to each other and areas to each other in a constant relation!
The effect of the transformation is eliminated due to the normalization to the COG
The outer product is signed! In order to avoid ambiguities the amplitude of area increment |dF| is chosen and therefore a monotonic increasing parameterization!
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 15
Affine invariant Fourier descriptors for polygons
xN=x0
x1=xN+1
x2
x3
xN-1=x4
v
u
Fi
[ ]0 1polygon: , , , iN ii
uv⎡ ⎤
= ⎢ ⎥⎣ ⎦
x x x x…
area element
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 16
Affine invariant Fourier descriptors of polygons
[ ]
[ ] [ ]
1det( , )1 1
1 1 1 1 10 01 1
3 31 1
1 10 0
0
11 1 12
area center of gravity of the whole traverse:
, ( ) ( )( )
, ,
parameter: 0
i i
i
N N
i i i i i i i i i ii i
s N N
i i i ii i
i i i i i i
F
u v u v
t
t t u v u v
+− −
+ + + + += =
− −
+ += =
+ + +
+ − += =
=
′ ′ ′ ′= + −
∑ ∑
∑ ∑
x x
x x x x x xx
x x x x
0,1, , 1 N
ss
s
i N T t
u uuv vv
= − =
′ −⎡ ⎤⎡ ⎤′ = = − = ⎢ ⎥⎢ ⎥′ −⎣ ⎦ ⎣ ⎦x x x
…
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 17
Fourier coefficients
2
10 1
0 1 1200
11
, 1 , 1(2 )0 1
1
1 , 120
,
( )( )
( ) ( )(1 ( ))( )
( ) ( ) for 0
with:
N
i i i iTi
Nk i iT
k k i k i i ikik i i
Nj
i i k i i iki
k i
Ut t
V
Ue e t t
V t t
e t t k
e
π
π
δ
δ
−
+ +=
−+
+ += +
−
+ +=
⎡ ⎤= = + −⎢ ⎥⎣ ⎦
′ ′⎡ ⎤ −= = − − −⎢ ⎥ −⎣ ⎦
′ ′+ − − ≠
=
∑
∑
∑
X x x
x xX
x x
2 /
11
1
1 if (planar increase = 0)( )
0 if first part transforms continuitiessecond part transforms discontinuities (switch
ij kt T
i ii i
i i
e
t tt t
t t
π
δ
−
++
+
=⎧− = ⎨ ≠⎩
ing through -operator)δ
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 18
Fourier coefficients of affine distorted contours
0 0
0 0 0
0
2 /
( ) ( )( ( ))
( ( ))
thus follows:
0 (eliminates translation)
k
k
kk k
j T
t tt
t
z k
z e πτ
τ
−
= + +=
=
= ≠
=
x Ax bX x
X x
X AX
F
F
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 19
A-invariants (τ=0)
0 0 0
with:
det , det( ) det , det( )
from that result complete and minimal invariants:
det , det( )det ,
kp k p k p kp
k pkpk
pp p p
Q
∗ ∗
∗
∗
⎡ ⎤ ⎡ ⎤Δ = = ⋅ = ⋅Δ⎣ ⎦ ⎣ ⎦
⎡ ⎤Δ ⎣ ⎦= = =Δ ⎡ ⎤⎣ ⎦
X X A X X A
X X AX X det( )A
0 0 0* 0 00
0 0 0 0 0
0 0
0 1, 2, 3,
for 0 results though:
kp k p k pk
pp p p p p
k p kk k kp
U V V UQ
U V V U
p const k
Q Q z Q z
τ
∗
∗ ∗
−
Δ −= =
Δ −
= ≠ = ± ± ±
≠
= ⋅ = ⋅
…
has to be eliminated
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 20
Additional starting point invariance(τ≠0)
(special solution of second order)( ) ( )
arg( )
with:
( , ) are integral solutions ofthe following linear diophantic equation:
( ) ( ) 1 0a solution exists for:gcd( , ) 1
(solution with extended Euclid
k
k p k pk k q r
j Qk k k k
I Q
Q Q Q e
q p r p
q p r p
λ η
λ η
λ η
− −= Φ Φ
= Φ =
− + − + =
− − =ean algorithm)
These invariants are also complete and minimal!The approach realizes also a compensation of phases, which are unknown mod 2π.
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 21
1 16 7
for example:7, 6, 15
gcd(5,6) 16
5 6 1 0
holds for: 1, 1k k
k k
r q pq p
p
I
r
Q
λ η
λ η− −
= = =
− = ⎫=⎬− = ⎭
⇒ ⋅ + ⋅ + =
= = −
⇒ = Φ Φ
Also in this case one representative from the equivalence class results from the invariants, i.e. a contour in a certain location and view!Also a linear complexity results for a constant number of Fourier descriptors :
O(N)
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 22
Properties of Fourier seriesSince the parametrical description of contours still contains
discontinuities (polygon section in radial direction with planarincrease 0), the magnitude of the FC is proportional to 1/n and thus tend to 0, which is slower than for continuous functions.
|cn|
n
1/ n∼
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 23
a b c
0 2 2 5 5 2 2 7 7(5) 0 3 2 mit: 0,5
0 0 5 5 7 7 9 9 11 11 1 3⎡ ⎤ ⎡ ⎤′ = ⋅ = =⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
F A F F A
Affine invariant Fourier descriptors
n a b c-5 0.107 0.004 0.146 -0.001 -0.086 0.284 0.075 0.094 0.075 -4 -0.006 -0.034 -0.047 -0.058 -0.086 0.311 0.057 0.084 0.057 -3 -0.036 -0.055 -0.001 -0.074 0.126 0.481 0.029 0.014 0.029 -2 0.283 -0.477 0.227 -0.490 -1.560 0.392 0.315 0.290 0.315 -1 -0.263 -0.779 -0.178 -0.733 -5.370 0.661 0.000 0.000 0.000 0 --- --- --- --- --- --- --- --- --- 1 -1,120 -1,730 -1,090 -1,650 0,743 -7,330 1,000 1,000 1,0002 -0.024 -0.375 -0.064 -0.467 0.927 -0.751 0.229 0.252 0.229 3 -0.169 -0.104 -0.191 -0.096 0.702 0.030 0.104 0.111 0.104 4 -0.081 0.182 -0.063 0.175 0.476 -0.385 0.119 0.126 0.119 5 0.066 -0.020 0.057 0.014 0.046 -0.201 0.061 0.059 0.061
Invariantena b c
Fourierkoeffizientena b c
ME-II, Kap. 4eH. Burkhardt, Institut für Informatik, Universität Freiburg 24
Power spectra of the difference of the invariants of both objects
difference for real affine map considering the quantization error
difference for real structure changes
Affine invariant Fourier descriptorsGeometrical transformationsReal, vectorial, parametric description of a closed contourAffine mapping of a contourEquivalent structuresDeveloping the contour as a periodic function into a Fourier seriesChoosing a parameterization, which guarantees a linear (homogeneous) mapping t 0t with the effect of the affine map A Non-linear map over arc length with shear of objectsChoosing an appropriate parameterizationThe outer (tensor) product and its geometric meaningResults from differential geometryAffine invariant Fourier descriptors for polygonsAffine invariant Fourier descriptors of polygonsFourier coefficients Fourier coefficients of affine distorted contoursA-invariants (=0)Additional starting point invariance�(0)�(special solution of second order)Properties of Fourier seriesPower spectra of the difference of the invariants of both objects