Professional Documents
Culture Documents
Dept.ofCS,NationalChiao TungUniversity
ComputerVision:7.CameraModels(a)
Objective
Geometriccameramodels
Intrinsicandextrinsicparameters
Projectionequations
Projection equations
Textbook:
DavidA.ForsythandJeanPonce,ComputerVision:AModernApproach,PrenticeHall,New
Jersey,2003.
Plentyofslidesaremodifiedfromthereferencelecturenotesorprojectpages:
Prof.J.Rehg,ComputerVision,GeorgiaInst.ofTech.
Prof.T.Darrell,ComputerVisionandApplications,MIT.
Prof T Darrell Computer Vision and Applications MIT
Prof.D.A.Forsyth,ComputerVision,UIUC.
x = op i
p =(x,y)T
y = op j
i
o
2D lines
2Dlines
Linel:ax+by=c <>(a,b)T(x,y)=c
p=(x,y)T
c
(a,b)T
Homogeneous coordinates
Homogeneouscoordinates
Uniformtreatmentofpointsandlines
Linepointincidence:lTp=0
j
staythesamewhenscaled:
p=(x,y,1)T~(kx,kx,k)T
l=(a,b,c)T~(ka,kb,kc)T
(a,b)T
i
Camera pose
Camerapose
Toapplythecameramodel,objectsinthescenemustbe
expressedincameracoordinates.
y
c
w
x
z
z
World
Coordinates
Camera
Coordinates
Calibrationtargetlookstiltedfromcamera
viewpoint.Thiscanbeexplainedasa
difference in coordinate systems.
differenceincoordinatesystems.
y (0, 1, 0)
optic axis
x (1,0,0)
z (0,0,1)
Notations
Superscriptreferencescoordinateframe
Superscript references coordinate frame
APiscoordinatesofPinframeA
BPiscoordinatesofPinframeB
A x
A
A
P = y OP =
A z
kA
iA
OA
jA
) (
x iA +
) ( zk )
y jA +
Translation
B
P= P+ (OA )
A
kB
kA
iA
OA
iB
jA
P
OB
jB
Translation
Usinghomogeneouscoordinates,translationcanbe
expressedasamatrixmultiplication.
B
P = A P + BO A
BP I
=
1 0
OA AP
1 1
Translationiscommutative
Rotation
uuuv
OP = ( iA
jA
B
A
Ax
A
k A ) y = ( iB
Az
jB
P = AB R A P
meansdescribingframeAin
Thecoordinatesystemof
frameB
Bx
B
kB ) y
Bz
Rotation (fromframeAtoB)
Rotation
(from frame A to B)
i A .i B
B
i .j
R
=
A
A B
i A .k B
= B i A
k A .i B
k A . jB
k A .k B
jA .i B
j A . jB
jA .k B
B
jA
k A
A i TB
A T
= jB
A k TB
0
0
1
RX ( ) = 0 cos( ) sin( )
0 sin(( ) cos(( )
cos( ) 0 sin( )
RY ( ) = 0
1
0
sin( ) 0 cos( )
P = AB R A P
B P AB R 0 A P
=
1 0 1 1
Rotationisnotcommutative
Rigid transformations
Rigidtransformations
P = R P + OA
B
A
B P 1
=
1 0
AB R
= T
0
O A AB R 0 A P
1 0 1 1
B
OA A P
1 1
Invertible!
B P B AP
= AT
1
1
X
1 0 0 0
Y
0]P = 0 1 0 0
Z
0 0 1 0
1
Recoverimage(normalized)coordinatebyprojection.
u
X
u =
=
w
Z
v
Y
v =
=
w
Z
Perspective projection
Perspectiveprojection
Recallperspectiveprojection
R ll
i
j i
http://commons.wikimedia.org/wiki/
File:Taiwan_HighSpeedRail_Train_Business_Class_Car.JPG
X
Zr
v=
Y
Zr
1
O
u=X/Z = dimensionless !
u=X/Z=dimensionless!
Pixel units
Pixelunits
Pixelsareonagridofacertaindimension
f
O
u=k f X/Z = in pixels !
u=kfX/Z=inpixels!
[f]=m(inmeters)
[k]=pixels/m
Pixel coordinates
Pixelcoordinates
Weputthepixelcoordinateoriginontopleft
p
p
g
p
f
O
u=u0 +kfX/Z
+ k f X/Z
Pixel coordinates in 2D
Pixelcoordinatesin2D
(0 5 0 5)
(0.5,0.5)
640
X
Y
u0 + kf ,vv 0 + lf
Z
Z
480
( 0,v0)
(u
(640.5,480.5)
j
p = v = K [ I 0] P =
v0 0 1 0 0
Z
w
1 0 0 1 0
1
Recover image (Euclidean) coordinates by normalizing :
u X + sY
u= =
+ u0
w
Z
v Y
v= =
+ v0
w Z
skew
5 Degrees of Freedom !
5DegreesofFreedom!
0 1 0
0 0
u
p = v = K [ I
v0 0 1 0 0
z
sin
z
1
1 0 0 1 0
1
Recover image (Euclidean) coordinates by normalizing :
0] P =
u=
v=
x cot
y
z sin
+ v0
+ u0
cot
p = v = K [ I
z
1
1
= K wc R
z
c
w
0]TP =
cot
sin
1
O P = MP
z
5+6DOF=11!
u0 1 0 0 0
wc R
v0 0 1 0 0
0 0 1 0 0
1
x
y
c
O
w
1 z
1