camera models acknowledgements used slides/content with permission from marc pollefeys for the...
Post on 20-Dec-2015
214 views
TRANSCRIPT
Camera Models
Acknowledgements
Used slides/content with permission from
Marc Pollefeys for the slidesHartley and Zisserman: book figures from the web
Matthew Turk: for the slides
April 2004 Camera Models 2
Camera model
Camera calibration
Single view geom.
Single view geometry
April 2004 Camera Models 3
Pinhole camera geometry
• A general projective camera P maps world points X to image points x according to x = PX.
April 2004 Camera Models 4
TT ZfYZfXZYX )/,/(),,( a
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
101
0
0
1
Z
Y
X
f
f
Z
fY
fX
Z
Y
X
a
Central projection in homogeneous coordinates
April 2004 Camera Models 5
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
101
0
0
Z
Y
X
f
f
Z
fY
fX
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
101
01
01
1Z
Y
X
f
f
Z
fY
fXPXx =
[ ]0|I)1,,(diagP ff=
Camera projection matrix P
P: principal point
Principal plane
April 2004 Camera Models 6
Tyx
T pZfYpZfXZYX )/,/(),,( ++a
principal pointT
yx pp ),(
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛++
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
101
0
0
1
Z
Y
X
pf
pf
Z
ZpfY
ZpfX
Z
Y
X
y
x
x
x
a
Pinhole point offset
Image (x,y) and camera (x_cam, y_cam) coordinate systems.
April 2004 Camera Models 7
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛++
101
0
0
Z
Y
X
pf
pf
Z
ZpfY
ZpfX
y
x
x
x
€
x = K I | 0[ ]Xcam
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
1y
x
pf
pf
Kcalibration matrix
camera is assumed to be located at the center of a Euclidean coordinate system with the principal axis of the camera point in the direction of z-axis.
Camera calibration matrix K
April 2004 Camera Models 8
( )C~
-X~
RX~
cam =
€
Xcam =R −R ˜ C
0 1
⎡
⎣ ⎢
⎤
⎦ ⎥
X
Y
Z
1
⎛
⎝
⎜ ⎜ ⎜ ⎜
⎞
⎠
⎟ ⎟ ⎟ ⎟
=R −R ˜ C
0 1
⎡
⎣ ⎢
⎤
⎦ ⎥X
€
x = K I | 0[ ] Xcam = KR I | - ˜ C [ ] X[ ]t|RKP = C
~Rt −=
PXx =
Camera rotation and translation
Euclidean transformation between world and camera coordinate frames
Inhomogeneous 3-vector of coordinates of a point in the world coordinate frame.
Same point in the camera coordinate frame
Coordinates of camera center in world coordinates
April 2004 Camera Models 9
Internal and exterior orientation
• has 9 dof– 3 for K (f, px, py)
– 3 for R
– 3 for
• Parameters contained in K are called the internal camera parameters, or the internal orientation of the camera.
• The parameters of R and which relate the camera orientation and position to a world coordinate system are called the external parameters or exterior orientation.
• Often convenient not to make the camera center explicit, and instead to represent the world->image transformation as , where
April 2004 Camera Models 10
€
K =
α x x0
α y y0
1
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥€
K =
mx
my
1
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
f px
f py
1
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
CCD camera: 10 dof
CCD Cameras
CCD Cameras: may have non-square pixels!
April 2004 Camera Models 11
Finite projective camera
S: skew parameter;0 for most normal cameras
A camera with K as above is called a a finite projective camera.
A finite projective camera has 11 degrees of freedom. This is the same number of degrees of freedom as a 3 x 4 matrix, defined up to an arbitrary scale.
Note that the left hand 3 x 3 submatrix of P, equal to KR, is non-singular.
any 3 x 4 matrix P for which the left hand 3 x 3 submatrix is non-singular is the camera matrix for some finite projective camera.
April 2004 Camera Models 12
Camera centerColumn pointsPrincipal planeAxis planePrincipal pointPrincipal ray
Camera anatomy
April 2004 Camera Models 13
0PC =null-space camera projection matrixConsider:
For all A all points on ray AC project on image of A, therefore C is camera center
Image of camera center is (0,0,0)T, i.e. undefined
Camera Center
Consider the line containing C and any other point A in 3-space.
April 2004 Camera Models 14
[ ] [ ]⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
0
0
1
0
ppppp 43212
Column Vectors
: image of the world origin.
The columns of the projective camera are 3-vectors that have a geometric meaning as particular image points.
P1: vanishing point of the world coordinate x-axisP2: vanishing point of y-axisP3: vanishing point of z axis
April 2004 Camera Models 15
Row Vectors and the Principal Plane
The principal plane is the plane through the camera center parallel to the image plane. It consists of the set of points X which are imaged on the line at infinity of the image. i.e.,
A point X lies on the image plane iff
In particular, the camera center C lies on the principal plane. P3 is the vector representing the principal plane of the camera,
April 2004 Camera Models 16
Principal Plane
April 2004 Camera Models 17
Axis planes
note: p1,p2 dependent on image x and y axis (choice of image coordinage system).
Consider the set of points X on plane P1. This set satisfies:
These are imaged at PX = (0,y,w)^T these are points on the image y-axis.Plane P1 is defined by the camera center and the line x=0 in the image.Similarly, P2 is given by P2.X =0,
April 2004 Camera Models 18
principal point
( )0,,,p̂ 3332313 ppp=
∞
The principal point
Principal axis: is the line passing through the camera center C, with direction perpendicular to the principal plane P3.The axis intersects the image plane at the principal point.
April 2004 Camera Models 19
ii xX ↔
? P
Resectioning
Estimating the camera projection matrix from corresponding 3-space and image measurements -> resectioning.
Similar to the 2D projective transformation H.H was 3x3 whereas P is 3x4.
April 2004 Camera Models 20
ii PXx =
0Ap =
Basic equations
: is a 4-vector, the i-th row of P.
Each point correspondence gives 2 independent equations.A = 2n x 12 matrixp: 12 x 1 column vector.
April 2004 Camera Models 21
0Ap =
minimal solution
Over-determined solution
5.5 correspondences needed (say 6)
P has 11 dof, 2 independent eq./points
n 6 points
Apminimize subject to constraint
1p =
1p̂3 =3p̂
=P
Camera matrix P
April 2004 Camera Models 22
HW #3: Computing P
• Will be posted soon.
• Will be due next week.