Epipolar Geometry: Essential Matrix Various slides from previous - - PowerPoint PPT Presentation

epipolar geometry essential matrix
SMART_READER_LITE
LIVE PREVIEW

Epipolar Geometry: Essential Matrix Various slides from previous - - PowerPoint PPT Presentation

CS4501: Introduction to Computer Vision Epipolar Geometry: Essential Matrix Various slides from previous courses by: D.A. Forsyth (Berkeley / UIUC), I. Kokkinos (Ecole Centrale / UCL). S. Lazebnik (UNC / UIUC), S. Seitz (MSR / Facebook), J. Hays


slide-1
SLIDE 1

CS4501: Introduction to Computer Vision

Epipolar Geometry: Essential Matrix

Various slides from previous courses by: D.A. Forsyth (Berkeley / UIUC), I. Kokkinos (Ecole Centrale / UCL). S. Lazebnik (UNC / UIUC), S. Seitz (MSR / Facebook), J. Hays (Brown / Georgia Tech), A. Berg (Stony Brook / UNC), D. Samaras (Stony Brook) . J. M. Frahm (UNC), V. Ordonez (UVA), Steve Seitz (UW).

slide-2
SLIDE 2
  • Stereo Vision – Dense Stereo
  • More on Epipolar Geometry

Last Class

slide-3
SLIDE 3
  • More on Epipolar Geometry
  • Essential Matrix
  • Fundamental Matrix

Today’s Class

slide-4
SLIDE 4

Es#ma#ng depth with stereo

  • Stereo: shape from “motion” between two views
  • We’ll need to consider:
  • Info on camera pose (“calibration”)
  • Image point correspondences

scene point

  • ptical

center image plane

slide-5
SLIDE 5

Potential matches for x have to lie on the corresponding line l’. Potential matches for x’ have to lie on the corresponding line l.

Key idea: Epipolar constraint

x x ’ X x ’ X x ’ X

slide-6
SLIDE 6
  • Epipolar Plane – plane containing baseline (1D family)
  • Epipoles

= intersec9ons of baseline with image planes = projec9ons of the other camera center

  • Baseline – line connecting the two camera centers

Epipolar geometry: notation

X x x ’

slide-7
SLIDE 7
  • Epipolar Lines - intersections of epipolar plane with image

planes (always come in corresponding pairs)

Epipolar geometry: notation

X x x ’

  • Epipolar Plane – plane containing baseline (1D family)
  • Epipoles

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

  • Baseline – line connecting the two camera centers
slide-8
SLIDE 8

Epipolar Geometry: Another example

Credit: William Hoff, Colorado School of Mines

slide-9
SLIDE 9

Example: Converging cameras

slide-10
SLIDE 10

Geometry for a simple stereo system

  • First, assuming parallel optical axes, known camera

parameters (i.e., calibrated cameras):

slide-11
SLIDE 11

Simplest Case: Parallel images

  • Image planes of cameras are

parallel to each other and to the baseline

  • Camera centers are at same height
  • Focal lengths are the same
  • Then epipolar lines fall along the

horizontal scan lines of the images

slide-12
SLIDE 12
  • Assume parallel optical axes, known camera parameters (i.e.,

calibrated cameras). What is expression for Z? Similar triangles (pl, P, pr) and (Ol, P, Or):

Geometry for a simple stereo system

Z T f Z x x T

r l

=

  • +

l r

x x T f Z

  • =

disparity

slide-13
SLIDE 13

Depth from disparity

image I(x,y) image I´(x´,y´) Disparity map D(x,y) (x´,y´)=(x+D(x,y), y) So if we could find the corresponding points in two images, we could estimate relative depth…

slide-14
SLIDE 14

Matching cost disparity Left Right scanline

Correspondence search

  • Slide a window along the right scanline and

compare contents of that window with the reference window in the left image

  • Matching cost: SSD or normalized correlation
slide-15
SLIDE 15

Left Right scanline

Correspondence search

SSD

slide-16
SLIDE 16

Left Right scanline

Correspondence search

  • Norm. corr
slide-17
SLIDE 17

Basic stereo matching algorithm

  • If necessary, rectify the two stereo images to transform

epipolar lines into scanlines

  • For each pixel x in the first image
  • Find corresponding epipolar scanline in the right image
  • Examine all pixels on the scanline and pick the best match x’
  • Compute disparity x–x’ and set depth(x) = B*f/(x–x’)
slide-18
SLIDE 18

Failures of correspondence search

Textureless surfaces Occlusions, repetition Non-Lambertian surfaces, specularities

slide-19
SLIDE 19

Ac#ve stereo with structured light

  • Project “structured” light patterns onto the object
  • Simplifies the correspondence problem
  • Allows us to use only one camera

camera projector

  • L. Zhang, B. Curless, and S. M. Seitz. Rapid Shape Acquisition Using Color Structured

Light and Multi-pass Dynamic Programming. 3DPVT 2002

slide-20
SLIDE 20

Kinect and Iphone X Solution

  • Add Texture!
slide-21
SLIDE 21

Kinect: Structured infrared light

http://bbzippo.wordpress.com/2010/11/28/kinect-in-infrared/

slide-22
SLIDE 22

iPhone X

slide-23
SLIDE 23

Basic stereo matching algorithm

  • If necessary, rectify the two stereo images to transform

epipolar lines into scanlines

  • For each pixel x in the first image
  • Find corresponding epipolar scanline in the right image
  • Examine all pixels on the scanline and pick the best match x’
  • Compute disparity x–x’ and set depth(x) = B*f/(x–x’)
