Multiple View Geometry In Computer Vision Math 607

37
Multiple View Geometry In Computer Vision Math 607 Ron Sahoo Department of Mathematics University of Louisville

description

Multiple View Geometry In Computer Vision Math 607. Ron Sahoo Department of Mathematics University of Louisville. Basic Information. Instructor: Dr. Ron Sahoo. Office: NS 218 Tel: 852 - 2731Fax: 852 - 7132 Email: [email protected]. Course Information. Class Room: NS 212F - PowerPoint PPT Presentation

Transcript of Multiple View Geometry In Computer Vision Math 607

Page 1: Multiple View Geometry In Computer Vision Math 607

Multiple View GeometryIn Computer Vision

Math 607Ron Sahoo

Department of MathematicsUniversity of Louisville

Page 2: Multiple View Geometry In Computer Vision Math 607

Basic InformationInstructor: Dr. Ron Sahoo

Office: NS 218Tel: 852 - 2731 Fax: 852 - 7132Email: [email protected]

Page 3: Multiple View Geometry In Computer Vision Math 607

Course Information

Class Room: NS 212FScheduled Time: 11:00 - 12:15Office Hour: 1:30 - 2:30 pm

Prerequisites: Vector Calculus Linear Algebra Abstract AlgebraGeometry

Page 4: Multiple View Geometry In Computer Vision Math 607

Target AudienceThe target audience is:

(1)EE graduate students that are doing or planning to do research in CVIP lab.

(2) Mathematics graduate students that are interested in applications of modern geometry and multi-linear algebra to computer vision.

Page 5: Multiple View Geometry In Computer Vision Math 607

Course ObjectivesThe objectives of this course are:

(1)To understand projective geometry underlying multiview image formation.

(2) To understand the general principles of linear and non-linear parameter estimation methods.

(3) To be able to apply the state of the art methods for estimatind 2D and 3D geometry from images.

Page 6: Multiple View Geometry In Computer Vision Math 607

Grading SchemeGrades will be based on 2 tests and Final Project.

The Final Project can be: (1) On a significant literature research

project (you are welcome to propose your own topic).

(2) A practical project in computer vision consistent with the course.

Page 7: Multiple View Geometry In Computer Vision Math 607

Final ProjectFor the Final Project you will:

(1) Hand in a written proposal.(2) Prepare one presentation on your topic

for the class.(3) Hand in a type set final report (about

6-8 pages in the format and style of a research report).

Page 8: Multiple View Geometry In Computer Vision Math 607

Changes to Syllabus

The instructor reserves the right to make changes in the syllabus when necessary to meet learning objectives, to compensate for missed classes, or for similar reasons.

Page 9: Multiple View Geometry In Computer Vision Math 607

Projective 2D geometryLecture 1

Multiple View GeometryIn Computer Vision

Math 607

Page 10: Multiple View Geometry In Computer Vision Math 607

• Points, lines & conics• Transformations & invariants

• 1D projective geometry and the Cross-ratio

Projective 2D Geometry

Page 11: Multiple View Geometry In Computer Vision Math 607

Homogeneous coordinates

