65
Lecture 5 - Silvio Savarese 24-Jan-18 Professor Silvio Savarese Computational Vision and Geometry Lab Lecture 5 Epipolar Geometry

lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Lecture 5 -Silvio Savarese 24-Jan-18

ProfessorSilvioSavareseComputationalVisionandGeometryLab

Lecture5Epipolar Geometry

Page 2: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Lecture 5 -Silvio Savarese 24-Jan-18

• Whyisstereouseful?• Epipolar constraints• Essentialandfundamentalmatrix• EstimatingF• Examples

Lecture5Epipolar Geometry

Reading:[AZ] Chapter:4“Estimation– 2DperspectivetransformationsChapter:9“Epipolar GeometryandtheFundamentalMatrixTransformation”Chapter:11“ComputationoftheFundamentalMatrixF”

[FP] Chapter:7“Stereopsis”Chapter:8“StructurefromMotion”

Page 3: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Pinhole perspective projectionRecovering structure from a single view

C

Ow

Pp

Calibration rigScene

Camera K

From calibration rig

From points and lines at infinity + orthogonal lines and planes ® structure of the scene, K

® location/pose of the rig, K

Knowledge about scene (point correspondences, geometry of lines & planes, etc…

Page 4: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Pinhole perspective projectionRecovering structure from a single view

C

Ow

Pp

Calibration rigScene

Camera K

Why is it so difficult?

Intrinsic ambiguity of the mapping from 3D to image (2D)

Page 5: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Recovering structure from a single view

Intrinsic ambiguity of the mapping from 3D to image (2D)

Courtesy slide S. Lazebnik

Page 6: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Two eyes help!

Page 7: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

Twoeyeshelp!

Thisiscalledtriangulation

K’ =knownK =known

R, T

P = l × "lP

l 'l[Eq. 1]

Page 8: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

• FindP*thatminimizesd(p,M P*)+ d(p ',M 'P*)

O1 O2

pp’

P

Triangulation

[Eq. 2]

MP*M’P*

P*

Page 9: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Multi(stereo)-viewgeometry

• Camerageometry:Givencorrespondingpointsintwoimages,findcameramatrices,positionandpose.

• Scenegeometry:Findcoordinatesof3Dpointfromitsprojectioninto2ormultipleimages.

• Correspondence:Givenapointp inoneimage,howcanIfindthecorrespondingpointp’ inanotherone?

Page 10: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

• Epipolar Plane • Epipoles e, e’

• Epipolar Lines• Baseline

Epipolar geometry

O1 O2

p’

P

p

e e’

= intersections of baseline with image planes = projections of the other camera center

Page 11: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example of epipolar lines

Page 12: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

P

e’p p’e

Example: Parallel image planes

• Baseline intersects the image plane at infinity• Epipoles are at infinity• Epipolar lines are parallel to u axis

u u

v v

Page 13: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example:ParallelImagePlanes

Page 14: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example: Forward translation

• The epipoles have same position in both images• Epipole called FOE (focus of expansion)

O2

e

e’

O1

P

Page 15: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

- Two views of the same object - Given a point on left image, how can I find the corresponding point on right image?

Epipolar Constraint

pWhere is p’?

Page 16: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Epipolar geometry

O1 O2

P

p p’

Epipolar line 2

Page 17: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Epipolar Constraint

p p’Epipolar line 2

Page 18: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

M P =uv1

!

"

###

$

%

&&&= p

O1 O2

pp’

P

R, T

Epipolar Constraint

!M P =!u!v1

"

#

$$$

%

&

'''= p '[Eq. 3] [Eq. 4]

M = K I 0!"

#$

M ' = K ' RT −RTT"#$

%&'

u

v

Page 19: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

M = K I 0!"

#$

O1 O2

pp’

P

R, T

Epipolar Constraint

K = K’ are known(canonical cameras)

[ ]0IM =

Kcanonical =1 0 00 1 00 0 1

!

"

###

$

%

&&&

M ' = K ' RT −RTT"#$

%&'

M ' = RT −RTT"#$

%&'[Eq. 5] [Eq. 6]

Page 20: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

T

O1

O2

T =O2 inthecamera1referencesystemR istherotationmatrixsuchthatavectorp’ inthecamera2isequaltoRp’ incamera1.

ThecamerasarerelatedbyR,T

p’

Camera 1

Camera 2

Page 21: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

P

R, T

[ ] 0)( =¢´×® pRTpT

Epipolar Constraint

is perpendicular to epipolar planeT × ((R "p )+T ) = T × (R "p )= R !p +Tp’ in first camera reference system is

[Eq. 7]

Page 22: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

baba ][0

00

´=úúú

û

ù

êêê

ë

é

úúú

û

ù

êêê

ë

é

--

-=´

z

y

x

xy

xz

yz

bbb

aaaaaa

Cross product as matrix multiplication

Page 23: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

P

R, T

[ ] 0)pR(TpT =¢´× [ ] 0pRTpT =¢××® ´

E = Essential matrix(Longuet-Higgins, 1981)

Epipolar Constraint

[Eq. 8] [Eq. 9]

Page 24: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

• l = E p’ is the epipolar line associated with p’ • l’ = ET p is the epipolar line associated with p • E e’ = 0 and ET e = 0 • E is 3x3 matrix; 5 DOF• E is singular (rank two)

Epipolar Constraint

O1 O2

p’

P

p

e e’l l’

pT ⋅ E p ' = 0[Eq. 10]

Page 25: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Epipolar Constraint

O1 O2

pp’

P

[ ]0IKM =

R, T

M ' = K ' RT −RTT"#$

%&'

pc = K−1 p !pc = K '

−1 !p[Eq. 11] [Eq. 12]

Page 26: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

P

Epipolar Constraint

pTc ⋅ T×[ ] ⋅R #pc = 0 [ ] 0pKRT)pK( 1T1 =¢¢××® -´

-

[ ] 0pKRTKp 1TT =¢¢×× -´

- 0pFpT =¢® [Eq. 13]

[Eq.9]

pc = K−1 p

!pc = K '−1 !p

[Eq. 11]

[Eq. 12]

Page 27: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

P

Epipolar Constraint

0pFpT =¢

F = Fundamental Matrix(Faugeras and Luong, 1992)

[ ] 1-´

- ¢××= KRTKF T[Eq. 13]

[Eq. 14]

Page 28: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Epipolar Constraint

O1 O2

p’

P

p

e e’

• l = F p’ is the epipolar line associated with p’ • l’= FT p is the epipolar line associated with p • F e’ = 0 and FT e = 0• F is 3x3 matrix; 7 DOF • F is singular (rank two)

pT ⋅ F p ' = 0

l’l

Page 29: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Why F is useful?

- Suppose F is known- No additional information about the scene and camera is given- Given a point on left image, we can compute the corresponding epipolar line in the second image

l’ = FT pp p’

Page 30: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

WhyFisuseful?

• Fcapturesinformationabouttheepipolargeometryof2views+cameraparameters

• MOREIMPORTANTLY: Fgivesconstraintsonhowthescenechangesunderviewpointtransformation(withoutreconstructingthescene!)

• Powerfultoolin:• 3Dreconstruction• Multi-viewobject/scenematching

Page 31: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

pp’

P

Estimating FThe Eight-Point Algorithm

0pFpT =¢

(Hartley, 1995)(Longuet-Higgins, 1981)

Page 32: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

0pFpT =¢

Estimating F

Let’s take 8 corresponding points

( )11 12 13

21 22 23

31 32 33

', ,1 ' 0

1

F F F uu v F F F v

F F F

æ öæ öç ÷ç ÷ =ç ÷ç ÷ç ÷ç ÷è øè ø

( )

11

12

13

21

22

23

31

32

33

', ', , ', ', , ', ',1 0

FFFF

uu uv u vu vv v u v FFFFF

æ öç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ =ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷è ø

[Eq. 13]

[Eq. 14]

!p =!u!v1

"

#

$$$

%

&

'''

p =uv1

!

"

###

$

%

&&&

Page 33: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Estimating F

Page 34: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Estimating F

uiu 'i ,uiv 'i ,ui ,viu 'i ,viv 'i ,vi ,u 'i ,vi ',1( )

F11F12F13F21F22F23F31F32F33

!

"

#############

$

%

&&&&&&&&&&&&&

= 0 [Eq. 14]

Page 35: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Estimating F

Lsq. solution by SVD!• Rank 8 A non-zero solution exists (unique)

• Homogeneous system

• If N>8 F̂

f

1=f

W 0=f

W

1 1 1 1 1 1 1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2 2 2

3 3 3 3 3 3 3 3 3 3 3 3

4 4 4 4 4 4 4 4 4 4 4 4

5 5 5 5 5 5 5 5 5 5 5 5

6 6 6 6 6 6 6 6 6 6 6 6

7 7 7 7 7 7

' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' '

u u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v

11

12

13

21

22

23

317 7 7 7 7 7

328 8 8 8 8 8 8 8 8 8 8 8

33

0

' ' ' ' 1' ' ' ' ' ' 1

FFFFFFF

u v v v u vF

u u u v u v u v v v u vF

æ öæ öç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ =ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷è øç ÷

è ø

[Eqs. 15]

Page 36: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

0pF̂pT =¢and estimated F may have full rank (det(F) ≠0)

0F̂F =-Find F that minimizes

Subject to det(F)=0

But remember: fundamental matrix is Rank2

Frobenius norm (*)

SVD (again!) can be used to solve this problem

^ ^

(*) Sq. root of the sum of squares of all entries

satisfies:F̂

Page 37: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

0F̂F =-Find F that minimizes

Subject to det(F)=0

Frobenius norm (*)

F =Us1 0 00 s2 00 0 0

!

"

####

$

%

&&&&

VT

Us1 0 00 s2 00 0 s3

!

"

####

$

%

&&&&

VT = SVD(F̂)

Where:

[HZ] pag 281, chapter 11, “Computation of F”

Page 38: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Data courtesy of R. Mohr and B. Boufama.

Page 39: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Mean errors:10.0pixel9.1pixel

Page 40: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Problems with the 8-Point Algorithm

- Recall the structure of W:- do we see any potential (numerical) issue?

F1=f,0=fW Lsq solution

by SVD

Page 41: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

1 1 1 1 1 1 1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2 2 2

3 3 3 3 3 3 3 3 3 3 3 3

4 4 4 4 4 4 4 4 4 4 4 4

5 5 5 5 5 5 5 5 5 5 5 5

6 6 6 6 6 6 6 6 6 6 6 6

7 7 7 7 7 7

' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' ' ' ' ' ' 1' '

u u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v u v v v u vu u u v u v

11

12

13

21

22

23

317 7 7 7 7 7

328 8 8 8 8 8 8 8 8 8 8 8

33

0

' ' ' ' 1' ' ' ' ' ' 1

FFFFFFF

u v v v u vF

u u u v u v u v v v u vF

æ öæ öç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ =ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷ç ÷è øç ÷

è ø

Problems with the 8-Point Algorithm

• Highlyun-balanced(notwellconditioned)• ValuesofWmusthavesimilarmagnitude• ThiscreatesproblemsduringtheSVDdecomposition

0=Wf

HZpag

108

Page 42: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Normalization

IDEA: Transform image coordinates such that the matrix W becomes better conditioned (pre-conditioning)

For each image, apply a transformation T (translation and scaling) acting on image coordinates such that:

• Origin = centroid of image points• Mean square distance of the image points from origin is ~2 pixels

Page 43: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Coordinate system of the image before applying T

Coordinate system of the image after applying T

T

Example of normalization

• Origin = centroid of image points• Mean square distance of the image points from origin is ~2 pixels

Page 44: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Normalization

ii pTq = ii pTq ¢¢=¢

Page 45: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

1. Normalize coordinates in images 1 and 2:

2. Use the eight-point algorithm to compute from thecorresponding points q and q’ .

1. Enforce the rank-2 constraint:

2. De-normalize Fq:

i i

ii pTq = ii pTq ¢¢=¢

0qFq qT =¢

The Normalized Eight-Point Algorithm

qF®

'TFTF qT= 0)Fdet( q =

0. Compute T and T’ for image 1 and 2, respectively

F̂q

such that:

Page 46: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

With

nor

mal

izat

ion

With

out n

orm

aliz

atio

nMean errors:10.0pixel9.1pixel

Mean errors:1.0pixel0.9pixel

Page 47: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

http://danielwedge.com/fmatrix/

The Fundamental Matrix Song

Page 48: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Lecture 5 -Silvio Savarese 24-Jan-18

Nextlecture:Stereosystems

Page 49: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental
Page 50: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1 O2

P

e’p p’

e

Example: Parallel image planes

E=?K1=K2 = knownHint :

x

y

z

x parallel to O1O2

R = I T = (T, 0, 0)

u

v

Page 51: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

E =

0 −Tz TyTz 0 −Tx−Ty Tx 0

"

#

$$$$

%

&

''''

R =0 0 00 0 −T0 T 0

"

#

$$$

%

&

'''

Essentialmatrixforparallelimages

T = [ T 0 0 ]R = I

[ ] RTE ×= ´

[Eq. 20]

Page 52: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

O1

P

p p’

Example: Parallel image planes

x

y

z

horizontal!What are the directions of epipolar lines?

l = E p ' =0 0 00 0 −T0 T 0

"

#

$$$

%

&

'''

u 'v '1

"

#

$$$

%

&

'''=

0−TT v '

"

#

$$$

%

&

'''

l l’

u

v

e’e

u’

v’

Page 53: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example: Parallel image planes

How are pand p’ related?

pT ⋅ E p ' = 0

P

e’p p’

e

y

z

xO1

u

v

u’

v’

Page 54: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example: Parallel image planes

( ) ( )T

0 0 0 0p E p 0 1 0 0 0 1 0

0 0 1

uu v T v u v T Tv Tv

T Tv

¢é ù æ ö æ öç ÷ ç ÷ê ú¢ ¢ ¢= Þ - = Þ - = Þ =ç ÷ ç ÷ê úç ÷ ç ÷¢ê úë û è ø è ø

How are p and p’ related?

P

e’p p’

e

y

z

O1x

⇒ v = "v

u

v

u’

v’

Page 55: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Example: Parallel image planes

Rectification: making two images “parallel” Why it is useful? • Epipolar constraint ® v = v’

• New views can be synthesized by linear interpolation

P

e’p p’

e

y

z

O1x

u

v

u’

v’

Page 56: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Application: view morphingS. M. Seitz and C. R. Dyer, Proc. SIGGRAPH 96, 1996, 21-30

Page 57: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Rectification

u

u

u

v

v

v

î2

î1

îS

I1

I2

Is

P

C2

Cs

C1

H1

H2

Page 58: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental
Page 59: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental
Page 60: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental
Page 61: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

From its reflection!

Page 62: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental
Page 63: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Deep view morphingD. Ji, J. Kwon, M. McFarland, S. Savarese, CVPR 2017

Page 64: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Deep view morphingD. Ji, J. Kwon, M. McFarland, S. Savarese, CVPR 2017

Page 65: lecture5 epipolar geometry - Stanford UniversityLecture 5 EpipolarGeometry. Silvio Savarese Lecture 5 - 24-Jan-18 •Why is stereo useful? •Epipolarconstraints •Essential and fundamental

Deep view morphingD. Ji, J. Kwon, M. McFarland, S. Savarese, CVPR 2017