Projective Geometry
Projective Geometry
3
Basic projective geometry
Thomas Opsahl
Motivation
• For the pinhole camera, the correspondence between observed 3D points in the world and
2D points in the captured image is given by straight lines through a common point (pinhole)
• This model can be used to describe the imaging geometry of many modern cameras, hence
it plays a central part in computer vision
2
Motivation
• Before we can study the perspective camera model in detail, we need to expand our
mathematical toolbox
• We need to be able to mathematically describe the position and orientation of the camera
relative to the world coordinate frame
• Also we need to get familiar with some basic elements of projective geometry, since this will
make it MUCH easier to describe and work with the perspective camera model
3
Introduction
𝐴
𝑇𝐵
𝐵
𝐴
𝐴
𝜉𝐵
• We have seen that the pose of a coordinate frame 𝐵 relative to a coordinate frame
𝐴 , denoted 𝐴𝜉𝐵 , can be represented as a homogeneous transformation 𝐴𝑇𝐵 in 2D
r11 r12 A
t Bx
RB
A A
tB
A
ξ B=
TB =
A
r21 r22 A
t Bx ∈ SE ( 2 )
0 1
0 0 1
Introduction
𝐴
𝑇𝐵
𝐵
𝐴
𝐴
𝜉𝐵
• We have seen that the pose of a coordinate frame 𝐵 relative to a coordinate frame
𝐴 , denoted 𝐴𝜉𝐵 , can be represented as a homogeneous transformation 𝐴𝑇𝐵 in 2D
and 3D
r11 r12 r13 At Bx
A
R A
t r r
21 22 23r A
t By
A
ξ B= ATB = B B
∈ SE ( 3)
0 1 r31 r32 r33 A
t Bz
0 0 0 1
Introduction
• And we have seen how they can transform points from one reference frame to another if
we represent points in homogeneous coordinates
x
x x y
p y p = y p
x
=p = =
z
y 1 z
1
• The main reason for representing pose as homogeneous transformations, was the nice
algebraic properties that came with the representation
Introduction
• Euclidean geometry A
p=
A
ξB ⋅ B p A
p=
A
RB B p + A t B
– 𝐴𝜉𝐵 ⟼ 𝐴𝑅𝐵 , 𝐴𝒕𝐵 ξC =
A A
ξ B ⊕ BξC ( A RC , A tC ) =
( A RB B RC , A RB B tC + At B )
– Complicated algebra
Aξ B ( A
RC T , − A RC T A tC )
• Projective geometry
𝐴 𝐴
p=
A A
ξB ⋅ B p A
p =
A
TB B p
𝐴 𝐴
𝜉𝐵 ⟼ 𝑇𝐵 = 𝑅𝐵 𝒕𝐵
–
𝟎 1
A
ξC =A
ξ B ⊕ BξC A
TC =A
TB BTC
– Simple algebra Aξ B TB −1
A
• In the following we will take a closer look at some basic elements of projective geometry
that we will encounter when we study the geometrical aspects of imaging
– Homogeneous coordinates, homogeneous transformations
The projective plane
Points
How to describe points in the plane?
The projective plane
Points
How to describe points in the plane?
Euclidean plane ℝ2
• Choose a 2D coordinate frame
• Each point corresponds to a unique pair
of Cartesian coordinates
2
𝑥
y x 𝒙 = 𝑥, 𝑦 ∈ ℝ ⟼ 𝒙 = 𝑦
x
2
The projective plane
Points
How to describe points in the plane?
Euclidean plane ℝ2
x • Choose a 2D coordinate frame
2
w • Each point corresponds to a unique pair
of Cartesian coordinates
2
𝑥
y x 𝒙 = 𝑥, 𝑦 ∈ ℝ ⟼ 𝒙 = 𝑦
x Projective plane 2
• Expand coordinate frame to 3D
2 • Each point corresponds to a triple of
y
homogeneous coordinates
𝑥�
1 𝒙 � ∈ ℝ2 ⟼ 𝒙
� = 𝑥�, 𝑦�, 𝑤 � = 𝑦�
x 𝑤�
s.t.
𝑥�, 𝑦�, 𝑤
� = 𝜆 𝑥�, 𝑦�, 𝑤
� ∀𝜆 ∈ ℝ\ 0
The projective plane
Points
Observations
1. Any point 𝒙 = 𝑥, 𝑦 in the Euclidean
plane has a corresponding
x homogeneous point 𝒙 � = 𝑥, 𝑦, 1 in the
2 projective plane
w
2. Homogeneous points of the form 𝑥�, 𝑦�, 0
y x
does not have counterparts in the
x Euclidean plane
2
y They correspond to points at infinity and
are called ideal points
1
x
The projective plane
Points
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
y x
x x
∋ x=
2
x = y ∈ 2
x y
1
2
y x x
w
2 ∋ x y =
= x 2
y
1 w w
x
Example
1. These homogeneous vectors are different numerical representations of the same point in
the plane
3 6 −30
x = 2 = 4 = −20 ∈
2
1 2 −10
1 2
2. The homogeneous point 1,2,3 ∈ 2 represents the same point as , ∈ ℝ2
3 3
The projective plane
Lines
How to describe lines in the plane?
The projective plane
Lines
How to describe lines in the plane?
Euclidean plane ℝ2
• 3 parameters 𝑎, 𝑏, 𝑐 ∈ ℝ
𝑙 = 𝑥, 𝑦 | 𝑎𝑎 + 𝑏𝑏 + 𝑐 = 0
y
l
x
2
The projective plane
Lines
How to describe lines in the plane?
Euclidean plane ℝ2
• Triple 𝑎, 𝑏, 𝑐 ∈ ℝ3 \ 𝟎
2
𝑙 = 𝑥, 𝑦 | 𝑎𝑎 + 𝑏𝑏 + 𝑐 = 0
w
Projective plane 2
y
l • Homogeneous vector 𝒍̃ = 𝑎, 𝑏, 𝑐 𝑇
x 𝑙= 𝒙� ∈ 2 | 𝒍̃𝑻 𝒙
�=0
2
y
1 l
x
The projective plane
Lines
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
2. All lines in the Euclidean plane have a
y
l corresponding line in the projective
x plane
2
y 3. The line 𝒍̃ = 0,0,1 𝑇 in the projective
plane does not have an Euclidean
l
counterpart
1
x This line consists entirely of ideal
points, and is know as the line at infinity
The projective plane
Lines
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
� = 𝒍̃1 ×𝒍̃2
𝒙
y
l
x 2. �1 and
The line passing through points 𝒙
2 �
𝒙2 is given by
y 𝒍̃ = � �2
𝒙1 ×𝒙
1 l
x
Example
A point at infinity
https://en.wikipedia.org/wiki/Projective_plane
21
The projective plane
Transformations
• Some important transformations – like the action of a pose 𝜉 on points in the plane –
happen to be linear in the projective plane and non-linear in the Euclidean plane
• The most general invertible transformations of the projective plane are known as
homographies
– or projective transformations / linear projective transformations / projectivities / collineations
Definition
A homography of 2 is a linear transformation on homogeneous 3-vectors represented by a
homogeneous, non-singular 3 × 3 matrix 𝐻
𝑥�′ ℎ11 ℎ12 ℎ13 𝑥�
𝑦�′ = ℎ21 ℎ22 ℎ23 𝑦�
𝑤�′ ℎ31 ℎ32 ℎ33 𝑤 �
• Examples
– Central projection from one plane to another is a homography
Hence if we take an image with a perspective camera of a flat surface from an angle, we can remove the perspective distortion
with a homography
• Examples
– Central projection from one plane to another is a homography
– Two images, captured by perspective cameras, of the same planar scene is related by a homography
Image 1
Image 2
The projective plane
Transformations
• One characteristic of homographies is that they preserve lines, in fact any invertible
transformation of 2 that preserves lines is a homography
• Examples
– Central projection from one plane to another is a homography
– Two images, captured by perspective cameras, of the same planar scene is related by a homography
• One can show that the product of two homographies also must be a homography
We say that the homographies constitute a group – the projective linear group 𝑃𝑃 3
Translation 𝐼 𝒕 2 Orientation
𝟎𝑻 1 + all below
Euclidean 𝑅 𝒕 3 Lengths
𝟎𝑻 1 + all below
Similarity 𝑠𝑅 𝒕 4 Angles
𝟎𝑻 1 + all below
Affine 𝑎11 𝑎12 𝑎13 6 Parallelism,
𝑎21 𝑎22 𝑎23 line at infinity
0 0 1 + all below
Homography ℎ11 ℎ12 ℎ13 8 Straight lines
/projective ℎ21 ℎ22 ℎ23
ℎ31 ℎ32 ℎ33
26
The projective space
• The relationship between the Euclidean space ℝ3 and the projective space 3 is much like
the relationship between ℝ2 and 2
27
Transformations of the projective space
Transformation of 𝟑 Matrix #DoF Preserves
Translation 𝐼 𝒕 3 Orientation
𝟎𝑻 1 + all below
Euclidean 𝑅 𝒕 6 Volumes, volume ratios, lengths
𝟎𝑻 1 + all below
Similarity 𝑠𝑅 𝒕 7 Angles
𝟎𝑻 1 + all below
Affine a11 a12 a13 a14 12 Parallelism of planes,
a a22 a23 a24
21 The plane at infinity
a31 a32 a33 a34 + all below
0 0 0 1
29
Summary
30