Geometric vision Goal: Recovery - - PowerPoint PPT Presentation

geometric vision goal recovery of 3d structure
SMART_READER_LITE
LIVE PREVIEW

Geometric vision Goal: Recovery - - PowerPoint PPT Presentation

Geometric vision Goal: Recovery of 3D structure What cues in the image allow us to do this? Slide credit: Svetlana Lazebnik Visual Cues Shading Merle Norman Cosmetics, Los


slide-1
SLIDE 1
  • וארטס

לט לש םיפקשה לע ססובמרנסה

slide-2
SLIDE 2

Geometric vision

  • Goal: Recovery of 3D structure
  • What cues in the image allow us to do this?

Slide credit: Svetlana Lazebnik

slide-3
SLIDE 3

Visual Cues

  • Shading

3

  • B. Leibe

Merle Norman Cosmetics, Los Angeles

Slide credit: Steve Seitz

slide-4
SLIDE 4

Visual Cues

  • Shading
  • Texture

4

  • B. Leibe

The Visual Cliff, by William Vandivert, 1960

Slide credit: Steve Seitz

slide-5
SLIDE 5

Visual Cues

  • Shading
  • Texture
  • Focus

5

  • B. Leibe

From The Art of Photography, Canon

Slide credit: Steve Seitz

slide-6
SLIDE 6

Visual Cues

  • Shading
  • Texture
  • Focus
  • Perspective

6

  • B. Leibe

Slide credit: Steve Seitz

slide-7
SLIDE 7

Visual Cues

  • Shading
  • Texture
  • Focus
  • Perspective
  • Motion

7

Slide credit: Steve Seitz, Kristen Grauman

Figures from L. Zhang http://www.brainconnection.com/teasers/?main=illusion/motion-shape

slide-8
SLIDE 8

Our Goal: Recovery of 3D Structure

  • We will focus on perspective and motion
  • We need multi-view geometry because recovery of

structure from one image is inherently ambiguous

8

  • B. Leibe

x X? X? X?

Slide credit: Svetlana Lazebnik

slide-9
SLIDE 9

To Illustrate This Point…

  • Structure and depth are inherently ambiguous from

single views.

9

  • B. Leibe

Slide credit: Svetlana Lazebnik, Kristen Grauman

slide-10
SLIDE 10

Perceptual and Sensory Augmented Computing Computer Vision WS 08/09

Stereo Vision

http://www.well.com/~jimg/stereo/stereo_list.html

Slide credit: Kristen Grauman

slide-11
SLIDE 11

What Is Stereo Vision?

  • Generic problem formulation: given several images of

the same object or scene, compute a representation of its 3D shape

11

  • B. Leibe

Slide credit: Svetlana Lazebnik, Steve Seitz

slide-12
SLIDE 12

What Is Stereo Vision?

  • Generic problem formulation: given several images of

the same object or scene, compute a representation of its 3D shape

12

  • B. Leibe

Slide credit: Svetlana Lazebnik, Steve Seitz

slide-13
SLIDE 13

What Is Stereo Vision?

  • Narrower formulation: given a calibrated binocular

stereo pair, fuse it to produce a depth image

13

  • B. Leibe

Image 1 Image 2 Dense depth map

Slide credit: Svetlana Lazebnik, Steve Seitz

slide-14
SLIDE 14

Geometry for a Simple Stereo System

  • First, assuming parallel optical axes, known camera

parameters (i.e., calibrated cameras):

14

  • B. Leibe

Slide credit: Kristen Grauman

slide-15
SLIDE 15

15

  • B. Leibe

baseline

  • ptical center

(left)

  • ptical center

