Lecture 1.3 Basic projective geometry Thomas Opsahl

Welcome message from author

This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Lecture 1.3 Basic projective geometry

Thomas Opsahl

Motivation

2

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

Motivation

3

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

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

( )11 12

21 22 21

0 0 1

ABxA A

A A AB BB B Bx

r r tR

T r r t SEΞΎ

= = β

t0

π΄ π΅

ππ΅π΄

ππ΅π΄

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

( )11 12 13

21 22 23

31 32 33

31

0 0 0 1

ABx

A A AA A B B By

B B ABz

r r r tR r r r t

T SEr r r t

ΞΎ

= = β

t0

π΄ π΅

ππ΅π΄

ππ΅π΄

Introduction

β’ And we have seen how they can transform points from one reference frame to another if we represent points in homogeneous coordinates

β’ The main reason for representing pose as homogeneous transformations, was the nice algebraic properties that came with the representation

1

xx

yy

= =

p p

1

xx

yy

zz

= =

p p

Introduction

β’ Euclidean geometry β ππ΅π΄ βΌ π π΅π΄ , ππ΅π΄ β Complicated algebra

β’ Projective geometry

β ππ΅π΄ βΌ ππ΅π΄ = π π΅π΄ ππ΅π΄

π 1

β Simple algebra

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

( ) ( )( )

, ,

,

A A B A A B AB B B

A A B A A A B A B AC B C C C B C B C B

A A T A T AB C C C

R

R R R R

R R

ΞΎ

ΞΎ ΞΎ ΞΎ

ΞΎ

= β = +

= β = +

β

p p p p t

t t t

t

1

A A B A A BB B

A A B A A BC B C C B C

A AB B

TT T T

T

ΞΎΞΎ ΞΎ ΞΎ

ΞΎ β

= β == β =

p p p p

The projective plane Points

How to describe points in the plane?

The projective plane Points

xy x

2

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 βΌ π =

π₯π¦

The projective plane Points

xy

w

x

y

1

x

x

2

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 βΌ π =

π₯π¦

Projective plane 2 β’ Expand coordinate frame to 3D β’ Each point corresponds to a triple of

homogeneous coordinates

ποΏ½ = π₯οΏ½,π¦οΏ½,π€οΏ½ β β2 βΌ ποΏ½ =π₯οΏ½π¦οΏ½π€οΏ½

s.t. π₯οΏ½,π¦οΏ½,π€οΏ½ = π π₯οΏ½,π¦οΏ½,π€οΏ½ βπ β β\ 0

2

The projective plane Points

xy

w

x

y

1

x

x

2

Observations 1. Any point π = π₯,π¦ in the Euclidean

plane has a corresponding homogeneous point ποΏ½ = π₯,π¦, 1 in the projective plane

2. Homogeneous points of the form π₯οΏ½,π¦οΏ½, 0 does not have counterparts in the Euclidean plane They correspond to points at infinity and are called ideal points

2

The projective plane Points

xy

w

x

y

1

x

x

2

Observations 3. When we work with geometrical

problems in the plane, we can swap between the Euclidean representation and the projective representation

2

2 2

2 2

1

xx

yy

x xwy

yw w

β = = β β = =

x x

x x

Example

1. These homogeneous vectors are different numerical representations of the same point in the plane

2. The homogeneous point 1,2,3 β 2 represents the same point as 13

, 23 β β2

2

3 6 302 4 201 2 10

β = = = β β β

x

The projective plane Lines

How to describe lines in the plane?

The projective plane Lines

xy l

2

How to describe lines in the plane? Euclidean plane β2 β’ 3 parameters π, π, π β β

π = π₯,π¦ | ππ₯ + ππ¦ + π = 0

The projective plane Lines

How to describe lines in the plane? Euclidean plane β2 β’ Triple π, π, π β β3\ π

π = π₯,π¦ | ππ₯ + ππ¦ + π = 0 Projective plane 2 β’ Homogeneous vector οΏ½ΜοΏ½ = π, π, π π

