cs654: digital image analysis lecture 8: stereo imaging
TRANSCRIPT
Recap of Lecture 7
โข Inverse perspective transformation and its issues
โขMany to one mapping
โข Generalized perspective transformation
โข Fundamentals of camera calibration
Outline of Lecture 8
โข Fundamentals of stereo imaging
โข Calculation of disparity
โข Search space for point correspondence
โข Correlation based correspondence
Camera calibration
๐11 ๐+๐12๐+๐13๐+๐14โ๐ฅ๐ ๐41โ๐ฅ๐ ๐42โ๐ฅ๐๐43โ๐ฅ ๐44=0
๐21๐+๐22๐ +๐23 ๐+๐24โ ๐ฆ ๐ ๐41โ ๐ฆ ๐ ๐42โ ๐ฆ ๐๐43โ๐ฆ ๐44=0
โฆ.. (1)
โฆ.. (2)6 pairs of points are required
and
and
and
and
and
and
Solving for unknowns
๐ถ๐=0
[๐1 ๐ 1 ๐1 1 0 0 0 0 โ๐ฅ1 ๐1 โ๐ฅ1๐ 1 โ๐ฅ1๐ 1 โ๐ฅ1๐ 2 ๐ 2 ๐2 1 0 0 0 0 โ๐ฅ2 ๐ 2 โ๐ฅ2๐ 2 โ๐ฅ2๐ 2 โ๐ฅ2โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ๐ 6 ๐ 6 ๐6 1 0 0 0 0 โ๐ฅ6 ๐ 6 โ๐ฅ6๐ 6 โ ๐ฅ6๐ 6 โ ๐ฅ60 0 0 0 ๐1 ๐ 1 ๐1 1 โ ๐ฆ1๐ 1 โ ๐ฆ1๐1 โ ๐ฆ1๐1 โ ๐ฆ10 0 0 0 ๐ 2 ๐ 2 ๐2 1 โ ๐ฆ2๐ 2 โ ๐ฆ2๐2 โ ๐ฆ2๐2 โ ๐ฆ2โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ โฎ0 0 0 0 ๐ 6 ๐ 6 ๐6 1 โ ๐ฆ 6๐ 6 โ๐ฆ 6๐6 โ ๐ฆ6๐6 โ ๐ฆ6
] [๐11๐12๐13๐14๐21๐22๐23๐24๐41๐42๐43๐44
]=[0โฎ000โฎ0]
2๐ร1212ร1
12ร1
Perspective transformation
P
PI
๐ , ๐ง
๐ , ๐ฆ
๐ ,๐ฅ
World co-ordinate
Image plane
๐ฅ=๐๐๐โ๐ ๐ฆ=
๐๐๐โ๐
๐=๐ฅ๐
(๐โ๐ ) ๐=๐ฆ๐
(๐โ๐ )Two equations, three unknowns
Introducing a second imaging plane
๐ :(๐ ,๐ ,๐ )
๐ง
๐ ๐ผ โฒ๐ฆ
๐ฅ
๐ง โฒ
๐ฆ โฒ
๐ฅ โฒ
Focal length of C1
Coordinate system for C1Image point w.r.to C1
Coordinate system for C2Image point w.r.to C2
Focal length of C2
Relationship between coordinate systems
[๐ฅ โฒ๐ฆ โฒ๐ง โฒ ]=[๐11 ๐ 12 ๐13๐ 14 ๐ 15 ๐16๐ 17 ๐ 18 ๐19 ] [
๐ฅ๐ฆ๐ง ]+[๐ก๐ฅ๐ก๐ฆ๐ก ๐ง ]
Coordinates of Camera #2
Rotation matrix
Translation matrix
Coordinates of Camera #1
Assumptions
โขWorld coordinate w.r.to camera #1:
โขWorld coordinate w.r.to camera #2:
โข Two cameras are having identical focal length:
โข Coordinate of the point w.r.to x-y-z coordinate system
โข Coordinate of the point w.r.to xโ-yโ-zโ coordinate system
Mathematical relationship between points
โข For camera #1
โข For camera #2
๐ฅ0๐ฅ ๐
=๐ฆ 0๐ฆ ๐
=๐โ ๐ง0๐
๐ฅ0 โฒ๐ฅ ๐ โฒ
=๐ฆ0 โฒ๐ฆ ๐โฒ
=๐โ๐ง 0 โฒ๐
Coordinate transformation is required
Rectified camera configuration
โข Assume pure translation, without any rotation
[๐ฅ โฒ๐ฆ โฒ๐ง โฒ ]=[1 0 00 1 00 0 1 ][
๐ฅ๐ฆ๐ง ]+[๐ฟ๐ฅ00 ]
[๐ฅ โฒ๐ฆ โฒ๐ง โฒ ]=[1 0 00 1 00 0 1 ][
๐ฅ๐ฆ๐ง ]+[ 0๐ฟ ๐ฆ0 ]
[๐ฅ โฒ๐ฆ โฒ๐ง โฒ ]=[1 0 00 1 00 0 1 ][
๐ฅ๐ฆ๐ง ]+[ 00๐ฟ๐ง ]
Lateral stereo geometry
Axial stereo geometry
Modified camera configuration after lateral shift along x-axis
LEFT
๐ง
๐ฅ
๐ฆ
๐๐ ๐ฟ
๐ถ๐ฟ
๐ง โฒ
๐ฅ โฒ
๐ฆ โฒ
๐๐๐
๐ถ๐
RIGHT
๐ฟ๐ฅ
๐ (๐ฅ0 , ๐ฆ0 ,๐ง 0)
๐ ๐ฟ(๐ฅ๐ฟ , ๐ฆ๐ฟ) ๐ ๐ (๐ฅ๐ , ๐ฆ๐ )
Assumption
โข : w.r.to x-y-z coordinate system
โข : w.r.to x-y-z coordinate system
โข : Origin of the left camera coordinate system
โข : Origin of the right camera coordinate system
โขWorld coordinate w.r.to left camera is
โข : Lateral shift between to cameras
Mathematical relationship
โข For camera #1
โข For camera #2
๐ฅ0๐ฅ ๐ฟ
=๐ฆ0๐ฆ ๐ฟ
=๐โ ๐ง0๐
๐ฅ0๐ฅ๐
=๐ฆ0๐ฆ๐
=๐โ๐ง 0๐
๐ฅ0+๐ฟ๐ฅ๐ฅ๐ +๐ฟ๐ฅ
=๐ฆ 0๐ฆ๐
=๐โ๐ง 0๐
Incorrect
Solve for unknowns
๐ฅ0๐ฅ ๐ฟ
=๐โ๐ง 0๐
โฆโฆ.. (1)
๐ฆ0๐ฆ ๐ฟ
=๐โ๐ง 0๐
โฆโฆ.. (2)
๐ฅ0+๐ฟ๐ฅ๐ฅ๐ +๐ฟ๐ฅ
=๐โ๐ง0๐
โฆโฆ.. (3)
๐ฆ 0๐ฆ๐
=๐โ๐ง 0๐
โฆโฆ.. (4)
Coordinate of the 3D world point
๐ง 0=๐+๐ฟ๐ฅ .๐
๐ฅ๐ฟโ(๐ฅ๐ +๐ฟ๐ฅ)
๐ฅ0=๐ฟ๐ฅ .๐ . ๐ฅ๐ฟ
๐ฅ๐ฟโ(๐ฅ๐ +๐ฟ๐ฅ)
๐ฆ 0=๐ฟ ๐ฅ .๐ . ๐ฆ ๐ฟ
๐ฅ๐ฟโ(๐ฅ๐ +๐ฟ๐ฅ )
Depth
Disparity
โข Denominator term is significant
โข Translating the point to the left camera plane
โข Relative displacement: disparity
โข Object at infinity
โข Depth is inversely related to the disparity
Search space for stereo matching
Left Right
N
N
N
N
๐ฆ0๐ฆ ๐ฟ
=๐โ๐ง 0๐
๐ฆ 0๐ฆ๐
=๐โ๐ง 0๐
Token Based Stereo
โข Detect tokenโข Corners, interest point, edges
โข Find correspondences
โข Interpolate surface
Correlation Based Stereo Methods
โข Depth is computed only at tokens and interpolated/ extrapolated to remaining pixel
โข Disparity map is constructed based on a correlation measure
|| 1 tt IIAD
tt II 1CC
tt
tt
II
II
.
.1NC
2
1 tt IISSD
Correlation Based Stereo Methods
โข Once disparity is available compute depth using
๐=๐๐ต๐ Separation between the cameras disparity
Error
Index of points