0=++ cbyax ( )Ta,b,c0,0)()( ≠∀=++ kkcykbxka ( ) ( )TT a,b,cka,b,c ~

Homogeneous representation of lines

equivalence class of vectors, any vector is representativeSet of all equivalence classes in R3(0,0,0)T forms P2

Homogeneous representation of points0=++ cbyax( )Ta,b,c=l( )Tyx,x = on if and only if

( )( ) ( ) 0l 11 == x,y,a,b,cx,y, T ( ) ( ) 0,1,,~1,, ≠∀kyxkyx TT

The point x lies on the line l if and only if xTl=lTx=0

Homogeneous coordinatesInhomogeneous coordinates ( )Tyx,

( )T321 ,, xxx but only 2 DOF

Page 12: Multiple View Geometry In Computer Vision Math 607

Points from lines and vice-versa

l'lx ×=

Intersections of lines

The intersection of two lines and is l l'

Line joining two pointsThe line through two points and is x'xl ×=x x'

Example

1=x

1=y

Page 13: Multiple View Geometry In Computer Vision Math 607

Ideal points and the line at infinity

( )T0,,l'l ab −=×

Intersections of parallel lines

( ) ( )TT and ',,l' ,,l cbacba ==

Example

1=x 2=x

Ideal points ( )T0,, 21 xx

Line at infinity ( )T1,0,0l =∞

∞∪= l22 RP

tangent vector

normal direction

( )ab −,( )ba,

Note that in P2 there is no distinction between ideal points and others

Page 14: Multiple View Geometry In Computer Vision Math 607

A model for the projective plane

exactly one line through two pointsexaclty one point at intersection of two lines

Page 15: Multiple View Geometry In Computer Vision Math 607

Dualityx l

0xl =T0lx =T

l'lx ×= x'xl ×=

Page 16: Multiple View Geometry In Computer Vision Math 607

Duality of points and linesPoints and lines are dual to each other in projective space:

If p and q are points then the cross product L = p x q denotes the linedefined by the two points.

If L and M are lines, then the crossproduct p = L x M denotes the pointwhere two lines intersect.

Page 17: Multiple View Geometry In Computer Vision Math 607

Duality principle

To any theorem of 2-dimensional projective geometry there corresponds a dual theorem, which may be derived by interchanging the role of points and lines in the original theorem

Page 18: Multiple View Geometry In Computer Vision Math 607

Projective Geometry: Use

- Camera models- Modeling scene transformations- Camera calibration- Single view geometry- Stereo analysis: two (or more) views- 3D reconstruction

Page 19: Multiple View Geometry In Computer Vision Math 607

ConicsCurve described by 2nd-degree equation in the plane

022 =+++++ feydxcybxyax

0233231

2221

21 =+++++ fxxexxdxcxxbxax

3

2

3

1 , xxyx

xx aaor homogenized

0xx =CT

or in matrix form

⎥⎥⎥

⎢⎢⎢

⎡=

fedecbdba

2/2/2/2/2/2/

Cwith

{ }fedcba :::::5DOF:

Page 20: Multiple View Geometry In Computer Vision Math 607

Five points define a conicFor each point the conic passes through

022 =+++++ feydxcyybxax iiiiii

or( ) 0,,,,, 22 =cfyxyyxx iiiiii ( )Tfedcba ,,,,,=c

0

11111

552555

25

442444

24

332333

23

222222

22

112111

21

=

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

c

yxyyxxyxyyxxyxyyxxyxyyxxyxyyxx

stacking constraints yields

Page 21: Multiple View Geometry In Computer Vision Math 607

Tangent lines to conics

The line l tangent to C at point x on C is given by l=Cx

lx

C

Page 22: Multiple View Geometry In Computer Vision Math 607

Dual conics0ll * =CTA line tangent to the conic C satisfies

Dual conics = line conics = conic envelopes

1* −=CCIn general (C full rank):

Page 23: Multiple View Geometry In Computer Vision Math 607

Degenerate conicsA conic is degenerate if matrix C is not of full rank

TT mllm +=C

e.g. two lines (rank 2)

e.g. repeated line (rank 1)

Tll=C

l

l

m

Degenerate line conics: 2 points (rank 2), double point (rank1)

( ) CC ≠**Note that for degenerate conics

Page 24: Multiple View Geometry In Computer Vision Math 607

Projective transformations

A projectivity is an invertible mapping h from P2 to itself such that three points x1,x2,x3 lie on the same line if and only if h(x1),h(x2),h(x3) do.

Definition:

A mapping h:P2P2 is a projectivity if and only if there exist a non-singular 3x3 matrix H such that for any point in P2 reprented by a vector x it is true that h(x)=Hx

Theorem:

Definition: Projective transformation

⎟⎟⎟

⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡=

⎟⎟⎟

⎜⎜⎜

3

2

1

333231

232221

131211

3

2

1

'''

xxx

hhhhhhhhh

xxx

xx' H=or

8DOFprojectivity=collineation=projective transformation=homography

Page 25: Multiple View Geometry In Computer Vision Math 607

Mapping between planes

central projection may be expressed by x’=Hx(application of theorem)

Page 26: Multiple View Geometry In Computer Vision Math 607

Removing projective distortion

333231

131211

3

1

'''

hyhxhhyhxh

xxx

++++

==333231

232221

3

2

'''

hyhxhhyhxh

xxy

++++

==

( ) 131211333231' hyhxhhyhxhx ++=++( ) 232221333231' hyhxhhyhxhy ++=++

select four points in a plane with know coordinates

(linear in hij)

(2 constraints/point, 8DOF 4 points needed)

Remark: no calibration at all necessary, better ways to compute (see later)

Page 27: Multiple View Geometry In Computer Vision Math 607

More examples

Page 28: Multiple View Geometry In Computer Vision Math 607

Transformation of lines and conics

Transformation for lines

ll' -TH=

Transformation for conics-1-TCHHC ='

Transformation for dual conicsTHHCC **' =

xx' H=For a point transformation

Page 29: Multiple View Geometry In Computer Vision Math 607

A hierarchy of transformations

Projective linear group Affine group (last row (0,0,1)) Euclidean group (upper left 2x2 orthogonal) Oriented Euclidean group (upper left 2x2 det 1)

Alternative, characterize transformation in terms of elements or quantities that are preserved or invariant

e.g. Euclidean transformations leave distances unchanged

Page 30: Multiple View Geometry In Computer Vision Math 607

Class I: Isometries(iso=same, metric=measure)

⎟⎟⎟

⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡ −=

⎟⎟⎟

⎜⎜⎜

1100cossinsincos

1''

yx

tt

yx

y

x

θθεθθε

1±=e

1=e1−=e

orientation preserving:orientation reversing:

x0

xx' ⎥⎦⎤

⎢⎣⎡

==1t

T

RH E IRR =T

special cases: pure rotation, pure translation

3DOF (1 rotation, 2 translation)

Invariants: length, angle, area

Page 31: Multiple View Geometry In Computer Vision Math 607

Class II: Similarities(isometry + scale)

⎟⎟⎟

⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡ −=

⎟⎟⎟

⎜⎜⎜

1100cossinsincos

1''

yx

tsstss

yx

y

x

θθθθ

x0

xx' ⎥⎦⎤

⎢⎣⎡

==1t

T

RH

sS IRR =T

also know as equi-form (shape preserving)metric structure = structure up to similarity (in literature)

4DOF (1 scale, 1 rotation, 2 translation)

Invariants: ratios of length, angle, ratios of areas, parallel lines

Page 32: Multiple View Geometry In Computer Vision Math 607

Class III: Affine transformations

⎟⎟⎟

⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡=

⎟⎟⎟

⎜⎜⎜

11001''

2221

1211

yx

taataa

yx

y

x

x0

xx' ⎥⎦⎤

⎢⎣⎡

==1t

T

AH A

non-isotropic scaling! (2DOF: scale ratio and orientation)

6DOF (2 scale, 2 rotation, 2 translation)

Invariants: parallel lines, ratios of parallel lengths, ratios of areas

( ) ( ) ( )φφθ DRRRA −= ⎥⎦⎤

⎢⎣⎡

=2

1

00λ

λD

Page 33: Multiple View Geometry In Computer Vision Math 607

Class VI: Projective transformations

xv

xx' ⎥⎦⎤

⎢⎣⎡

==vP T

tAH

Action non-homogeneous over the plane

8DOF (2 scale, 2 rotation, 2 translation, 2 line at infinity)

Invariants: cross-ratio of four points on a line (ratio of ratio)

( )T21,v vv=

Page 34: Multiple View Geometry In Computer Vision Math 607

Action of affinities and projectivities

on line at infinity

⎟⎟⎟

⎜⎜⎜

+

⎟⎟⎠⎞

⎜⎜⎝⎛

=⎟⎟⎟

⎜⎜⎜

⎛⎥⎦⎤

⎢⎣⎡

2211

2

1

2

1

0v

xvxvxx

xx

vAA

T

t

⎟⎟⎟

⎜⎜⎜

⎛⎟⎟⎠⎞

⎜⎜⎝⎛

=⎟⎟⎟

⎜⎜⎜

⎛⎥⎦⎤

⎢⎣⎡

000 2

1

2

1

xx

xx

vAA

T

t

Line at infinity becomes finite, allows to observe vanishing points, horizon,

Line at infinity stays at infinity, but points move along line

Page 35: Multiple View Geometry In Computer Vision Math 607

Decomposition of projective transformations

⎥⎦⎤

⎢⎣⎡

=⎥⎦⎤

⎢⎣⎡

⎥⎦⎤

⎢⎣⎡

⎥⎦⎤

⎢⎣⎡

==vv

sPAS TTTT v

tv

0100

10t AIKR

HHHH

Ttv+= RKA s

K 1det =Kupper-triangular,decomposition unique (if chosen s>0)

⎥⎥⎥

⎢⎢⎢

⎡=

0.10.20.10.2242.8707.20.1586.0707.1

H

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎡ −=

121010001

100020015.0

1000.245cos245sin20.145sin245cos2

oo

oo

H

Example:

Page 36: Multiple View Geometry In Computer Vision Math 607

Overview transformations

⎥⎥⎥

⎢⎢⎢

1002221

1211

y

x

taataa

⎥⎥⎥

⎢⎢⎢

1002221

1211

y

x

tsrsrtsrsr

⎥⎥⎥

⎢⎢⎢

333231

232221

131211

hhhhhhhhh

⎥⎥⎥

⎢⎢⎢

1002221

1211

y

x

trrtrr

Projective8dof

Affine6dof

Similarity4dof

Euclidean3dof

Concurrency, collinearity, order of contact (intersection, tangency, inflection, etc.), cross ratio

Parallellism, ratio of areas, ratio of lengths on parallel lines (e.g midpoints), linear combinations of vectors (centroids). The line at infinity l∞

Ratios of lengths, angles.The circular points I,J

lengths, areas.

Page 37: Multiple View Geometry In Computer Vision Math 607

Number of invariants?

The number of functional invariants is equal to, or greater than, the number of degrees of freedom of the configuration less the number of degrees of freedom of the transformation

e.g. configuration of 4 points in general position has 8 dof (2/pt)

and so 4 similarity, 2 affinity and zero projective invariants