slide-24
SLIDE 24

Effect of window size

  • Smaller window

+ More detail

  • More noise
  • Larger window

+ Smoother disparity maps

  • Less detail

W = 3 W = 20

slide-25
SLIDE 25

Results with window search

Window-based matching Ground truth Data

slide-26
SLIDE 26

Better methods exist...

Graph cuts Ground truth

For the latest and greatest: h3p://www.middlebury.edu/stereo/

  • Y. Boykov, O. Veksler, and R. Zabih, Fast Approximate Energy

Minimization via Graph Cuts, PAMI 2001

slide-27
SLIDE 27

When cameras are not aligned: Stereo image rectification

  • Reproject image planes onto a common
  • plane parallel to the line between optical centers
  • Pixel motion is horizontal after this transformation
  • Two homographies (3x3 transform), one for each input image

reprojection

  • C. Loop and Z. Zhang. Computing Rectifying Homographies for Stereo Vision. IEEE
  • Conf. Computer Vision and Pattern Recognition, 1999.
slide-28
SLIDE 28

Rectification example

slide-29
SLIDE 29

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-30
SLIDE 30

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-31
SLIDE 31

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-32
SLIDE 32

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-33
SLIDE 33

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-34
SLIDE 34

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-35
SLIDE 35

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-36
SLIDE 36

Brief Digression: Cross Product as Matrix Multiplication

  • Dot Product as matrix multiplication: Easy

!" !$ !% & '" '$ '% = !"'" + !$'$ + !%'% !" !$ !% '" '$ '% * = !"'" + !$'$ + !%'%

  • Cross Product as matrix multiplication:
slide-37
SLIDE 37

Credit: William Hoff, Colorado School of Mines

Back to the General Problem

slide-38
SLIDE 38

The Essential Matrix

slide-39
SLIDE 39

The Essential Matrix

Credit: William Hoff, Colorado School of Mines

Essential Matrix (Longuet-Higgins, 1981)

slide-40
SLIDE 40

X

x x ’

Epipolar constraint: Calibrated case

  • Intrinsic and extrinsic parameters of the cameras are known, world

coordinate system is set to that of the first camera

  • Then the projection matrices are given by K[I | 0] and K’[R | t]
  • We can multiply the projection matrices (and the image points) by the

inverse of the calibration matrices to get normalized image coordinates:

X t R x K x X, I x K x ] [ 0] [

pixel 1 norm pixel 1 norm

= ¢ ¢ = ¢ = =

slide-41
SLIDE 41

X

x x’ = Rx+t

Epipolar constraint: Calibrated case

R t

The vectors Rx, t, and x’ are coplanar

= (x,1)T

[ ]

÷ ÷ ø ö ç ç è æ 1 x I

[ ]

÷ ÷ ø ö ç ç è æ 1 x t R

slide-42
SLIDE 42

Epipolar constraint: Calibrated case

] ) ( [ = ´ × ¢ x R t x

! x T[t×]Rx = 0

X

x x’ = Rx+t

b a b a ] [

´

= ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é

  • =

´

z y x x y x z y z

b b b a a a a a a

Recall:

The vectors Rx, t, and x’ are coplanar

slide-43
SLIDE 43

Epipolar constraint: Calibrated case

] ) ( [ = ´ × ¢ x R t x

! x T[t×]Rx = 0

X

x x’ = Rx+t

! x TE x = 0

Essential Matrix (Longuet-Higgins, 1981) The vectors Rx, t, and x’ are coplanar

slide-44
SLIDE 44

X

x x ’

Epipolar constraint: Calibrated case

  • E x is the epipolar line associated with x (l' = E x)
  • Recall: a line is given by ax + by + c = 0 or

! x TE x = 0

ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é = = 1 , where y x c b a

T

x l x l

slide-45
SLIDE 45

X

x x ’

Epipolar constraint: Calibrated case

  • E x is the epipolar line associated with x (l' = E x)
  • ETx' is the epipolar line associated with x' (l = ETx')
  • E e = 0 and ETe' = 0
  • E is singular (rank two)
  • E has five degrees of freedom

! x TE x = 0

slide-46
SLIDE 46

Epipolar constraint: Uncalibrated case

  • The calibration matrices K and K’ of the two

cameras are unknown

  • We can write the epipolar constraint in terms of

unknown normalized coordinates:

X

x x ’

ˆ ˆ = ¢ x E x T

x K x x K x ¢ ¢ = ¢ =

  • 1

1

ˆ , ˆ

slide-47
SLIDE 47

Epipolar constraint: Uncalibrated case

X

x x ’

Fundamental Matrix

(Faugeras and Luong, 1992)

ˆ ˆ = ¢ x E x T

x K x x K x ¢ ¢ = ¢ =

  • 1

1

ˆ ˆ

1

with

  • ¢

= = ¢ K E K F x F x

T T

slide-48
SLIDE 48

Epipolar constraint: Uncalibrated case

  • F x is the epipolar line associated with x (l' = F x)
  • FTx' is the epipolar line associated with x' (l = FTx')
  • F e = 0 and FTe' = 0
  • F is singular (rank two)
  • F has seven degrees of freedom

X

x x ’

ˆ ˆ = ¢ x E x T

1

with

  • ¢

= = ¢ K E K F x F x

T T

slide-49
SLIDE 49

Ques%ons?

49