Victor Adrian Prisacariu
http://www.robots.ox.ac.uk/~victor
C18 Computer Vision
Lecture 8
Recovering 3D from two images II: stereo correspondences, triangulation.
C18 Computer Vision Lecture 8 Recovering 3D from two images II: - - PowerPoint PPT Presentation
C18 Computer Vision Lecture 8 Recovering 3D from two images II: stereo correspondences, triangulation. Victor Adrian Prisacariu http://www.robots.ox.ac.uk/~victor Computer Vision: This time 5. Imaging geometry, camera calibration. 6.
Victor Adrian Prisacariu
http://www.robots.ox.ac.uk/~victor
Lecture 8
Recovering 3D from two images II: stereo correspondences, triangulation.
geometry. 8.
ring 3D fr from tw two im images II: II: stereo corr rrespondences, tria riangula latio ion, neural l nets.
1. The Correspondence Problem 2. Triangulation for Depth Recovery. 3. 1- views? 4. 2+ views?.
second camera of the back-projected ray from the first is a straight line, the search for potential matches lies (mostly) across epipolar lines.
demanding than 2D search throughout the image.
allows us to recover the fundamental matrix, which defines this epipolar geometry.
same scene location - the correspondence problem.
– We will discuss how to obtain sparse and dense correspondences.
triangulation.
– Although triangulation seems straightforward, it turns out to be a non-trivial estimation problem to which there are several approaches.
are able to reduce the search for correspondence down to a search along the epipolar line 𝐦′ = 𝑮𝐲.
– Sparse: correspondence is sought for individual corner
– Dense: correspondences are sought for all the pixels in an image.
(corners and/or SIFTs).
descriptors.
matrix 𝑮 using RANSAC.
and sometimes more robust.
– relatively sparse; – reasonably cheap to compute; – well-localized; – appear quite robustly from frame to frame.
Initial Matching
images (feature detection).
matches 𝐲′ in a region in C′ around 𝐲 (heuristic).
around the corners using e.g. the L2 norm of the SIFT descriptor or cross-correlation (see later).
inconsistencies.
just enough to get some good matches.
Initial Matching (example using Harris Corners)
Initial Matching
Matches — some good matches, some mismatches. Can still compute 𝑮 with around 50% mismatches. How?
liers — points which are not properly described by the assumed probability distribution.
istic ics RANSAC was the first, devised by vision researchers, Fischler & Bolles (1981).
1. Select a random sample of tw two points. 2. Fit a line through them.
distance of the line (in inliers).
least squares).
Remarks:
inimal set t of f poin ints for your problem (2 for lines).
sheet).
seven poin ints.
within threshold distance of the epipolar lines (inlie inliers).
inliers.
the SVD method).
1. Select a random sample of four points. 2. Compute 𝑰 as in B14.
threshold distance of the epipolar lines (in inliers).
the reprojection error:
min
𝑰
𝐲,𝐲′ ∈inliers
𝑒2 𝐲′, 𝑰𝐲 + 𝑒2(𝑰−1𝐲′, 𝐲)
Correspondences consistent with epipolar geometry
ll poin ints between the two vie iews.
reality, etc.
geometry for convenience a process called image rectification.
New optical axes are chosen to be coplanar and perpendicular to the base line, and the new image planes set with the same intrinsic matrix 𝑳rect.
differ by a rotation 𝑺 only. Obviously this must be rotation about the optic centre.
to 𝐲 in the actual image, and 𝐲rect in the rectified image.
between them?
are: 𝐲 = 𝑳 𝑱 𝟏 𝐘 = 𝑳𝐘3×1 and 𝐲rect = 𝑳rect 𝑺 𝟏 𝐘 = 𝑳rect𝑺𝐘3×1
𝐲rect = 𝑳rect𝑺𝑳−1𝐲.
plane to plane mapping through the projection center.
that the image bands around two corresponding epipolar lines are similar.
shows that this is ~ the case, though there are regions of noise, ambiguity, and occlusion.
correlation provides a method
cr cross ss-correlati tion.
global gains and offsets.
correlation.
– Generate patch 𝐶 and 𝐶𝑗𝑘 ← 𝐶𝑗𝑘 − 𝜈𝐶 – Compute NCC 𝐲, 𝐲′ =
σ𝑗 σ𝑘 𝐵𝑗𝑘𝐶𝑗𝑘 σ𝑗 σ𝑘 𝐵𝑗𝑘
2
σ𝑗 σ𝑘 𝐶𝑗𝑘
2
𝐶 → 𝐜. . NCC ≡
𝐛⋅𝐜 𝐛 𝐜 , a scale product of two unit vectors, so
− 1 ≤ NCC ≤ 1.
Why is cross-correlation a poor measure in Example 2?
auto-correlatio ion → am ambig iguous cr cross-corr rrela latio ion.
minim inimal ap appearance ch change which favours fronto-parallel surfaces.
Outline of a dense correspondence algorithm
Algorit ithm 1. Rectify images in C and C’. 2. For each pixel 𝐲 in image C:
𝐲′ along epipolar line 𝐦′ in image C′.
highest NCC. Par arameters to
adjust
(𝐲′ − 𝐲) Con
apply
(disparity gradient limit).
Limit itatio ions
to d.g. limit).
The “Other Constraints” on correspondence
Uniq iqueness s of
because of occlusion.
Ordering: From a continuous opaque surface it is not possible to change the match
Disparity sm smoo
ss: This is stronger than the previous constraint and favours smooth surfaces with no sudden changes in depth.
Figural continuit ity: The disparity field along an epipolar line should not be much different from that along a neighbouring epipolar line.
programming.
We have:
𝑸 and 𝑸′
We want the 3D point 𝐘
Many ways, we explore only two here
X.
𝑸 = 𝑞11 𝑞12 𝑞13 𝑞14 𝑞21 𝑞22 𝑞23 𝑞24 𝑞31 𝑞32 𝑞33 𝑞34 = 𝐪1T 𝐪2T 𝐪3T
𝑦 𝐪3T𝐘 − 𝐪1T𝐘 = 0 𝑧 𝐪3T𝐘 − 𝐪2T𝐘 = 0 𝑦 𝐪2T𝐘 − 𝑧 𝐪1T𝐘 = 0
𝑦𝐪3T − 𝐪1T 𝑧𝐪3T − 𝐪2T 𝑌4×1 = 𝟏2×1
𝑦′𝐪′3T − 𝐪′1T 𝑧′𝐪′3T − 𝐪′2T 𝑌4×1 = 𝟏2×1
𝑩4×4𝐘4×1 = 𝑦𝐪3T − 𝐪1T 𝑧𝐪3T − 𝐪2T 𝑦′𝐪′3T − 𝐪′1T 𝑧′𝐪′3T − 𝐪′2T 𝑌4×1 = 𝟏4×1
than two views – sa same math th as s in in th the 𝑮 matr trix case se.
Approach 2: Minimizing a geometrical/statistical error
𝐲 = 𝑸 𝐘 and ො 𝐲′ = 𝑸′ 𝐘.
𝐲) and 𝑒(𝐲′, ො 𝐲′).
𝐘 = 𝑒2 𝐲, ො 𝐲 + 𝑒2(𝐲′, ො 𝐲′).
𝐘 to minimise the cost.
𝑂(0, 𝜏2), then this is the Maxim imum Lik ikelihood Estim timator of 𝒀.
Predicting Dep Depth, , Surf Surfac ace Norm
als and and Sem Semantic Lab Labels with ith a a Common Mul ulti-Scale Con
al Ar Architecture David Eigen, Rob Fergus, ICCV 2015
The Correspondence Problem:
Triangulation for Depth Recovery. Others: Depth from Neural Nets, Structure-from- Motion