+ All Categories
Home > Documents > Stereo Vision III - University of California, San Diego

Stereo Vision III - University of California, San Diego

Date post: 16-Jan-2022
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
7
CSE152, Spr 05 Intro Computer Vision Stereo Vision III Introduction to Computer Vision CSE 152 Lecture 14 CSE152, Spr 05 Intro Computer Vision Stereo Vision Outline Offline: Calibrate cameras & determine “epipolar geometry” Online 1. Acquire stereo images 2. Rectify images to convenient epipolar geometry 3. Establish correspondence 4. Estimate depth A B C D CSE152, Spr 05 Intro Computer Vision Epipolar Constraint: Calibrated Case Essential Matrix (Longuet-Higgins, 1981) CSE152, Spr 05 Intro Computer Vision Calibration Determine intrinsic parameters and extrinsic relation of two cameras Compute E by [t x ]R CSE152, Spr 05 Intro Computer Vision The Eight-Point Algorithm (Longuet-Higgins, 1981) |F | =1. Minimize: under the constraint 2 Set F 33 to 1 CSE152, Spr 05 Intro Computer Vision Epipolar geometry example
Transcript

1

CSE152, Spr 05 Intro Computer Vision

Stereo Vision III

Introduction to Computer VisionCSE 152

Lecture 14

CSE152, Spr 05 Intro Computer Vision

Stereo Vision Outline• Offline: Calibrate cameras & determine

“epipolar geometry”• Online

1. Acquire stereo images2. Rectify images to convenient epipolar geometry3. Establish correspondence 4. Estimate depthA

B

C

D

CSE152, Spr 05 Intro Computer Vision

Epipolar Constraint: Calibrated Case

Essential Matrix(Longuet-Higgins, 1981)

CSE152, Spr 05 Intro Computer Vision

Calibration

Determine intrinsic parameters and extrinsic relation of two camerasCompute E by [tx]R

CSE152, Spr 05 Intro Computer Vision

The Eight-Point Algorithm (Longuet-Higgins, 1981)

|F | =1.

Minimize:

under the constraint2

Set F33 to 1

CSE152, Spr 05 Intro Computer Vision

Epipolar geometry example

2

CSE152, Spr 05 Intro Computer Vision

Example: converging cameras

courtesy of Andrew Zisserman CSE152, Spr 05 Intro Computer Vision

Example: motion parallel with image plane

(simple for stereo → rectification)courtesy of Andrew Zisserman

CSE152, Spr 05 Intro Computer Vision

Example: forward motion

e

e’

courtesy of Andrew Zisserman CSE152, Spr 05 Intro Computer Vision

RectificationGiven a pair of images, transform both images so that epipolar lines are scan lines.

CSE152, Spr 05 Intro Computer Vision

Rectification

All epipolar lines are parallel in the rectified image plane.CSE152, Spr 05 Intro Computer Vision

Image pair rectification

simplify stereo matching by warping the images

Apply projective transformation so that epipolar linescorrespond to horizontal scanlines

e

e

map epipole e to (1,0,0)try to minimize image distortion

He001

=

Note that rectified images usually not rectangular

3

CSE152, Spr 05 Intro Computer Vision

RectificationGiven a pair of images, transform both images so that epipolar lines are scan lines.

Input Images

CSE152, Spr 05 Intro Computer Vision

RectificationGiven a pair of images, transform both images so that epipolar lines are scan lines.

Rectified ImagesSee Section 7.3.7 for specific method

CSE152, Spr 05 Intro Computer Vision

Features on same epipolar line

Truco Fig. 7.5

CSE152, Spr 05 Intro Computer Vision

Mobi: Stereo-based navigation

CSE152, Spr 05 Intro Computer Vision

Epipolar correspondence

This version is feature-based: detect edges in 1-D signal, and use dynanic progrmaming toe find correspondences that minimize an error function.

CSE152, Spr 05 Intro Computer Vision

Symbolic Map

4

CSE152, Spr 05 Intro Computer Vision

A challenge: Multiple Interpretations

Each feature on left epipolar line match oneand only one feature on right epipolar line.

CSE152, Spr 05 Intro Computer Vision

Multiple Interpretations

Each feature on left epipolar line match oneand only one feature on right epipolar line.

CSE152, Spr 05 Intro Computer Vision

Multiple Interpretations

Each feature on left epipolar line match oneand only one feature on right epipolar line.

CSE152, Spr 05 Intro Computer Vision

Multiple Interpretations

Each feature on left epipolar line match oneand only one feature on right epipolar line.

CSE152, Spr 05 Intro Computer Vision

Dense Correspondence: A Photometric constraint

• Same world point has same intensity in both images (Constant Brightness Constraint)– Lambertian fronto-parallel– Issues:

• Noise• Specularity• Foreshortening

CSE152, Spr 05 Intro Computer Vision

Using epipolar & constant Brightness constraints for stereo matching

For each epipolar lineFor each pixel in the left image

• compare with every pixel on same epipolar line in right image

• pick pixel with minimum match cost• This will never work, so:

Improvement: match windows

(Seitz)

5

CSE152, Spr 05 Intro Computer Vision

Comparing Windows: ==??

ff gg

MostMostpopularpopular

(Camps)

For each window, match to closest window on epipolar line in other image.

CSE152, Spr 05 Intro Computer Vision

Correspondence Search Algorithm (simple version for Cross Correlation)

For i = 1:nrowsfor j=1:ncols

best(i,j) = -1for k = mindisparity:maxdisparity

c = CC(I1(i,j),I2(i,j+k),winsize)if (c > best(i,j))

best(i,j) = cdisparities(i,j) = k

endend

endend

O(nrows * ncols * disparities * winx * winy)

I1 I2

uv

d

I1 I2

uv

d

