stereoscopic foundamental

14
Stereo matching using correlation 1

Upload: linh-nguyen

Post on 07-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 1/14

Stereo matching usingcorrelation

1

Page 2: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 2/14

Stereo Vision

Left Right

baseline

Matching correlation

windows across scan lines

depth

),(),(

 y xd 

 B f  y x Z 

Z (x , y ) is depth at pixel (x , y )d (x , y ) is disparity

2

Page 3: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 3/14

Basic Stereo Geometry

L W R

(X, Y, Z)

x L  x R  d d 

 B f 

 B f 

 Z  Z 

 Z 

 B f  x xd 

 Z  B X  f  x

 Z 

 B X  f  x

 R L

 R

 L

  

ˆ

2 / 

2 / 

How do matching errors affectthe depth error?

3

Page 4: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 4/14

Stereo disparity

• Stereo disparity is the difference in positionbetween correspondence point in two images

4

Page 5: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 5/14

Basic methods

• Correlation based corresponding: checking if one location in on image looks/seems likeanother one image

• Feature based: finding features in the imageand seeing if the layout of subset of features issimilar in the two images

5

Page 6: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 6/14

Basic stereo matching problem

• For each pixel x in the first image – Find corresponding epipolar line in the right image

 – Check all pixels x’ on the epipolar line and pick the bestmatch

 – Compute disparity x-x’ and set depth(x) = 1/(x-x’) 

• Simplest case: epipolar lines are scanlines – Image planes of cameras are parallel to each other and to

the baseline

 – Camera centers are at the same height

 – Focal lengths are the same

 – Then, epipolar lines fall along the horizontal scan lines of theimages

6

Page 7: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 7/14

Stereo matching using correlation

• Stereo matching is the correspondence problem

• For a point in image #1, where is the correspondingpoint in image #2

Image rectification makes the correspondence problemeasier and reduce computation time

7

Page 8: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 8/14

Image rectification•

A transformation process used to project two-or more imagesonto a common image plane. It corrects image distortion bytransforming the image into a standard coordinate system.

8

Page 9: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 9/14

Epipolar Geometry

9

Epipolar plane

Epipolar line

Epipole

Page 10: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 10/14

Epipolar Geometry

x x’ 

BaselineB

z

O  O’ 

10

Epipolar line

Page 11: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 11/14

Stereo matching

Left Right

u   u  

Rectified images

11

Page 12: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 12/14

Matching along epipolar line

Matching value

The best match estimates the “disparity” • In this case, horizontal disparity only (since images were rectified)

u i 

12

Page 13: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 13/14

Stereo matching by correlation– Correlate left image patch along the epipolar line in the right

image– Best match = highest value

Normalized correlation would be better!

13

Page 14: Stereoscopic foundamental

8/3/2019 Stereoscopic foundamental

http://slidepdf.com/reader/full/stereoscopic-foundamental 14/14

Non local constraints• Uniqueness

 – For any point in one image, there should be atmost one matching point in the other image

• Ordering

 – Corresponding point should be in the same orderin both views

14