(right) Focal length World point Depth of p image point (left) image point (right

Slide credit: Kristen Grauman

slide-16
SLIDE 16

Geometry for a Simple Stereo System

  • Assume parallel optical axes, known camera parameters

(i.e., calibrated cameras). We can triangulate via:

16

  • B. Leibe

Similar triangles (pl, P , pr) an (Ol, P , Or):

Z T f Z x x T

r l

   

l r

x x T f Z  

disparity

Slide credit: Kristen Grauman

slide-17
SLIDE 17

Disparity קמועו

תומלצמ

תונומתב הדוקנה ימוקימב לדבה ( disparity ) תומלצמהמ קחרמ( depth )

l r

x x T f Z  

disparity

slide-18
SLIDE 18

Depth From Disparity

18

  • B. Leibe

Image I(x,y) Image I´(x´,y´) Disparity map D(x,y)

(x´,y´)=(x+D(x,y), y)

slide-19
SLIDE 19

General Case With Calibrated Cameras

  • The two cameras need not have parallel optical axes.

19

  • B. Leibe

vs.

Slide credit: Kristen Grauman, Steve Seitz

slide-20
SLIDE 20

Stereo Correspondence Constraints

  • Given p in the left image, where can the corresponding

point p’ in the right image be?

20

  • B. Leibe

Slide credit: Kristen Grauman

slide-21
SLIDE 21

Stereo Correspondence Constraints

  • Given p in the left image, where can the corresponding

point p’ in the right image be?

21

  • B. Leibe

Slide credit: Kristen Grauman

slide-22
SLIDE 22

Stereo Correspondence Constraints

22

  • B. Leibe

Slide credit: Kristen Grauman

slide-23
SLIDE 23

Stereo Correspondence Constraints

  • Geometry of two views allows us to constrain where the

corresponding pixel for some image point in the first view must occur in the second view.

  • Epipolar constraint: Why is this useful?
  • Reduces correspondence problem to 1D search along conjugate

epipolar lines.

23

  • B. Leibe

epipolar plane

epipolar line epipolar line

Slide adapted from Steve Seitz

slide-24
SLIDE 24

Epipolar Geometry

24

  • Epipolar Plane
  • Epipoles
  • Epipolar Lines
  • Baseline

Slide adapted from Marc Pollefeys

slide-25
SLIDE 25

Epipolar Geometry: Terms

  • Baseline: line joining the camera centers
  • Epipole: point of intersection of baseline with the image

plane

  • Epipolar plane: plane containing baseline and world

point

  • Epipolar line: intersection of epipolar plane with the

image plane

25

  • B. Leibe

Slide credit: Marc Pollefeys

slide-26
SLIDE 26

Epipolar Constraint

  • Potential matches for p have to lie on the corresponding

epipolar line l’.

  • Potential matches for p’ have to lie on the corresponding

epipolar line l.

28

  • B. Leibe

http://www.ai.sri.com/~luong/research/Meta3DViewer/EpipolarGeo.html

Slide credit: Marc Pollefeys

slide-27
SLIDE 27

Example

29

  • B. Leibe

Slide credit: Kristen Grauman

slide-28
SLIDE 28
  • For a given stereo rig, how do we express the epipolar

constraints algebraically?

33

  • B. Leibe
slide-29
SLIDE 29

תיחרכהה הצירטמה תיינב

  • רידגנ
  • בוביס תצירטמ רובע

R , םוקימ ןיב רשקה P אוה תינמיל תילאמשה תוטנידרואוקה תכרעמב:

l

O

r

O P

l

r

l

p

r

p

 

r l

  T O O

 

r l

  P R P T

slide-30
SLIDE 30

Rotation Matrix

Express 3d rotation as series of rotations around coordinate axes by angles

   , ,

Overall rotation is product

  • f these elementary

rotations:

z y x

R R R R 

Slide credit: Kristen Grauman

slide-31
SLIDE 31

תיחרכהה הצירטמה תיינב

  • םירוטקוה תשולש ,ו- לע םיאצמנ

רושימה ותוא :רושימה ירלופיפאה

l

O

r

O P

l

r

l

p

r

p

l

P T

( )

l 

P T

slide-32
SLIDE 32

Cross Product

  • Vector cross product takes two vectors and returns a

third vector that’s perpendicular to both inputs.

  • So here, c is perpendicular to both a and b, which

means the dot product = 0.

Slide credit: Kristen Grauman

slide-33
SLIDE 33

תיחרכהה הצירטמה תיינב

  • םירוטקוה תשולש ,ו- לע םיאצמנ

רושימה ותוא :רושימה ירלופיפאה

  • רושימל בצינה רוטקו אוה
  • ןאכמ:
  • ו תויה-
  • יזא:
  • לבקנו האושמב ביצנ:

l

O

r

O P

l

r

l

p

r

p

l

P T

( )

l 

P T

 

l

 T P    

T l l

   P T T P

 

r l

  P R P T

T r l

  R P P T

 

T T T r l r l

    R P T P P RT P

slide-34
SLIDE 34

Matrix Form of Cross Product

39

Slide credit: Kristen Grauman

slide-35
SLIDE 35

תיחרכהה הצירטמה תיינב

  • תוצירטמ לפכ תועצמאב בתכשנ

– – רידגנ –לבקנו :

  • הצירטמה

E תארקנ תיחרכהה הצירטמה ( Essential Matrix )

 

T T T r l r l

    R P T P P RT P

 

 

T T T r l r x l

   R P T P P R T P

 

x

 E R T

T r l 

P EP

l

O

r

O P

l

r

l

p

r

p

slide-36
SLIDE 36

תיחרכהה הצירטמה

  • תונותנ תונומתה ירושימב תודוקנו תויה

תוטנידרואוקבמוה,' ףילחנ P ב- p ( דע תוהז ןכש עובקב לפכ ידכל)

  • רשיה אוה תינמיה הנומתה רושימב רשי

הדוקנה תא ליכמ יכ חטבומ רשא

  • E

תודוקנ תוטנידרואוק ונל תונותנ רשאכ תישומיש רושימב הנומתה.

  • הנומתב םילסקיפ תוטנידרואוק שי ונל...

T r l 

p Ep

r l

 u Ep

r

p

slide-37
SLIDE 37

Essential Matrix Example: Parallel Cameras

    

]R [T E T I R

x

] , , [ d

0 0 0 0 0 d 0 –d 0

 Ep p

For the parallel cameras, image

  • f any point must lie on same

horizontal line in each image plane.

Slide credit: Kristen Grauman

slide-38
SLIDE 38

Essential Matrix Example: Parallel Cameras

    

]R [T E T I R

x

] , , [ d

0 0 0 0 0 d 0 –d 0

 Ep p

For the parallel cameras, image

  • f any point must lie on same

horizontal line in each image plane.

Slide credit: Kristen Grauman

slide-39
SLIDE 39

More General Case

Image I(x,y) Image I´(x´,y´) Disparity map D(x,y)

(x´,y´)=(x+D(x,y), y)

What about when cameras’ optical axes are not parallel?

Slide credit: Kristen Grauman

slide-40
SLIDE 40

וארטס תכרעמ לויכ– התידוסיה הצירטמ

slide-41
SLIDE 41

תידוסיה הצירטמה

  • תידוסיה הצירטמ

Fundamental Matrix F

  • ו םעפה ךא תידוסיה הצירטמל הייפואב המוד-

תוטנידרואוקבםילסקיפ

  • ו רובע- יתש לש תוימינפ תוצירטמ

תומלצמה

  • תועצמאב תידוסיה הצירטמה בושיח"גלא ' הנומש

תודוקנה"

T r l 

p Fp

l

p

r

p

1 T r l  

 F M EM

l

M

l

M

slide-42
SLIDE 42

Fundamental matrix

  • Relates pixel coordinates in the two views
  • More general form than essential matrix: we remove need to

know intrinsic parameters

  • If we estimate fundamental matrix from correspondences in

pixel coordinates, can reconstruct epipolar geometry without intrinsic or extrinsic parameters

Grauman

slide-43
SLIDE 43

Computing F from correspondences

  • Cameras are uncalibrated: we don’t know E or left or right

Mint matrices

  • Estimate F from 8+ point correspondences.

 left right p

F p

 

1 int . int ,   

left right EM

M F

Grauman

slide-44
SLIDE 44

Computing F from correspondences

 left right p

F p

Each point correspondence generates one constraint on F Collect n of these constraints Solve for f , vector of parameters.

Grauman

slide-45
SLIDE 45

Stereo pipeline with weak calibration

So, where to start with uncalibrated cameras?

Need to find fundamental matrix F and the correspondences (pairs of points (u’,v’) ↔ (u,v)).

1) Find interest points in image 2) Compute correspondences 3) Compute epipolar geometry 4) Refine

