Projective Geometry. Euclidean versus Projective Geometry. Tools of Algebraic Geometry 1. Overview. Tools of Algebraic Geometry 2

Projective Geometry Euclidean versus Projective Geometry n Euclidean geometry describes shapes “as they are” – Properties of objects that are unchan...
Author: Claude Blair
12 downloads 2 Views 57KB Size
Projective Geometry

Euclidean versus Projective Geometry n

Euclidean geometry describes shapes “as they are” – Properties of objects that are unchanged by rigid motions » Lengths » Angles » Parallelism

n

Projective Geometry

Projective geometry describes objects “as they appear” – Lengths, angles, parallelism become “distorted” when we look at objects – Mathematical model for how images of the 3D world are formed.

Projective Geometry

Overview n n n n n n n n

Tools of algebraic geometry Informal description of projective geometry in a plane

Tools of Algebraic Geometry 1 n

Plane passing through origin and perpendicular to vector n = is locus of points x = ( x 1, x2 , x3 ) such that n • x = 0 =>

Descriptions of lines and points Points at infinity and line at infinity

n

Projective transformations, projectivity matrix Example of application Special projectivities : affine transforms, similarities, Euclidean transforms Cross-ratio invariance for points, lines, planes

(a, b, c )

a x1 + b x2 + c x3 = 0

Plane through origin is completely defined by( a, b, c) x3

x = ( x 1, x2 , x3 )

x2 O x1

n = ( a, b, c ) Projective Geometry

Projective Geometry

Tools of Algebraic Geometry 2 n

A vector parallel to intersection of 2 planes ( a, b, c) and is obtained by cross-product

