Back to the Homography: The Why Sanja Fidler CSC420: Intro to Image - - PowerPoint PPT Presentation

back to the homography the why
SMART_READER_LITE
LIVE PREVIEW

Back to the Homography: The Why Sanja Fidler CSC420: Intro to Image - - PowerPoint PPT Presentation

Back to the Homography: The Why Sanja Fidler CSC420: Intro to Image Understanding 1 / 29 Homography In Lecture 9 we said that a homography is a transformation that maps a projective plane to another projective plane. We shamelessly dumped the


slide-1
SLIDE 1

Back to the Homography: The Why

Sanja Fidler CSC420: Intro to Image Understanding 1 / 29

slide-2
SLIDE 2

Homography

In Lecture 9 we said that a homography is a transformation that maps a projective plane to another projective plane. We shamelessly dumped the following equation for homography without explanation: w   x′ y′ 1   =   a b c d e f g h i     x y 1  

Sanja Fidler CSC420: Intro to Image Understanding 2 / 29

slide-3
SLIDE 3

Homography

Let’s revisit our transformation in the (new) light of perspective projection.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-4
SLIDE 4

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: We have our object in two different worlds, in two different poses relative to camera, two different photographers, and two different cameras.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-5
SLIDE 5

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: Our object is a plane. Each plane is characterized by one point d on the plane and two independent vectors a and b on the plane.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-6
SLIDE 6

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: Then any other point X on the plane can be written as: X = d + αa + βb.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-7
SLIDE 7

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: Any two Chicken Run DVDs on our planet are related by some transformation T. We’ll compute it, don’t worry.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-8
SLIDE 8

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: Each object is seen by a different camera and thus projects to the corresponding image plane with different camera intrinsics.

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-9
SLIDE 9

Homography

Let’s revisit our transformation in the (new) light of perspective projection. Figure: Given this, the question is what’s the transformation that maps the DVD

  • n the first image to the DVD in the second image?

Sanja Fidler CSC420: Intro to Image Understanding 3 / 29

slide-10
SLIDE 10

Homography

Each point on a plane can be written as: X = d + α · a + β · b, where d is a point, and a and b are two independent directions on the plane. Let’s have two different planes in 3D: First plane : X1 = d1 + α · a1 + β · b1 Second plane : X2 = d2 + α · a2 + β · b2 Via α and β, the two points X1 and X2 are in the same location relative to each plane.

Sanja Fidler CSC420: Intro to Image Understanding 4 / 29

slide-11
SLIDE 11

Homography

Each point on a plane can be written as: X = d + α · a + β · b, where d is a point, and a and b are two independent directions on the plane. Let’s have two different planes in 3D: First plane : X1 = d1 + α · a1 + β · b1 Second plane : X2 = d2 + α · a2 + β · b2 Via α and β, the two points X1 and X2 are in the same location relative to each plane. We can rewrite this using homogeneous coordinates: First plane : X1 =

  • a1

b1 d1

 α β 1   = A1   α β 1   Second plane : X2 = a2 b2 d2

 α β 1   = A2   α β 1  

Sanja Fidler CSC420: Intro to Image Understanding 4 / 29

slide-12
SLIDE 12

Homography

Each point on a plane can be written as: X = d + α · a + β · b, where d is a point, and a and b are two independent directions on the plane. Let’s have two different planes in 3D: First plane : X1 = d1 + α · a1 + β · b1 Second plane : X2 = d2 + α · a2 + β · b2 Via α and β, the two points X1 and X2 are in the same location relative to each plane. We can rewrite this using homogeneous coordinates: First plane : X1 =

  • a1

b1 d1

 α β 1   = A1   α β 1   Second plane : X2 = a2 b2 d2

 α β 1   = A2   α β 1   Careful: A1 = a1 b1 d1

  • and A2 =

a2 b2 d2

  • are 3 × 3 matrices.

Sanja Fidler CSC420: Intro to Image Understanding 4 / 29

slide-13
SLIDE 13

Homography

