0% found this document useful (0 votes)
101 views29 pages

Projective Geometry

The document discusses projective geometry and its application to camera models in computer vision. It introduces the concept of representing points in the projective plane using homogeneous coordinates. Representing points homogenously allows them to be transformed between coordinate frames using homogeneous transformations, which have simple algebraic properties compared to transformations in Euclidean geometry. Projective geometry provides a mathematical framework for describing the perspective camera model used in computer vision.

Uploaded by

Jaymie Dio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views29 pages

Projective Geometry

The document discusses projective geometry and its application to camera models in computer vision. It introduces the concept of representing points in the projective plane using homogeneous coordinates. Representing points homogenously allows them to be transformed between coordinate frames using homogeneous transformations, which have simple algebraic properties compared to transformations in Euclidean geometry. Projective geometry provides a mathematical framework for describing the perspective camera model used in computer vision.

Uploaded by

Jaymie Dio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Lecture 1.

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 correspondence can be described by a mathematical model known as “the perspective


camera model” or “the pinhole camera model”

• 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

Determine the line passing through the two points 𝟐, 𝟒 and 𝟓, 𝟏𝟏

Homogeneous representation of points


2 5
4 ∈  2
x1 = 13 ∈  2
x 2 =
Matrix representation
    of the cross product
1   1  𝒖 × 𝒗 ⟼ 𝒖 ×𝒗
Homogeneous representation of line
where
 0 −1 4   5   −9   −3  0 −u3 u2 
l = x1 × x 2 =[ x1 ]× x 2 =  1 0 −2  13 =  3  =  1  [ u]×  u3 −u1 
def
       = 0

 −4 2 0   1   6   2   −u2 u1 0 
Equation of the line
−3 x + y + 2 = 0 ⇔ y = 3x − 2
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 𝑤 �

So 𝐻 is unique up to scale, i.e. 𝐻 = 𝜆𝜆 ∀ 𝜆 ∈ ℝ\ 0


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
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

𝒙𝒙 Perspective distortion Without distortion


𝒙

Images from http://www.robots.ox.ac.uk/~vgg/hzbook.html


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

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

• Within this group there are several more specialized subgroups


Transformations of the projective plane
Transformation of 2 Matrix #DoF Preserves Visualization

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

• In the projective space  x


 x  y
– We represent points in homogeneous coordinates
𝑥� 𝜆𝑥�  3 ∋ x =  y   x =   ∈  3
  z
𝑦� 𝜆𝑦�  z   
�=
𝒙 = ∀𝜆 ∈ ℝ\ 0
𝑧̃ 𝜆𝑧̃ 1 
𝑤
� 𝜆𝑤
�  x 
 x 
 y   w 
– Points at infinity have last homogeneous coordinate equal to zero  
3 ∋ x  =

=  x  y   3
 z  w
   z 
– Planes and points are dual objects 
 w  w 
�= 𝒙
Π � ∈ 3 | 𝝅
�𝑇𝒙
�=0

– The plane at infinity are made up of all points at infinity

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 

Homography  h11 h12 h13 h14  15 Intersection and tangency of


h h24 
/projective  21
h22 h23
 surfaces in contact, straight lines
 h31 h32 h33 h34 
 
 h41 h42 h43 h44 
Summary

• The projective plane  2 • Additional reading


– Homogeneous coordinates – Szeliski: 2.1.2, 2.1.3,
– Line at infinity
– Points & lines are dual

• The projective space 3


– Homogeneous coordinates
– Plane at infinity
– Points & planes are dual

• Linear transformations of  2 and  3


– Represented by homogeneous matrices
– Homographies ⊃ Affine ⊃ Similarities ⊃
Euclidean ⊃ Translations

29
Summary

• The projective plane  2 • Additional reading


– Homogeneous coordinates – Szeliski: 2.1.2, 2.1.3,
– Line at infinity
– Points & lines are dual MATLAB WARNING
When we work with linear transformations, we
• The projective space 3 represent them as matrices that act on points by
– Homogeneous coordinates right multiplication
– Plane at infinity T : n → n
– Points & planes are dual x  y = MRx
Matlab seem to prefer left multiplication instead
• Linear transformations of 2 and  3
T : n → n
– Represented by homogeneous matrices xT  yT = xT M L
– Homographies ⊃ Affine ⊃ Similarities ⊃
Euclidean ⊃ Translations So if you use built in matlab functions when you
work with transformations, be careful!!!

30

You might also like