( a', b', c' )

Tools of Algebraic Geometry 3 n

Plane passing through two points x and x’ is defined by

( a' ', b' ', c' ' ) = ( a, b, c) × (a ', b' , c ')

( a, b, c) = x × x '

( a' ', b' ', c' ')

x = ( x 1, x2 , x3 )

x'= ( x1 ', x2 ', x3 ' ) O

O

( a, b, c) Projective Geometry

( a, b, c)

( a', b', c' ) Projective Geometry

Projective Geometry in 2D n n

n n

Projective Geometry in 2D

We are in a plane P and want to describe lines and points in P We consider a third dimension to make things easier when dealing with infinity – Origin O out of the plane, at a distance equal to 1 from plane To each point m of the plane P we can associate a single ray x = ( x 1, x2 , x3 ) To each line l of the plane P we can associate a single plane ( a, b, c) x3

L = (a, b, c)

n

n

The rays x = ( x 1, x2 , x3 ) and x = ( λ x1 , λ x2 , λ x 3 ) are the same and are mapped to the same point m of the plane P – X is the coordinate vector of m,( x1 , x2 , x3 )are its homogeneous coordinates The planes (a , b, c) and(λ a, λ b, λ c) are the same and are mapped to the same line l of the plane P – L is the coordinate vector of l, ( a, b, c) are its homogeneous coordinates

L = (a, b, c)

x = ( x1 , x 2 , x3 ) m

x = ( x1 , x 2 , x3 ) m

P

l x2

( a, b, c)

O

x1

O

Projective Geometry

Projective Geometry

Properties n n n

From Projective Plane to Euclidean Plane

Point X belongs to line L if L . X = 0 Equation of line L in projective geometry is a x1 + b x2 + c x3 = 0 We obtain homogeneous equations

n

n

How do we “land” back from the projective world to the 2D world of the plane? – For point, consider intersection of ray x = ( λ x1 , λ x2 , λ x 3 ) with plane x 3 = 1 => λ = 1 / x 3 , m = ( x 1 / x 3 , x 2 / x 3 ) For line, intersection of plane a x1 + b x2 + c x 3 = 0 with plane x 3 = 1 is line l: a x1 + b x2 + c = 0

L = (a, b, c)

x = ( x1 , x2 , x3 )

L = (a, b, c)

P

( a, b, c)

( a, b, c)

O

O

Projective Geometry

Lines and Points

n n

Ideal Points and Line at Infinity

Two lines L = (a, b, c) and L’ = (a’,b’,c’ ) intersect in the point

n

x = L × L'

L = x × x' The line through 2 points x and x’ is Duality principle: To any theorem of 2D projective geometry, there corresponds a dual theorem, which may be derived by interchanging the roles of points and lines in the original theorem x’ x = (x , x , x ) 1

2

3

P

L

n n n

The points x = (x1 , x2, 0) do not correspond to finite points in the plane. They are points at infinity, also called ideal points The line L= (0,0,1) passes through all points at infinity, since L . x = 0 Two parallel lines L= (a, b, c) and L’ = ( a, b, c’) intersect at the point x = L × L' =(c’- c)(b, -a, 0), i.e. (b, -a, 0) Any line (a, b, c) intersects the line at infinity at (b, -a, 0). So the line at infinity is the set of all points at infinity x3

L’



O

( a, b, c) Projective Geometry

P

l

l

Projective Geometry

x = ( x1 , x 2 , x3 ) m

m

n

P

l

m

l 1

( a', b', c' )

( 0, 0,1) Projective Geometry

O



P

x = ( x1, x2 ,0)

Ideal Points and Line at Infinity n

n

Projective Transformations in a Plane

With projective geometry, two lines always meet in a single point, and two points always lie on a single line. This is not true of Euclidean geometry, where parallel lines form a special case.

n

n

Projective Geometry

Projectivity – Mapping from points in plane to points in plane – 3 aligned points are mapped to 3 aligned points Also called – Collineation – Homography

Projective Geometry

Projectivity Matrix

Projectivity Theorem n

A mapping is a projectivity if and only if the mapping consists of a linear transformation of homogeneous coordinates x'= Hx

 x1'   h11 h12     x '2  =  h 21 h22  '   x3   h 31 h32

with H non singular n

n

Proof : – If x1, x2, and x3 are 3 points that lie on a line L, and x’1 = H x1, etc, then x’1 , x’2, and x’3 lie on a line L’ – LT xi = 0, LT H -1 H xi = 0, so points H xi lie on line H -T L

The matrix H can be multiplied by an arbitrary non -zero number without altering the projective transformation

n

Matrix H is called a “homogeneous matrix” (only ratios of terms are important) There are 8 independent ratios. It follows that projectivity has 8 degrees of freedom A projectivity is simply a linear transformation of the rays

n

Projective Geometry

Projective Geometry

Examples of Projective Transformations n

n

Central projection maps planar scene points to image plane by a projectivity – True because all points on a scene line are mapped to points P’ on its image line The image of the same planar scene O’ from a second camera can be M’ obtained from the image from the first camera by a projectivity y’ x’ – True because x’i = H’ x i , x”i = H” x i

Projective Geometry

Computing Projective Transformation O”

P” M”

n

Since matrix of projectivity has 8 degrees of freedom, the mapping between 2 images can be computed if we have the coordinates of 4 points on one image, and know where they are mapped in the other image – Each point provides 2 independent equations

x' =

x'1 h11 x + h12 y + h13 h' 11 x + h '12 y + h '13 = = x'3 h31 x + h32 y + h33 h '31 x + h' 32 y +1

y '=

x' 2 h21 x + h22 y + h23 h ' 21 x + h '22 y + h' 23 = = x' 3 h31 x + h32 y + h33 h '31 x + h' 32 y +1

P M y

so x”i = H” H’ -1 x’ i

x '= H x

n

n

Converse is hard to prove, namely if all collinear sets of points are mapped to collinear sets of points, then there is a single linear mapping between corresponding points in homogeneous coordinates

h13   x1    h23   x2    h33   x3 

x

– Equations are linear in the 8 unknowns h’ ij =h ij/ h 33 Projective Geometry

Example of Application n n n

Robot going down the road Large squares painted on the road to make it easier Find road shape without perspective distortion from image – Use corners of squares: coordinates of 4 points allow us to compute matrix H – Then use matrix H to compute 3D road shape

Special Projectivities Projectivity 8 dof

 h1 1 h1 2 h h  21 22  h3 1 h3 2

Invariants Collinearity , Cross-ratios

h1 3  h2 3  h3 3 

 a1 1 a1 2 t x  Affine transform   6 dof  a2 1 a 2 2 t x  0 1   0 Similarity 4 dof

Parallelism, Ratios of areas, Length ratios

 s r1 1 s r1 2 t x  sr   2 1 s r2 2 t y  0 1   0

Angles, Length ratios

 r1 1 r1 2 t x  Euclidean transform    r2 1 r2 2 t y  3 dof  0 0 1  Projective Geometry

Projective Geometry

Projective Space Pn n n n n n

Angles, Lengths, Areas

A point in a projective space Pn is represented by a vector of n+1 coordinates x = (x1 , x2 , L , x n +1 ) At least one coordinate is non zero. Coordinates are called homogeneous or projective coordinates Vector x is called a coordinate vector Two vectors x = ( x1 , x2 ,L , xn +1 ) and y = ( y1 , y2 , L, yn +1 ) represent the same point if and only if there exists a scalar λ such that

Projective Geometry in 1D n n n n n

Points m along a line Add up one dimension, consider origin at distance 1 from line Represent m as a ray from the origin (0, 0): x = ( x1 , x2 ) X = (1,0) is point at infinity Points can be written X = (a, 1), where a is abscissa along the line

xi = λ yi

x2

The correspondence between points and coordinate vectors is not one to one.

x = ( x1 , x2 ) a m

1 O Projective Geometry

Projective Geometry

Projectivity in 1D n

A projective transformation of a line is represented by a 2x2 matrix

 x'1   h11 h12   x1      x '  =  h  2   21 h22  x 2  n n

Cross-Ratio Invariance in 1D n

x' = H x

Cross-ratio of 4 points A, B, C, D on a line is defined as

Cross(A,B,C,D) = n

Transformation has 3 degrees of freedom corresponding to the 4 elements of the matrix, minus one for overall scaling Projectivity matrix can be determined from 3 corresponding points

1 O

AB AD

÷

CB CD

Cross(A,B,C,D) = n

 xA1 with AB = det  x A2

xB1  xB 2 

Cross-ratio is not dependent on which particular homogeneous representation of the points is selected: scales cancel between numerator and denominator. For A = (a, 1), B = (b, 1), etc, we get

x = ( x1 , x 2 ) a

Projective Geometry

x1

x = (1, 0)

a −b c−b ÷ a −d c −d

x = ( x1, x2 )

Cross-ratio is invariant under any projectivity a

m

A 1

x = (1, 0 ) Projective Geometry

O

B

x = (1, 0)

Cross-Ratio Invariance in 1D n

For the 4 sets of collinear points in the figure, the cross-ratio for corresponding points has the same value

Cross-Ratio Invariance between Lines n

n

The cross-ratio between 4 lines forming a pencil is invariant when the point of intersection C is moved It is equal to the cross-ratio of the 4 points C C

Projective Geometry

Projective Geometry

Projective Geometry in 3D n n n n n n n n

Space P3 is called projective space A point in 3D space is defined by 4 numbers (x1 , x2 , x3 , x4 ) A plane is also defined by 4 numbers (u1 , u2 , u3 , u4 ) Equation of plane is 4

∑ ui xi = 0

=1 plane (0,0,0,1). Its equation is x =0 The plane at infinity is ithe 4 The points (x1 , x2 , x3 , 0 ) belong to that plane in the direction (x1 , x2 , x3) of Euclidean space A line is defined as the set of points that are a linear combination of two points P1 and P2 The cross-ratio of 4 planes is equal to the cross-ratio of the lines of intersection with a fifth plane

Central Projection If world and image points are represented by homogeneous vectors, central projection is a linear mapping between P3 and P2 :

xi = f

xs zs

y yi = f s zs

u   f  v  = 0     w   0

0 f 0

x  0 0  s  y  0 0  s  z  1 0  s   1 y

center of projection

z f Projective Geometry

References

n n

Multiple View Geometry in Computer Vision, R. Hartley and A. Zisserman, Cambridge University Press, 2000 Three-Dimensional Computer Vision: A Geometric Approach, O. Faugeras, MIT Press, 1996

Projective Geometry

Image plane Scene point (xs , y s , zs )

Image point x (xi , y i , f)

C

Projective Geometry

xi = u / w, y i = v / w