Presented by: Hadar Elor
Stereo Vision
חוב בסגירת ...נתחיל
Geometric vision• Goal: Recovery of 3D structure
– Structure and depth are inherently ambiguous from single views.
הסנר טל של השקפים על מבוסס
Geometric vision• Goal: Recovery of 3D structure
– What cues in the image allow us to do this?
Slide credit: Svetlana Lazebnik
Shading
[Figure from Prados & Faugeras 2006]
Focus/defocus
[figs from H. Jin and P. Favaro, 2002]
Images from same point of view, different camera parameters
3d shape / depth estimates
Texture
[From A.M. Loh. The recovery of 3-D structure using visual texture patterns. PhD thesis]
Perspective effects
Image credit: S. Seitz
Motion
Figures from L. Zhang http://www.brainconnection.com/teasers/?main=illusion/motion-shape
Estimating scene shape • “Shape from X”: Shading, Texture, Focus, Motion…
• Stereo: – shape from “motion” between two views– infer 3d shape of scene from two (multiple) images
from different viewpoints
scene point
optical center
image plane
Main idea:
Geometry for a Simple Stereo System
• First, assuming parallel optical axes, known camera parameters (i.e., calibrated cameras):
11B. LeibeSlide credit: Kristen Grauman
12B. Leibe
baseline
optical center (left)
optical Center (right)
Focal length
World point
Depth of pimage point (left) image point
(right)
Slide credit: Kristen Grauman
Geometry for a Simple Stereo System• Assume parallel optical axes, known camera
parameters (i.e., calibrated cameras). We can triangulate via:
13B. Leibe
Similar triangles (pl, P, pr) and (Ol, P, Or):
r lT x x T
Z f Z
lr xx
TfZ
disparity
Slide credit: Kristen Grauman
Disparity ועומק
מצלמות
הבדל במיקומי הנקודה (disparityבתמונות )
( ת
מוצל
מה
מק
חמר
dept
h)
lr xx
TfZ
disparity
Depth From Disparity
15B. Leibe
Image I(x,y) Image I´(x´,y´)Disparity map D(x,y)
(x´,y´)=(x+D(x,y), y)
General Case With Calibrated Cameras
• The two cameras need not have parallel optical axes.
16B. Leibe
vs.
Slide credit: Kristen Grauman, Steve Seitz
Stereo Correspondence Constraints
• Given p in the left image, where can the corresponding point p’ in the right image be?
17B. LeibeSlide credit: Kristen Grauman
Stereo Correspondence Constraints
• Given p in the left image, where can the corresponding point p’ in the right image be?
18B. LeibeSlide credit: Kristen Grauman
Stereo Correspondence Constraints
19B. LeibeSlide credit: Kristen Grauman
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.
20B. Leibe
epipolar planeepipolar lineepipolar line
Slide adapted from Steve Seitz
Epipolar Geometry
21
• Epipolar Plane
• Epipoles • Epipolar Lines
• Baseline
Slide adapted from Marc Pollefeys
Example
23B. LeibeSlide credit: Kristen Grauman
• For a given stereo rig, how do we express the epipolar constraints algebraically?
24B. Leibe
ההכרחית המטריצה בניית
נגדיר •סיבוב • מטריצת P, הקשר בין מיקום Rעבור
במערכת הקואורדינטות השמאלית לימנית הוא:
lO rO
P
l rlp
rp
מישור פולרי- י אפ�
r l T O O
r l P R P T
Rotation MatrixExpress 3d rotation as series of rotations around coordinate axes by angles
,,
Overall rotation is product of these elementary rotations:
zyx RRRR
Slide credit: Kristen Grauman
ההכרחית המטריצה בניית
• - על , נמצאים ו הוקטורים שלושת : האפיפולרי המישור המישור אותו
lO rO
P
l rlp
rp
מישור פול- י אפ�רי
lPT) )l P T
Cross Product & Dot 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
ההכרחית המטריצה בניית
• - על , נמצאים ו הוקטורים שלושת : האפיפולרי המישור המישור אותו
למישור • הניצב וקטור הוא מכאן:••- ו היותאזי:•• : ונקבל במשואה נציב
lO rO
P
l rlp
rp
מישור פול- י אפ�רי
lPT) )l P T
lT P
0T
l l P T T P
r l P R P T
Tr l R P P T
0TT T
r l r l R P T P P RT P
Matrix Form of Cross Product
30Slide credit: Kristen Grauman
ההכרחית המטריצה בניית
מטריצות • כפל באמצעות נשכתב– נגדיר –ונקבל: –
נקראת Eהמטריצה •המטריצה ההכרחית
)Essential Matrix)
0TT T
r l r l R P T P P RT P
0TT T
r l r x l R P T P P R T P
xE R T
0Tr l P EP
lO rO
P
l rlp
rp
מישור פול- י אפ�רי
ההכרחית המטריצה
נתונות • התמונות במישורי ונקודות היות ,' נחליף הומ (שכן זהות p ב- Pבקואורדינטות
עד לכדי כפל בקבוע(ישר במישור התמונה הימנית אשר הוא •
מובטח כי מכיל את הנקודה•E שימושית כאשר נתונות לנו קואורדינטות נקודות
התמונה.במישורלנו יש קואורדינטות פיקסלים בתמונה...•
0Tr l p Ep
r lu Ep
rp
היסודית המטריצה
היסודית • Fundamental Matrix Fמטריצהדומה באופייה למטריצה היסודית אך הפעם ו- •
פיקסליםבקואורדינטות • עבור ו- מטריצות פנימיות של שתי •
המצלמותאלג' שמונה חישוב המטריצה היסודית באמצעות "•
"הנקודות
0Tr l p Fp
lprp
1Tr l F M EM
lMlM
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
Computing F from correspondences
• Cameras are uncalibrated: we don’t know E or left or right Mint matrices
• Estimate F from 8+ point correspondences.
0leftright pFp
1int.int,
leftright EMMF
Grauman
Computing F from correspondences
0leftright pFp
Each point correspondence generates one constraint on F
Grauman
We can re-write as:
סטראו מערכת כיול
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 image2) Compute correspondences3) Compute epipolar geometry4) Refine
Example from Andrew Zisserman
1) Find interest points
Stereo pipeline with weak calibration
Grauman
2) Match points only using proximity
Stereo pipeline with weak calibration
Grauman
Putative matches based on correlation search
Grauman
עעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעעע
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 of epipolar line
• Choose F with most support (inliers)
Grauman
Putative matches based on correlation search
Grauman
Pruned matches• Correspondences consistent with epipolar geometry
Grauman
• Resulting epipolar geometry
Grauman
? היום ראינו מה אז
סיכום
סטראו • מערכת של אנטומיהאפיפולרית • גיאומטריה
– , האפיפולרי, המישור האפיפולרי הישר האפיפול
• ' , מע וכיול היסודית ההכרחית המטריצהסטראו
שקפים מקורות
• , על מבוססים רבים שקפים שצוין כל מלבד: של אלו
–B. Leibe–K. Grauman– D. Low–S. Lazebnik–A. Torralba–T. Darrell