Each point on a plane can be written as: X = d + α · a + β · b, where d is a point, and a and b are two independent directions on the plane. Let’s have two different planes in 3D: First plane : X1 = d1 + α · a1 + β · b1 Second plane : X2 = d2 + α · a2 + β · b2 Via α and β, the two points X1 and X2 are in the same location relative to each plane. We can rewrite this using homogeneous coordinates: First plane : X1 =

  • a1

b1 d1

 α β 1   = A1   α β 1   Second plane : X2 = a2 b2 d2

 α β 1   = A2   α β 1   Careful: A1 = a1 b1 d1

  • and A2 =

a2 b2 d2

  • are 3 × 3 matrices.

Sanja Fidler CSC420: Intro to Image Understanding 4 / 29

slide-14
SLIDE 14

Homography

In 3D, a transformation between the planes is given by: X2 = T X1 There is one transformation T between every pair of points X1 and X2. Expand it: A2   α β 1   = T A1   α β 1   for every α, β Then it follows: T = A2A−1

1 , with T a 3 × 3 matrix.

Let’s look at what happens in projective (image) plane. Note that we have each plane in a separate image and the two images may not have the same camera intrinsic parameters. Denote them with K1 and K2. w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2

Sanja Fidler CSC420: Intro to Image Understanding 5 / 29

slide-15
SLIDE 15

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-16
SLIDE 16

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1 = K2 T (K −1

1 K1)X1

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-17
SLIDE 17

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1 = K2 T (K −1

1

K1)X1

w1    

x1 y1 1

   

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-18
SLIDE 18

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1 = K2 T (K −1

1 K1)X1 = w1K2 T K −1 1

  x1 y1 1  

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-19
SLIDE 19

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1 = K2 T (K −1

1 K1)X1 = w1 K2 T K −1 1

  • 3×3 matrix

  x1 y1 1  

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-20
SLIDE 20

Homography

From previous slide: w1   x1 y1 1   = K1X1 and w2   x2 y2 1   = K2X2 Insert X2 = T X1 into equality on the right: w2   x2 y2 1   = K2 T X1 = K2 T (K −1

1 K1)X1 = w1 K2 T K −1 1

  • 3×3 matrix

  x1 y1 1   And finally: w2   x2 y2 1   =   a b c d e f g h i     x1 y1 1  

Sanja Fidler CSC420: Intro to Image Understanding 6 / 29

slide-21
SLIDE 21

Homography

The nice thing about homography is that once we have it, we can compute where any point from one projective plane maps to on the second projective

  • plane. We do not need to know the 3D location of that point. We don’t

even need to know the camera parameters. We still owe one more explanation for Lecture 9.

Sanja Fidler CSC420: Intro to Image Understanding 7 / 29

slide-22
SLIDE 22

Homography

The nice thing about homography is that once we have it, we can compute where any point from one projective plane maps to on the second projective

  • plane. We do not need to know the 3D location of that point. We don’t

even need to know the camera parameters. We still owe one more explanation for Lecture 9.

Sanja Fidler CSC420: Intro to Image Understanding 7 / 29

slide-23
SLIDE 23

Remember Panorama Stitching from Lecture 9?

[Source: Fernando Flores-Mangas] Sanja Fidler CSC420: Intro to Image Understanding 8 / 29

slide-24
SLIDE 24

Remember Panorama Stitching from Lecture 9?

Each pair of images is related by homography. Why?

[Source: Fernando Flores-Mangas] Sanja Fidler CSC420: Intro to Image Understanding 8 / 29

slide-25
SLIDE 25

Rotating the Camera

Rotating my camera with R is the same as rotating the 3D points with RT (inverse of R): X2 = RTX1 where X1 is a 3D point in the coordinate system of the first camera and X2 the 3D point in the coordinate system of the rotated camera. We can use the same trick as before, where we have T = R: w1   x1 y1 1   = KX1 and w2   x2 y2 1   = KX2 w2   x2 y2 1   = w1 K R K −1

  • 3×3 matrix

  x1 y1 1  

Sanja Fidler CSC420: Intro to Image Understanding 9 / 29

slide-26
SLIDE 26

Rotating the Camera

