Top Banner
CSE486, Penn State Robert Collins Lecture 19: Essential and Fundamental Matrices
29

Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

Apr 25, 2018

Download

Documents

vanthu
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
Page 1: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Lecture 19:

Essential and Fundamental Matrices

Page 2: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipolar Geometry

image1 image 2

Epipole : location of cam2as seen by cam1.

Epipole : location of cam1as seen by cam2.

Page 3: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipolar Geometry

image1 image 2

Corresponding pointslie on conjugate epipolar lines

Page 4: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

This Lecture…

image1 image 2

Given a point in one image, how do we determinethe corresponding epipolar line to search along inthe second image?

Page 5: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Essential Matrix

The essential and fundamental matrices are 3x3 matricesthat “encode” the epipolar geometry of two views.

Motivation: Given a point in one image, multiplyingby the essential/fundamental matrix will tell us which epipolar line to search along in the second view.

Page 6: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Essential Matrix

eerreell OOrr

pprr

PP

ppll

OOllTT

PPll PPrr

R,T = rotation, and translation

S=

E=RS is “essential matrix”

Page 7: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Essential Matrix Properties

• has rank 2

has both a left and right nullspace (important!!!!)

• depends only on the EXTRINSIC Parameters (R & T)

Page 8: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Longuet-Higgins equation

Page 9: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Longuet-Higgins equation

Importance of Longuet-Higgens ...

This relates viewing rays

This relates 2D film points

Page 10: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Longuet-Higgins Makes Sense

• Note, there is nothing magic about Longuet-Higgins equation.

• A film point can also be thought of as aviewing ray. They are equivalent.

• (u,v) 2D film point

• (u,v,f) 3D point on film plane

• k(u,v,f) viewing ray into the scene

• k(X, Y, Z) ray through point P in the scene [hint: k=f/Z, and we have u=fX/Z, v=fY/Z].

Page 11: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipolar Lines

• Let l be a line in the image:

• Using homogeneous coordinates:

Page 12: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipolar Lines

• Remember:

pprr belongs to belongs to epipolarepipolar line in the right image defined by line in the right image defined by

Page 13: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipolar Lines

• Remember:

ppll belongs to belongs to epipolarepipolar line in the left image defined by line in the left image defined by

Page 14: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Epipoles

• Remember: epipoles belong to the epipolar lines

• And they belong to all the epipolar lines

We can use this to compute the location of the epipoles.There will be an example, shortly...

Page 15: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Essential Matrix Summary

Longuet-Higgins equation

Epipolar lines:

Epipoles:

Page 16: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Fundamental Matrix

The essential matrix uses CAMERA coordinates

To use image coordinates we must consider theTo use image coordinates we must consider theINTRINSIC camera parameters:INTRINSIC camera parameters:

Pixel coord(row,col)

Affine transform matrixCamera (film) coord

Page 17: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Fundamental Matrix

short version: The same equation works inpixel coordinates too!

Page 18: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Fundamental Matrix Properties

• has rank 2

• depends on the INTRINSIC and EXTRINSIC Parameters (f, etc ;R & T)

Analogous to essential matrix. The fundamentalmatrix also tells how pixels (points) in each image are related to epipolar lines in the other image.

Page 19: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

Page 20: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

Page 21: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

-0.00310695 -0.0025646 2.96584 -0.028094 -0.00771621 56.3813 13.1905 -29.2007 -9999.79

F =

Page 22: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

-0.00310695 -0.0025646 2.96584 -0.028094 -0.00771621 56.3813 13.1905 -29.2007 -9999.79

F =

x = 343.5300 y = 221.7005

left

343.53221.70 1.0

0.0001 0.0045 -1.1942

0.0295 0.9996 -265.1531

normalize so sum of squaresof first two terms is 1 (optional)

Page 23: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

-0.00310695 -0.0025646 2.96584 -0.028094 -0.00771621 56.3813 13.1905 -29.2007 -9999.79

F =

x = 343.5300 y = 221.7005

left

343.53221.70 1.0

0.0295 0.9996 -265.1531

right

Page 24: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

-0.00310695 -0.0025646 2.96584 -0.028094 -0.00771621 56.3813 13.1905 -29.2007 -9999.79

x = 205.5526 y = 80.5000

right

( 205.5526 80.5 1.0)

L = (0.0010 -0.0030 -0.4851)

(0.3211 -0.9470 -151.39)

Page 25: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

-0.00310695 -0.0025646 2.96584 -0.028094 -0.00771621 56.3813 13.1905 -29.2007 -9999.79

x = 205.5526 y = 80.5000

right

( 205.5526 80.5 1.0)

L= (0.3211 -0.9470 -151.39)

left

Page 26: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

where is the epipole?

F * eL = 0

vector in the rightnullspace of matrix F

However, due to noise,F may not be singular.So instead, next bestthing is eigenvectorassociated with smallesteigenvalue of F

Page 27: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

>> [u,d] = eigs(F’ * F)

u = -0.0013 0.2586 -0.9660 0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005

d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000

eigenvector associated with smallest eigenvalue

>> uu = u(:,3)uu = ( -0.9660 -0.2586 -0.0005)

>> uu / uu(3) : to get pixel coords(1861.02 498.21 1.0)

Page 28: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

where is the epipole? e’r * F = 0 F’ * er = 0

vector in the rightnullspace of matrix F’

However, due to noise,F’ may not be singular.So instead, next bestthing is eigenvectorassociated with smallesteigenvalue of F’

Page 29: Lecture 19: Essential and Fundamental Matricesrtc12/CSE486/lecture19.pdf · Lecture 19: Essential and Fundamental Matrices. CSE486, ... The essential and fundamental matrices are

CSE486, Penn StateRobert Collins

Example

>> [u,d] = eigs(F * F’)

u = -0.0003 -0.0618 -0.9981 -0.0056 -0.9981 0.0618 1.0000 -0.0056 0.0001

d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000

eigenvector associated with smallest eigenvalue

>> uu = u(:,3)uu = (-0.9981 0.0618 0.0001)

>> uu / uu(3) : to get pixel coords(-19021.8 1177.97 1.0)