Example from Andrew Zisserman

slide-46
SLIDE 46

1) Find interest points

Stereo pipeline with weak calibration

Grauman

slide-47
SLIDE 47

2) Match points only using proximity

Stereo pipeline with weak calibration

Grauman

slide-48
SLIDE 48

Putative matches based on correlation search

Grauman

slide-49
SLIDE 49

RANSAC for robust estimation of the fundamental matrix

  • Select random sample of correspondences
  • Compute F using them

– This determines epipolar constraint

  • Evaluate amount of support – inliers within threshold distance
  • f epipolar line
  • Choose F with most support (inliers)

Grauman

slide-50
SLIDE 50

Putative matches based on correlation search

Grauman

slide-51
SLIDE 51

Pruned matches

  • Correspondences consistent with epipolar geometry

Grauman

slide-52
SLIDE 52
  • Resulting epipolar geometry

Grauman

slide-53
SLIDE 53

בושיח רחאל תומאתה תאיצמ F

slide-54
SLIDE 54

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 transforms), one for each input image reprojection

Adapted from Li Zhang

In practice, it is convenient if image scanlines are the epipolar lines.

  • C. Loop and Z. Zhang. Computing Rectifying Homographies for Stereo Vision. CVPR 1999.
slide-55
SLIDE 55