Rotating my camera with R is the same as rotating the 3D points with RT (inverse of R): X2 = RTX1 where X1 is a 3D point in the coordinate system of the first camera and X2 the 3D point in the coordinate system of the rotated camera. We can use the same trick as before, where we have T = R: w1   x1 y1 1   = KX1 and w2   x2 y2 1   = KX2 w2   x2 y2 1   = w1 K R K −1

  • 3×3 matrix

  x1 y1 1   And this is a homography

Sanja Fidler CSC420: Intro to Image Understanding 9 / 29

slide-27
SLIDE 27

Rotating the Camera

Rotating my camera with R is the same as rotating the 3D points with RT (inverse of R): X2 = RTX1 where X1 is a 3D point in the coordinate system of the first camera and X2 the 3D point in the coordinate system of the rotated camera. We can use the same trick as before, where we have T = R: w1   x1 y1 1   = KX1 and w2   x2 y2 1   = KX2 w2   x2 y2 1   = w1 K R K −1

  • 3×3 matrix

  x1 y1 1   And this is a homography

Sanja Fidler CSC420: Intro to Image Understanding 9 / 29

slide-28
SLIDE 28

What If I Move the Camera?

So if I take a picture and then rotate the camera and take another picture, the first and second picture are related via homography (assuming the scene didn’t change in between)

Sanja Fidler CSC420: Intro to Image Understanding 10 / 29

slide-29
SLIDE 29

What If I Move the Camera?

So if I take a picture and then rotate the camera and take another picture, the first and second picture are related via homography (assuming the scene didn’t change in between) What if I move my camera?

Sanja Fidler CSC420: Intro to Image Understanding 10 / 29

slide-30
SLIDE 30

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-31
SLIDE 31

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1 − t)

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-32
SLIDE 32

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1

w1    

x1 y1 1

   

−t)

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-33
SLIDE 33

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1 − t) = w1   x1 y1 1   − Kt

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-34
SLIDE 34

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1 − t) = w1   x1 y1 1   − Kt Hmm... Different values of w1 give me different points in the second image. So even if I have K and t it seems I can’t compute where a point from the first image projects to in the second image.

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-35
SLIDE 35

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1 − t) = w1   x1 y1 1   − Kt Hmm... Different values of w1 give me different points in the second image. So even if I have K and t it seems I can’t compute where a point from the first image projects to in the second image. From w1   x1 y1 1   = KX1 we know that different w1 mean different points X1 on the projective line

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-36
SLIDE 36

What If I Move the Camera?

If I move the camera by t, then: X2 = X1 − t. Let’s try the same trick again: w2   x2 y2 1   = K X2 = K (X1 − t) = w1   x1 y1 1   − Kt Hmm... Different values of w1 give me different points in the second image. So even if I have K and t it seems I can’t compute where a point from the first image projects to in the second image. From w1   x1 y1 1   = KX1 we know that different w1 mean different points X1 on the projective line Where (x1, y1) maps to in the 2nd image depends on the 3D location of X1!

Sanja Fidler CSC420: Intro to Image Understanding 11 / 29

slide-37
SLIDE 37

What If I Move the Camera?

Summary: So if I move the camera, I can’t easily map one image to the

  • ther. The mapping depends on the 3D scene behind the image.

What about the opposite, what if I know that points (x1, y1) in the first image and (x2, y2) in the second belong to the same 3D point?

Sanja Fidler CSC420: Intro to Image Understanding 12 / 29

slide-38
SLIDE 38

What If I Move the Camera?

Summary: So if I move the camera, I can’t easily map one image to the

  • ther. The mapping depends on the 3D scene behind the image.

What about the opposite, what if I know that points (x1, y1) in the first image and (x2, y2) in the second belong to the same 3D point?

Sanja Fidler CSC420: Intro to Image Understanding 12 / 29

slide-39
SLIDE 39

What If I Move the Camera?

Summary: So if I move the camera, I can’t easily map one image to the

  • ther. The mapping depends on the 3D scene behind the image.

What about the opposite, what if I know that points (x1, y1) in the first image and (x2, y2) in the second belong to the same 3D point?

Sanja Fidler CSC420: Intro to Image Understanding 12 / 29

slide-40
SLIDE 40

What If I Move the Camera?

Summary: So if I move the camera, I can’t easily map one image to the

  • ther. The mapping depends on the 3D scene behind the image.

