View
214
Download
0
Embed Size (px)
Citation preview
Projective 2D geometry
Appunti basati sulla parte iniziale del testo di R.Hartley e A.Zisserman “Multiple view geometry” Rielaborazione di materiale di M.Pollefeys
• Points, lines & conics• Transformations & invariants
• 1D projective geometry and the Cross-ratio
Projective 2D Geometry
Homogeneous coordinates
0 cbyax Ta,b,c
0,0)()( kkcykbxka TT a,b,cka,b,c ~
Homogeneous representation of lines
equivalence class of vectors, any vector is representative
Set of all equivalence classes in R3(0,0,0)T forms P2
Homogeneous representation of points
0 cbyax Ta,b,cl Tyx,x on if and only if
0l 11 x,y,a,b,cx,y, T 0,1,,~1,, kyxkyx TT
The point x lies on the line l if and only if xTl=lTx=0
Homogeneous coordinates
Inhomogeneous coordinates Tyx, T321 ,, xxx but only 2DOF
Points from lines and vice-versa
l'lx
Intersections of lines
The intersection of two lines and is l l'
Line joining two points
The line through two points and is x'xl x x'
Example
1x
1y
Line joining two points: parametric equation A point on the line through two points x and x’ is y = x + x’
Ideal points and the line at infinity
T0,,l'l ab
Intersections of parallel lines
TTand ',,l' ,,l cbacba
Example
1x 2x
Ideal points T0,, 21 xx
Line at infinity T1,0,0l
l22 RP
tangent vector
normal direction
ab , ba,
Note that in P2 there is no distinction
between ideal points and others
A model for the projective plane
exactly one line through two points
exaclty one point at intersection of two lines
Duality
x l
0xl T0lx T
l'lx x'xl
Duality principle:
To any theorem of 2-dimensional projective geometry there corresponds a dual theorem, which may be derived by interchanging the role of points and lines in the original theorem
Conics
Curve described by 2nd-degree equation in the plane
022 feydxcybxyax
0233231
2221
21 fxxexxdxcxxbxax
3
2
3
1 , xxyx
xx or homogenized
0xx CT
or in matrix form
fed
ecb
dba
2/2/
2/2/
2/2/
Cwith
fedcba :::::5DOF:
Five points define a conic
For each point the conic passes through
022 feydxcyybxax iiiiii
or
0,,,,, 22 cfyxyyxx iiiiii Tfedcba ,,,,,c
0
1
1
1
1
1
552555
25
442444
24
332333
23
222222
22
112111
21
c
yxyyxx
yxyyxx
yxyyxx
yxyyxx
yxyyxx
stacking constraints yields
Pole-polar relationship
The polar line l=Cx of the point x with respect to the conic C intersects the conic in two points. The two
lines tangent to C at these points intersect at x
Polarity: cross ratio
Cross ratio of 4 colinear points y = x + x’ (with i=1,..,4)
ratio of ratios
i i
42
32
41
31
θ- θ
θ- θθ- θ
θ- θ
Harmonic 4-tuple of colinear points: such that CR=-1
Polarity: conjugacyGiven a point y and a conic C, a point z is conjugated of y wrt C
if the 4-tuple (y,z,x’ ,x’’ ) is harmonic, where x’ and x’’ are the intersection points between C and line (y,z).
Intersection points (y+z) C (y +z) = 0 is a 2-nd degree equation on y Cy + 2 y Cz + z Cz = 0 --> two solutions ’and’’.
Since y and z correspond to and , harmonic -> ’+ ’’ = 0Hence the two solutions sum up to zero: y Cz = 0, and also z Cy = 0
the point z is on the line Cy, which is called the polar line of y wrt Cthe polar line Cy is the locus of the points conjugate of y wrt C
Conic C is the locus of points belonging to their own polar line y Cy = 0
TTTT 2
T T
T
Correlations and conjugate points
A correlation is an invertible mapping from points of P2 to lines of P2. It is represented by a 3x3 non-singular matrix A as l=Ax
Conjugate points with respect to C(on each others polar)
0xy CT
Conjugate lines with respect to C*
(through each others pole)
0ml * CT
Polarity and tangent linesConsider a line through a point y, tangent to a conic C:let us determine the point z conjugate of y wrt C:
since the intersection points coincide, then ’’’ harmonic 4-tuple: also z coincides with the tangency point
All points y on the tangent are conjugate to tangency point z wrt C
polar line of a point z on the conic C is tangent to C through z In addition: since there are two tangents to C through a point y not
on C,both tangency points are conjugate to y wrt C
polar line of y wrt C (=locus of the conjugate points) = line through the two tangency points of lines through y
Dual conics0ll * CT
A line tangent to the conic C satisfies
Dual conics = line conics = conic envelopes
1* CCIn general (C full rank): in fact
Line l is the polar line of y : y = C l , but since y Cy = 0
l C C C l = 0 C = C = C
-1 T
-T -1T -T* -1
Degenerate conics
A conic is degenerate if matrix C is not of full rank
TT mllm C
e.g. two lines (rank 2)
e.g. repeated line (rank 1)
TllC
l
l
m
Degenerate line conics: 2 points (rank 2), double point (rank1)
CC **Note that for degenerate conics
Projective transformations
A projectivity is an invertible mapping h from P2 to itself such that three points x1,x2,x3 lie on the same line if and
only if h(x1),h(x2),h(x3) do.
Definition:
A mapping h:P2P2 is a projectivity if and only if there exist a non-singular 3x3 matrix H such that for any point in P2 represented by a vector x it is true that h(x)=Hx
Theorem:
Definition: Projective transformation
3
2
1
333231
232221
131211
3
2
1
'
'
'
x
x
x
hhh
hhh
hhh
x
x
x
xx' Hor
8DOF
projectivity=collineation=projective transformation=homography
Removing projective distortion
333231
131211
3
1
'
''
hyhxh
hyhxh
x
xx
333231
232221
3
2
'
''
hyhxh
hyhxh
x
xy
131211333231' hyhxhhyhxhx 232221333231' hyhxhhyhxhy
select four points in a plane with known coordinates
(linear in hij)
(2 constraints/point, 8DOF 4 points needed)
Remark: no calibration at all necessary, better ways to compute (see later)
Transformation of lines and conics
Transformation for lines
ll' -TH
Transformation for conics-1-TCHHC '
Transformation for dual conicsTHHCC **'
xx' HFor a point transformation
A hierarchy of transformations
Projective linear group Affine group (last row (0,0,1)) Euclidean group (upper left 2x2 orthogonal) Oriented Euclidean group (upper left 2x2 det 1)
Alternative, characterize transformation in terms of elements or quantities that are preserved or invariant
e.g. Euclidean transformations leave distances unchanged
Class I: Isometries(iso=same, metric=measure)
1100
cossin
sincos
1
'
'
y
x
t
t
y
x
y
x
1
11
orientation preserving:orientation reversing:
x0
xx'
1
tT
RHE IRR T
special cases: pure rotation, pure translation
3DOF (1 rotation, 2 translation)
Invariants: length, angle, area
Class II: Similarities(isometry + scale)
1100
cossin
sincos
1
'
'
y
x
tss
tss
y
x
y
x
x0
xx'
1
tT
RH
sS IRR T
also know as equi-form (shape preserving)
metric structure = structure up to similarity (in literature)
4DOF (1 scale, 1 rotation, 2 translation)
Invariants: ratios of length, angle, ratios of areas, parallel lines
Class III: Affine transformations
11001
'
'
2221
1211
y
x
taa
taa
y
x
y
x
x0
xx'
1
tT
AH A
non-isotropic scaling! (2DOF: scale ratio and orientation)
6DOF (2 scale, 2 rotation, 2 translation)
Invariants: parallel lines, ratios of parallel segment lengths, ratios of areas
DRRRA
2
1
0
0
D
))(( TTT VDVUVUDVA
where
Action of affinities and projectivities
on line at infinity
2211
2
1
2
1
0v
xvxvx
xx
x
vAA
T
t
000 2
1
2
1
x
xx
x
vAA
T
t
Line at infinity becomes finite,
allows to observe vanishing points, horizon,
Line at infinity stays at infinity,
but points move along line
Class VI: Projective transformations
xv
xx'
vP T
tAH
Action: non-homogeneous over the plane
8DOF (2 scale, 2 rotation, 2 translation, 2 line at infinity)
Invariants: cross-ratio of four points on a line
(ratio of ratio)
T21,v vv
Decomposition of projective transformations
vv
sPAS TTTT v
t
v
0
10
0
10
t AIKRHHHH
Ttv RKA s
K 1det Kupper-triangular,decomposition unique (if chosen s>0)
0.10.20.1
0.2242.8707.2
0.1586.0707.1
H
121
010
001
100
020
015.0
100
0.245cos245sin2
0.145sin245cos2
H
Example:
Overview transformations
1002221
1211
y
x
taa
taa
1002221
1211
y
x
tsrsr
tsrsr
333231
232221
131211
hhh
hhh
hhh
1002221
1211
y
x
trr
trr
Projective8dof
Affine6dof
Similarity4dof
Euclidean3dof
Concurrency, collinearity, order of contact (intersection, tangency, inflection, etc.), cross ratio
Parallellism, ratio of areas, ratio of lengths on parallel lines (e.g midpoints), linear combinations of vectors (centroids). The line at infinity l∞
Ratios of lengths, angles.The circular points I,J
lengths, areas.
Number of invariants?
The number of functional invariants is equal to, or greater than, the number of degrees of freedom of the configuration less the number of degrees of freedom of the transformation
e.g. configuration of 4 points in general position has 8 dof (2/pt)
and so 4 similarity, 2 affinity and zero projective invariants
Projective geometry of 1D
x'x 22H
The cross ratio
Invariant under projective transformations
T21, xx
3DOF (2x2-1)
02 x
4231
43214321 x,xx,x
x,xx,xx,x,x,x Cross
22
11detx,x
ji
ji
ji xx
xx
Recovering metric and affine properties from images
• Parallelism• Parallel length ratios
• Angles • Length ratios
The line at infinity
l
1
0
0
1
0ll
TT
TT
At
AH A
The line at infinity l is a fixed line under a projective transformation H if and only if H is an affinity
Note: not fixed pointwise
Affine properties from images
projection rectification
AP
lll
HH
321
010
001
' 0,l' 3321 llll T
in fact, any point x on l’ is mapped to a point at the ∞ ∞
The circular points
0
1
I i
0
1
J i
I
0
1
0
1
100
cossin
sincos
II
iseitss
tssi
y
x
S
H
The circular points I, J are fixed points under the projective transformation H iff H is a similarity
The circular points
“circular points”
0233231
22
21 fxxexxdxxx 02
221 xx
l∞
T
T
0,,1J
0,,1I
i
i
TT 0,1,00,0,1I iAlgebraically, encodes orthogonal directions
03 x
Intersection points between any circle and l∞
Conic dual to the circular points
TT JIIJ* C
000
010
001*C
TSS HCHC **
The dual conic is fixed conic under the projective transformation H iff H is a similarity
*C
Note: has 4DOF
l∞ is the null vector
*C
A line conic: set of lines through any of the circular points
Angles
mmll
mlcos
**
*
22
21
22
21
2211
CC
CTT
T
mmll
mlml
T321 ,,l lll T321 ,,m mmmEuclidean:
Projective: m''m'l''l'
m''l'cos
**
*
CC
CTT
T
0m'l * CT (orthogonal)
m''l'm'l'ml *** CHHCC TTTTin fact, e.g.
Metric properties from images
vvv
v
'
*
*
**
TT
TT
T
TT
T
K
KKK
HHCHH
HHHCHHH
HHHCHHHC
APAP
APSSAP
SAPSAP
TUUC
000
010
001
'*
Rectifying transformation from SVD
UH
Normally: SVD (Singular Value Decomposition)
TUVC
c
b
a
00
00
00
'*
But is symmetric '*C '' **
CVDUUDVC TTT
and SVD is unique VU
with U and V orthogonal
TUUC
000
010
001
'*Why ?
Observation : H=Uorthogonal (3x3): not a P2 isometry
Once the image has been affinely rectified
TAA HCHC ** '
0000
010
001
'*
T
T
T
T
T 1t1
t
0
0KK0K
0
KC
Metric from affine
Metric from projective
0c,,,,, 332332133122122111 5.05.05.0 mlmlmlmlmlmlmlmlml
0vvv
v
3
2
1
321
m
m
m
lllTT
TT
K
KKK
Projective conic classificationTUDUC -TCUUD 1
321321321 ,,diag,,diag,,diag ssseeesssD0or 1ie
Diagonal Equation Conic type
(1,1,1) improper conic
(1,1,-1) circle
(1,1,0) single real point
(1,-1,0) two lines
(1,0,0) single line
0222 wyx
0222 wyx
022 yx
022 yx
02 x