CSE152, Spr 05 Intro Computer Vision

Match Metric Summary

( )( ) ( )( )

( )( ) ( )( )∑ ∑

−+⋅−

−+⋅−

vu vu

vu

IvduIIvuI

IvduIIvuI

, ,

222

211

,2211

,,

,,

( ) ( )( )∑ +−vu

vduIvuI,

221 ,,

( )( )( )( )

( )( )( )( )

∑∑∑

−+

−+−

vu

vuvu

IvduI

IvduI

IvuI

IvuI,

2

,

222

22

,

211

11

,

,

,

,

( ) ( )∑ +−vu

vduIvuI,

21 ,,

( ) ( )( )∑ +−vu

vduIvuI,

'2

'1 ,,

( ) ( ) ( )∑ <=nm

kkk vuInmIvuI,

' ,,,

( ) ( )( )∑ +vu

vduIvuIHAMMING,

'2

'1 ,,,

( ) ( ) ( )( )vuInmIBITSTRINGvuI kknmk ,,, ,' <=

MATCH METRIC DEFINITION

Normalized Cross-Correlation (NCC)

Sum of Squared Differences (SSD)

Normalized SSD

Sum of Absolute Differences (SAD)

Zero Mean SAD

Rank

Census

These two are actually

the same

( ) ( )∑ −+−−vu

IvduIIvuI,

_

22

_

11 ),(),(

CSE152, Spr 05 Intro Computer Vision

Stereo results

Ground truthScene

– Data from University of Tsukuba

(Seitz)

CSE152, Spr 05 Intro Computer Vision

Results with window correlation

Window-based matching(best window size)

Ground truth

(Seitz)CSE152, Spr 05 Intro Computer Vision

Results with better method

State of the art methodBoykov et al., Fast Approximate Energy Minimization via Graph Cuts,

International Conference on Computer Vision, September 1999.

Ground truth

(Seitz)

6

CSE152, Spr 05 Intro Computer Vision

Window size

W = 3 W = 20

Better results with adaptive window• T. Kanade and M. Okutomi, A Stereo Matching

Algorithm with an Adaptive Window: Theory and Experiment,, Proc. International Conference on Robotics and Automation, 1991.

• D. Scharstein and R. Szeliski. Stereo matching with nonlinear diffusion. International Journal of Computer Vision, 28(2):155-174, July 1998

• Effect of window size

(Seitz)CSE152, Spr 05 Intro Computer Vision

Ambiguity

CSE152, Spr 05 Intro Computer Vision

Lighting Conditions (Photometric Variations)

W(Pl) W(Pr)CSE152, Spr 05 Intro Computer Vision

Window Shape and Forshortening

CSE152, Spr 05 Intro Computer Vision

Wl

Wr

Wp

U1U2

Window Shape: Fronto-parallel Configuration

CSE152, Spr 05 Intro Computer Vision

Problem of Occlusion

7

CSE152, Spr 05 Intro Computer Vision

Stereo ConstraintsCONSTRAINT BRIEF DESCRIPTION

1-D Epipolar Search Arbitrary images of the same scene may be rectified based on epipolar geometry such that stereo matches lie along one-dimensional scanlines. This reduces the computational complexity and also reduces the likelihood of false matches.

Monotonic Ordering Points along an epipolar scanline appear in the same order in both stereo images, assuming that all objects in the scene are approximately the same distance from the cameras.

Image Brightness Constancy

Assuming Lambertian surfaces, the brightness of corresponding points in stereo images are the same.

Match Uniqueness For every point in one stereo image, there is at most one corresponding point in the other image.

Disparity Continuity Disparities vary smoothly (i.e. disparity gradient is small) over most of the image. This assumption is violated at object boundaries.

Disparity Limit The search space may be reduced significantly by limiting the disparity range, reducing both computational complexity and the likelihood of false matches.

Fronto-Parallel Surfaces

The implicit assumption made by area-based matching is that objects have fronto-parallel surfaces (i.e. depth is constant within the region of local support). This assumption is violated by sloping and creased surfaces.

Feature Similarity Corresponding features must be similar (e.g. edges must have roughly the same length and orientation).

Structural Grouping Corresponding feature groupings and their connectivity must be consistent.

(From G. Hager) CSE152, Spr 05 Intro Computer Vision

Stereo Matching using Dynamic Programming

Reprinted from “Stereo by Intra- and Intet-Scanline Search,” by Y. Ohta and T. Kanade, IEEE Trans. on Pattern Analysis and MachineIntelligence, 7(2):139-154 (1985). 1985 IEEE.

(Ohta and Kanade, 1985)

CSE152, Spr 05 Intro Computer Vision

Stereo matching

Optimal path(dynamic programming )

Similarity measure(SSD or NCC)

Constraints• epipolar• ordering• uniqueness• disparity limit• disparity gradient limit

Trade-off• Matching cost (data)• Discontinuities (prior)

(Cox et al. CVGIP’96; Koch’96; Falkenhagen´97;Van Meerbergen,Vergauwen,Pollefeys,VanGool IJCV‘02)(From Pollefeys)

CSE152, Spr 05 Intro Computer Vision

Variations on Binocular Stereo1. Trinocular Stereopsis2. Helmholtz Reciprocity Stereopsis

CSE152, Spr 05 Intro Computer Vision

Trinocular Epipolar Constraints

These constraints are not independent!

CSE152, Spr 05 Intro Computer Vision

Helmholtz reciprocity

θin, φin

θout, φoutn̂

θin, φin

θout, φout

ρρ((θθinin, , φφin in ; ; θθoutout, , φφoutout) = ) = ρρ((θθoutout, , φφout out ; ; θθinin, , φφinin))

[Helmholtz, 1910], [Minnaert, 1941], [ Nicodemus et al, 1977]


Recommended