What about the opposite, what if I know that points (x1, y1) in the first image and (x2, y2) in the second belong to the same 3D point? This great fact is called stereo This brings us to the two-view geometry, which we’ll look at next

Sanja Fidler CSC420: Intro to Image Understanding 13 / 29

slide-41
SLIDE 41

Summary – Stuff You Need To Know

Perspective Projection: If point Q is in camera’s coordinate system: Q = (X, Y , Z)T → q =

  • f ·X

Z + px, f ·Y Z + py

T Same as: Q = (X, Y , Z)T →    w · x w · y w    = K    X Y Z    → q =

  • x

y

  • where K =

   f px f py 1    is camera intrinsic matrix If Q is in world coordinate system, then the full projection is characterized by a 3 × 4 matrix P:    w · x w · y w    = K

  • R | t
  • P

     X Y Z 1     

Sanja Fidler CSC420: Intro to Image Understanding 14 / 29

slide-42
SLIDE 42

Summary – Stuff You Need To Know

Perspective Projection: All parallel lines in 3D with the same direction meet in one, so-called vanishing point in the image All lines that lie on a plane have vanishing points that lie on a line, so-called vanishing line All parallel planes in 3D have the same vanishing line in the image Orthographic Projection Projections simply drops the Z coordinate: Q =      X Y Z 1      →    X Y 1    =    1 1 1         X Y Z 1      Parallel lines in 3D are parallel in the image

Sanja Fidler CSC420: Intro to Image Understanding 15 / 29

slide-43
SLIDE 43

Stereo

Sanja Fidler CSC420: Intro to Image Understanding 16 / 29

slide-44
SLIDE 44

Depth from Monocular Image

We know that it’s impossible to get depth from a single image [Pic adopted from: J. Hays]

Sanja Fidler CSC420: Intro to Image Understanding 17 / 29

slide-45
SLIDE 45

Depth from Monocular Image

We know that it’s impossible to get depth from a single image [Pic from: S. Lazebnik]

Sanja Fidler CSC420: Intro to Image Understanding 17 / 29

slide-46
SLIDE 46

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Shading [Slide credit: J. Hays, pic from: Prados & Faugeras 2006]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-47
SLIDE 47

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Texture: What do you see in the image?

[From the PhD Thesis: A.M. Loh. The recovery of 3-D structure using visual texture patterns]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-48
SLIDE 48

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Texture

[From the PhD Thesis: A.M. Loh. The recovery of 3-D structure using visual texture patterns]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-49
SLIDE 49

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Texture

[From the PhD Thesis: A.M. Loh. The recovery of 3-D structure using visual texture patterns]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-50
SLIDE 50

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Texture: And quite a lot of stuff around us is textured

[From the PhD Thesis: A.M. Loh. The recovery of 3-D structure using visual texture patterns]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-51
SLIDE 51

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Shape from Focus/De-focus

[Slide credit: J. Hays, pics from: H. Jin and P. Favaro, 2002]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-52
SLIDE 52

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Occlusion gives us ordering in depth

[Slide credit: J. Hays, Painting: Rene Magritt’e Le Blanc-Seing]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-53
SLIDE 53

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Depth from Google: “Borrow” depth from Google’s Street View Z-buffer

