Ref 3
Ref 3
3
Basic projective geometry
Thomas Opsahl
TEK5030
Motivation
fu s cu 1 0 0 0
u = 0 fv cv 0 1 0 0 x
0 0 1 0 0 1 0
“Equal up to scale”
2
TEK5030
Motivation
4
TEK5030
Motivation
2
• Projective geometry is an alternative to
Euclidean geometry x =x R −1 ( y − t )
5
TEK5030
Points in the projective plane ℙ2
How to describe points in the plane?
6
TEK5030
Points in the projective plane ℙ2
How to describe points in the plane?
Euclidean plane ℝ2
• Choose a 2D coordinate frame
• Points have 2 unique coordinates
x
=
x ∈ 2
y x y
x
2
7
TEK5030
Points in the projective plane ℙ2
How to describe points in the plane?
Euclidean plane ℝ2
x • Choose a 2D coordinate frame
2 • Points have 2 unique coordinates
w
x
=
x ∈ 2
y x y
x
Projective plane 2
2 • Expand coordinate frame to 3D
y • Points have 3 homogeneous coordinates
x
w = 1 x y ∈ 2
=
x
w
where
x λ x ∀λ ∈ \ {0}
=
8
TEK5030
Points in the projective plane ℙ2
Observations
1. Any point 𝐱𝐱 = 𝑥𝑥, 𝑦𝑦 𝑇𝑇 in the Euclidean
plane has a corresponding
x homogeneous point 𝐱𝐱� = 𝑥𝑥, 𝑦𝑦, 1 𝑇𝑇 in the
2 projective plane
w
w = 1
x
9
TEK5030
Points in the projective plane ℙ2
Observations
3. When we work with geometrical
problems in the plane, we can swap
x between the Euclidean representation
2 and the projective representation
w
2 → 2
y x
x
x x y
y
2 1
y
2 → 2
w = 1
x x x
y w
y
w
w 10
TEK5030
Lines in the projective plane ℙ2
How to describe lines in the plane?
11
TEK5030
Lines in the projective plane ℙ2
How to describe lines in the plane?
Euclidean plane ℝ2
• 3 parameters 𝑎𝑎, 𝑏𝑏, 𝑐𝑐 ∈ ℝ
𝑙𝑙 = 𝑥𝑥, 𝑦𝑦 | 𝑎𝑎𝑎𝑎 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐 = 0
y
l
x
2
12
TEK5030
Lines in the projective plane ℙ2
How to describe lines in the plane?
Euclidean plane ℝ2
• 3 parameters 𝑎𝑎, 𝑏𝑏, 𝑐𝑐 ∈ ℝ
2 𝑙𝑙 = 𝑥𝑥, 𝑦𝑦 | 𝑎𝑎𝑎𝑎 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐 = 0
w
y Projective plane 2
l • Homogeneous vector 𝐥𝐥̃ = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐 𝑇𝑇
x 𝑙𝑙 = 𝐱𝐱� ∈ 2 | ̃𝐥𝐥𝑇𝑇 𝐱𝐱� = 0
2
y
w = 1 l
x
13
TEK5030
Lines in the projective plane ℙ2
Observations
1. Points and lines in the projective plane
have the same representation, we say
that points and lines are dual objects in
2 2
w
14
TEK5030
Lines in the projective plane ℙ2
Properties of lines in the projective plane
1. In the projective plane, all lines
intersect, parallel lines intersect at
infinity
2
w
Two lines 𝐥𝐥̃1 and 𝐥𝐥̃2 intersect in the point
y 𝐱𝐱� = 𝐥𝐥̃1 ×𝐥𝐥̃2
l
x 2. The line passing through points 𝐱𝐱�1 and
2 𝐱𝐱� 2 is given by
y 𝐥𝐥̃ = 𝐱𝐱�1 ×𝐱𝐱� 2
w = 1 l
x
15
TEK5030
Example 1
x1 = ( 2, 4 )
x2 = ( 5,13)
16
TEK5030
Matrix representation of
the cross product
Example 1 u × v u∧ v
x1 = ( 2, 4 )
x2 = ( 5,13) where
∧
Determine the line passing through the two points 𝐱𝐱 𝟏𝟏 and 𝐱𝐱 𝟐𝟐 u1 def 0 −u3 u2
u
= u 0 −u1
2 3
Homogeneous representation of the points u3 −u2 u1 0
2 5
x 1 = 4 ∈ 2 x 2 = 13 ∈ 2
1 1
Homogeneous representation of line
0 −1 4 5 −9 −3
l = x × x = x ∧ x = 1 0 −2 13 = 3 = 1
1 2 1 2
−4 2 0 1 6 2
Equation of the line
−3 x + y + 2 = 0 ⇔ y = 3 x − 2
17
TEK5030
Example 2
y= x − 2
y= −2 x + 3
18
TEK5030
Example 2
y= x − 2
y= −2 x + 3
1 −2
y =x − 2 l1 = −1 ∈ 2 y=−2 x + 3 l2 =− 1 ∈ 2
−2 3
Point of intersection
0 2 −1 −2 −5 −5
−3 1.67
x =l1 × l2 =l1∧ l2 = −2 0 −1 −1 = 1 ⇒ =x ≈
−
1 0.33
1 1 0 3 −3 −3
19
TEK5030
Example 3
y= x − 2
y= x + 3
20
TEK5030
Example 3
y= x − 2 Euclidean geometry
y= x + 3 Parallel lines never intersect!
21
TEK5030
Example 3
y= x − 2 Euclidean geometry
y= x + 3 Parallel lines never intersect!
1 1
y =x − 2 l1 = −1 ∈ 2 y =x + 3 l2 = −1 ∈ 2
−2 3
Point of intersection
22
TEK5030
Example 4
Cameras can observe points that are
“infinitely” far away
x
fu s cu 1 0 0 0
u = 0 cv 0 1 0 0
y
fv
z
0 0 1 0 0 1 0
0
23
TEK5030
Example 4
Cameras can observe points that are
“infinitely” far away
x
fu s cu 1 0 0 0
u = 0 cv 0 1 0 0
y
fv
z
0 0 1 0 0 1 0 The line at infinity
0
24
TEK5030
Example 4
25
TEK5030
Linear transformations of the projective plane ℙ2
26
TEK5030
Linear transformations of the projective plane ℙ2
Euclidean R t 3 Lengths
0T 1
+ all below
Similarity sR t 4 Angles
0T 1 s∈ + all below
Affine a11 a12 a13 6 Parallelism, line at
a a22 a23 infinity
21 + all below
0 0 1
Homography h11 h12 h13 8 Straight lines
h h22 h23
21
h31 h32 h33
27
TEK5030
Linear transformations of the projective plane ℙ2
R t
H= T
0 1
t=0
28
TEK5030
Linear transformations of the projective plane ℙ2
R t
H= T
0 1
t≠0
29
TEK5030
Linear transformations of the projective plane ℙ2
sR t
H= T
0 1
t=0
s <1
R=I
30
TEK5030
Linear transformations of the projective plane ℙ2
image u x
c
u 𝑥𝑥 𝑧𝑧
v
Flat surface with a 2D
𝑦𝑦 coordinate frame
31
TEK5030
Linear transformations of the projective plane ℙ2
Hx 1 = y 2
1
2
c x
y
𝑥𝑥 𝑧𝑧
𝑦𝑦
32
TEK5030
Linear transformations of the projective plane ℙ2
• For images of a flat surface, a homography can be used to «change» the camera position
http://www.robots.ox.ac.uk/~vgg/hzbook.html http://www.robots.ox.ac.uk/~vgg/hzbook.html
33
TEK5030
The projective space ℙ3
• The relationship between the Euclidean space ℝ3 and the projective space 3 is much like
the relationship between ℝ2 and 2
– We represent points in homogeneous coordinates
x x
y y
x =
= λ ∀λ ∈ \ {0}
z z
w w
– Points at infinity have 𝑤𝑤
�=0 3 → 3 3 → 3
x x x x
– We can transform between ℝ3 and 3 x x x
x y w
y y
y
z z w
z z
1 w
w
34
TEK5030
Linear transformations of the projective space ℙ3
Transformation of 𝟑𝟑 Matrix #DoF Preserves
35
TEK5030
Summary
2 → 2 2 → 2
x x x x
Homographies
x x x
y w x y
y y
Affine Similarities Euclidean w w 1
36
TEK5030
Further reading
37
TEK5030