Stereo image rectification: example

Source: Alyosha Efros

slide-56
SLIDE 56

Stereo reconstruction: main steps

– Calibrate cameras – Rectify images – Compute disparity – Estimate depth

Grauman

slide-57
SLIDE 57

Correspondence problem

Multiple match hypotheses satisfy epipolar constraint, but which is correct?

Figure from Gee & Cipolla 1999

Grauman

slide-58
SLIDE 58

Correspondence problem

  • Beyond the hard constraint of epipolar geometry, there are

“soft” constraints to help identify corresponding points

– Similarity – Uniqueness – Ordering – Disparity gradient

  • To find matches in the image pair, we will assume

– Most scene points visible from both views – Image regions for the matches are similar in appearance

Grauman

slide-59
SLIDE 59

Correspondence problem

Source: Andrew Zisserman

slide-60
SLIDE 60

Intensity profiles

Source: Andrew Zisserman

slide-61
SLIDE 61

Correspondence problem

Source: Andrew Zisserman

Neighborhood of corresponding points are similar in intensity patterns.

slide-62
SLIDE 62

Normalized cross correlation

Source: Andrew Zisserman

slide-63
SLIDE 63

Correlation-based window matching

Source: Andrew Zisserman

slide-64
SLIDE 64

Dense correspondence search

For each epipolar line For each pixel / window in the left image

  • compare with every pixel / window on same epipolar line in right image
  • pick position with minimum match cost (e.g., SSD, correlation)

Adapted from Li Zhang

Grauman

slide-65
SLIDE 65

Textureless regions

Source: Andrew Zisserman

Textureless regions are non-distinct; high ambiguity for matches.

Grauman

slide-66
SLIDE 66

Effect of window size

Source: Andrew Zisserman Grauman

slide-67
SLIDE 67

Effect of window size

W = 3 W = 20

Figures from Li Zhang

Want window large enough to have sufficient intensity variation, yet small enough to contain only pixels with about the same disparity.

Grauman

slide-68
SLIDE 68

Sparse correspondence search

  • Restrict search to sparse set of detected features
  • Rather than pixel values (or lists of pixel values) use feature descriptor and

an associated feature distance

  • Still narrow search further by epipolar geometry

Grauman

slide-69
SLIDE 69

םוכיסל :תידוסי הצירטמה ריש!

The Fundamental Matrix Song(360p_H.264-AAC).mp4

slide-70
SLIDE 70

םיפקש תורוקמ

  • ןיוצש לכ דבלמ , ולא לע םיססובמ םיבר םיפקש

לש:

  • B. Leibe

  • K. Grauman

  • D. Low

  • S. Lazebnik

  • A. Torralba

  • T. Darrell