[Paper: C. Wang, K. Wilson, N. Snavely, Accurate Georegistration of Point Clouds using Geographic Data, 3DV 2013. http://www.cs.cornell.edu/projects/georegister/docs/georegister_3dv.pdf]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-54
SLIDE 54

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Depth from Google: Once you have depth you can render cool stuff

http://inear.se/urbanjungle/

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-55
SLIDE 55

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Depth from Google: Recognize this?

http://inear.se/urbanjungle/

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-56
SLIDE 56

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Depth by tricking the brain: do you see the 3D object?

[Source: J. Hays, Pics from: http://magiceye.com]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-57
SLIDE 57

Depth from Monocular Image

But when present, we can use certain cues to get depth (3D) from one image Figure: Depth by tricking the brain

[Source: J. Hays, Pics from: http://magiceye.com]

Sanja Fidler CSC420: Intro to Image Understanding 18 / 29

slide-58
SLIDE 58

Depth from Two Views: Stereo

All points on projective line to P map to p Figure: One camera

Sanja Fidler CSC420: Intro to Image Understanding 19 / 29

slide-59
SLIDE 59

Depth from Two Views: Stereo

All points on projective line to P in left camera map to a line in the image plane of the right camera Figure: Add another camera

Sanja Fidler CSC420: Intro to Image Understanding 19 / 29

slide-60
SLIDE 60

Depth from Two Views: Stereo

If I search this line to find correspondences... Figure: If I am able to find corresponding points in two images...

Sanja Fidler CSC420: Intro to Image Understanding 19 / 29

slide-61
SLIDE 61

Depth from Two Views: Stereo

I can get 3D! Figure: I can get a point in 3D by triangulation!

Sanja Fidler CSC420: Intro to Image Understanding 19 / 29

slide-62
SLIDE 62

Stereo

Epipolar geometry Case with two cameras with parallel optical axes General case

Sanja Fidler CSC420: Intro to Image Understanding 20 / 29

slide-63
SLIDE 63

Stereo

Epipolar geometry Case with two cameras with parallel optical axes ← First this General case

Sanja Fidler CSC420: Intro to Image Understanding 20 / 29

slide-64
SLIDE 64

Stereo: Parallel Calibrated Cameras

We assume that the two calibrated cameras (we know intrinsics and extrinsics) are parallel, i.e. the right camera is just some distance to the right

  • f left camera. We assume we know this distance. We call it the baseline.

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-65
SLIDE 65

Stereo: Parallel Calibrated Cameras

Pick a point P in the world

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-66
SLIDE 66

Stereo: Parallel Calibrated Cameras

Points Ol, Or and P (and pl and pr) lie on a plane. Since two image planes lie on the same plane (distance f from each camera), the lines OlOr and plpr are parallel.

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-67
SLIDE 67

Stereo: Parallel Calibrated Cameras

Since lines OlOr and plpr are parallel, and Ol and Or have the same y, then also pl and pr have the same y: yr = yl!

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-68
SLIDE 68

Stereo: Parallel Calibrated Cameras

So all points on the projective line Olpl project to a horizontal line with y = yl on the right image. This is nice, let’s remember this.

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-69
SLIDE 69

Stereo: Parallel Calibrated Cameras

Another observation: No point from Olpl can project to the right of xl in the right image. Why?

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-70
SLIDE 70

Stereo: Parallel Calibrated Cameras

Because that would mean our image can see behind the camera...

Sanja Fidler CSC420: Intro to Image Understanding 21 / 29

slide-71
SLIDE 71

Stereo: Parallel Calibrated Cameras

Since our points pl and pr lie on a horizontal line, we can forget about yl for a moment (it doesn’t seem important). Let’s look at the camera situation from the birdseye perspective instead. Let’s see if we can find a connection between xl, xr and Z (because Z is what we want).

[Adopted from: J. Hays]

Sanja Fidler CSC420: Intro to Image Understanding 22 / 29

slide-72
SLIDE 72

Stereo: Parallel Calibrated Cameras

We can then use similar triangles to compute the depth of the point P

[Adopted from: J. Hays]

Sanja Fidler CSC420: Intro to Image Understanding 22 / 29

slide-73
SLIDE 73

Stereo: Parallel Calibrated Cameras

We can then use similar triangles to compute the depth of the point P

Sanja Fidler CSC420: Intro to Image Understanding 22 / 29

slide-74
SLIDE 74

Stereo: Parallel Calibrated Cameras

We can then use similar triangles to compute the depth of the point P

Sanja Fidler CSC420: Intro to Image Understanding 22 / 29

slide-75
SLIDE 75

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr?

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-76
SLIDE 76

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-77
SLIDE 77

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-78
SLIDE 78

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-79
SLIDE 79

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-80
SLIDE 80

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-81
SLIDE 81

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-82
SLIDE 82

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-83
SLIDE 83

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-84
SLIDE 84

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-85
SLIDE 85

Stereo: Parallel Calibrated Cameras

For each point xl, how do I get xr? By matching. Patch around xr should look similar to the patch around xl.

Sanja Fidler CSC420: Intro to Image Understanding 23 / 29

slide-86
SLIDE 86

Stereo: Parallel Calibrated Cameras

We get a disparity map as a result

Sanja Fidler CSC420: Intro to Image Understanding 24 / 29

slide-87
SLIDE 87

Stereo: Parallel Calibrated Cameras

We get a disparity map as a result

Sanja Fidler CSC420: Intro to Image Understanding 24 / 29

slide-88
SLIDE 88

Stereo: Parallel Calibrated Cameras

Depth and disparity are inversely proportional

Sanja Fidler CSC420: Intro to Image Understanding 24 / 29

slide-89
SLIDE 89

Stereo: Parallel Calibrated Cameras

Smaller patches: more detail, but noisy. Bigger: less detail, but smooth

Sanja Fidler CSC420: Intro to Image Understanding 24 / 29

slide-90
SLIDE 90

You Can Do It Much Better...

With Energy Minimization on top, e.g., a Markov Random Field (MRF)

  • K. Yamaguchi, D. McAllester, R. Urtasun, Efficient Joint Segmentation,

Occlusion Labeling, Stereo and Flow Estimation, ECCV 2014

Paper: http://www.cs.toronto.edu/~urtasun/publications/yamaguchi_et_al_eccv14.pdf Code: http://ttic.uchicago.edu/~dmcallester/SPS/index.html

Sanja Fidler CSC420: Intro to Image Understanding 25 / 29

slide-91
SLIDE 91

You Can Do It Much Better...

[K. Yamaguchi, D. McAllester and R. Urtasun, ECCV 2014]

Disparity)image Flow)image

Occlusion Hinge Coplanar

Sanja Fidler CSC420: Intro to Image Understanding 26 / 29

slide-92
SLIDE 92

Look at State-of-the-art on KITTI

Where “Ours” means: [K. Yamaguchi, D. McAllester and R. Urtasun, ECCV 2014]

How can we evaluate the performance of a stereo algorithm?

Stereo Flow

  • Ours,(Joint)

Ours,(Joint) Ours,(Stereo) Ours,(Flow) VC4SF PCBP4SS StereoSLIC PR4Sf+E PCBP PR4Sceneflow AARBM wSGM

4.97% 4.86% 4.36% 4.04% 4.02% 3.92% 3.40% 3.39% 3.05% 2.83%

VC4SF PR4Sf+E PCBP4Flow MoMonSLIC PR4Sceneflow NLTGV4SC TGV2ADCSIFT BTF4ILLUM

6.52% 6.20% 5.93% 3.91% 3.76% 3.64% 3.57% 3.38% 2.82% 2.72%

Error,>,3,pixels,(Non4Occluded) Error,>,3,pixels,(Non4Occluded)

[Vogel,,et,al,,2014] [Vogel,,et,al,,2014] [Vogel,,et,al,,2013] [Vogel,,et,al,,2013] [Vogel,,et,al,,2013] [Vogel,,et,al,,2013] [Yamaguchi,,et,al,,2013] [Yamaguchi,,et,al,,2013] [Yamaguchi,,et,al,,2013] [Yamaguchi,,et,al,,2013] [Yamaguchi,,et,al,,2012] [Ran_l,,et,al,,2014] [Braux4Zin,,et,al,,2013] [Demetz,,et,al,,2014] [Einecke,,et,al,,2014]

[Spangenberg,,et,al,,2013]

Autonomous driving dataset KITTI: http://www.cvlibs.net/datasets/kitti/

Sanja Fidler CSC420: Intro to Image Understanding 27 / 29

slide-93
SLIDE 93

From Disparity We Get...

Depth: Once you have disparity, you have 3D

Figure: K. Yamaguchi, D. McAllester and R. Urtasun, ECCV 2014

Sanja Fidler CSC420: Intro to Image Understanding 28 / 29

slide-94
SLIDE 94

From Disparity We Get...

Money ;)

Sanja Fidler CSC420: Intro to Image Understanding 28 / 29

slide-95
SLIDE 95

Stereo

Epipolar geometry Case with two cameras with parallel optical axes General case ← Next time

Sanja Fidler CSC420: Intro to Image Understanding 29 / 29