π = ποΏ½ β 2 | οΏ½ΜοΏ½π»ποΏ½ = 0

xy

w

x

y

1

l

l

2

2

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. All lines in the Euclidean plane have a corresponding line in the projective plane

3. The line οΏ½ΜοΏ½ = 0,0,1 π in the projective plane does not have an Euclidean counterpart This line consists entirely of ideal points, and is know as the line at infinity

xy

w

x

y

1

l

l

2

2

The projective plane Lines

Properties of lines in the projective plane 1. In the projective plane, all lines

intersect, parallel lines intersect at infinity Two lines οΏ½ΜοΏ½1 and οΏ½ΜοΏ½2 intersect in the point

ποΏ½ = οΏ½ΜοΏ½1ΓοΏ½ΜοΏ½2

2. The line passing through points ποΏ½1 and ποΏ½2 is given by

οΏ½ΜοΏ½ = ποΏ½1ΓποΏ½2

xy

w

x

y

1

l

l

2

2

Matrix representation of the cross product

π Γ π βΌ π Γπ where

Example

Determine the line passing through the two points π,π and π,ππ Homogeneous representation of points Homogeneous representation of line Equation of the line

2 21 2

2 54 131 1

= β = β

x x

[ ]3 2

3 1

2 1

00

0

defu u

u uu u

Γ

β = β β

u[ ]1 2 1 2

0 1 4 5 9 31 0 2 13 3 14 2 0 1 6 2

Γ

β β β = Γ = = β = = β

l x x x x

3 2 0 3 2x y y xβ + + = β = β

Example

21

A point at infinity

https://en.wikipedia.org/wiki/Projective_plane

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

π πβ² Without distortion Perspective 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

26

Transformation of 2 Matrix #DoF Preserves Visualization

Translation

πΌ πππ» 1

2 Orientation + all below

Euclidean

π πππ» 1

3 Lengths + all below

Similarity

π π πππ» 1

4 Angles + all below

Affine π11 π12 π13π21 π22 π230 0 1

6 Parallelism,

line at infinity + all below

Homography /projective

β11 β12 β13β21 β22 β23β31 β32 β33

8 Straight lines

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 β We represent points in homogeneous coordinates

ποΏ½ =

π₯οΏ½π¦οΏ½οΏ½ΜοΏ½π€οΏ½

=

ππ₯οΏ½ππ¦οΏ½ποΏ½ΜοΏ½ππ€οΏ½

βπ β β\ 0

β Points at infinity have last homogeneous coordinate equal to zero

β Planes and points are dual objects

Ξ οΏ½ = ποΏ½ β 3 | π οΏ½πποΏ½ = 0

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

27

3 3

3 3

1

xx

yy

zz

xx wy y

wzzw w

β = = β

β = =

x x

x x

Transformations of the projective space Transformation of π Matrix #DoF Preserves

Translation

πΌ πππ» 1 3 Orientation

+ all below Euclidean

π πππ» 1 6 Volumes, volume ratios, lengths

+ all below Similarity

π π πππ» 1 7 Angles

+ all below Affine 12 Parallelism of planes,

The plane at infinity + all below

Homography /projective

15 Intersection and tangency of surfaces in contact, straight lines

11 12 13 14

21 22 23 24

31 32 33 34

0 0 0 1

a a a aa a a aa a a a

11 12 13 14

21 22 23 24

31 32 33 34

41 42 43 44

h h h hh h h hh h h hh h h h

Summary

β’ The projective plane 2 β Homogeneous coordinates β 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

β’ Additional reading β Szeliski: 2.1.2, 2.1.3,

29

Summary

β’ The projective plane 2 β Homogeneous coordinates β 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

β’ Additional reading β Szeliski: 2.1.2, 2.1.3,

30

MATLAB WARNING When we work with linear transformations, we represent them as matrices that act on points by right multiplication Matlab seem to prefer left multiplication instead So if you use built in matlab functions when you work with transformations, be careful!!!

: n n

R

TM

β=x y x

: n n

T T TL

TM

β=x y x

Related Documents