Camera models Synonyms Central projection

Synonyms
Camera models
A camera model describes a projection from P 3 to P 2 .
The ray through the camera
center orthogonal to the image
plane is called principal axis,
principal ray, camera axis or
central ray.
The camera center is also called
projection center, perspective
center, optical center, or focus.
The most basic camera model is the pinhole camera where a 3D
world point X is projected onto a 2D image point x in the image
plane through a camera center C.
The image plane is also called
focal plane.
In the physical camera, a mirror image is formed behind the
camera center. However, often a virtual image plane is depicted in
front of the camera center.
The intersection between the
principal ray and the image plane
is called principal point or foot
point.
The distance between the camera center and the image plane is
called focal distance, principal distance, camera constant, or filmfocus-distance.
The points X, C and (the 3D point) x are collinear, i.e. lie on the
same line in space.
The plane through the camera
center parallel with the image
plane is called the principal plane.
Y
Y
X
X
y
X
x
X
y
x
C
x
Z
p
principal axis
camera
centre
x
C
Z
p
image plane
camera
centre
principal axis
image plane
– p. 1
Central projection
Central projection in homogenous coordinates
The corresponding expression in homogenous coordinates may
be written as








X
X
f
0
fX


 Y 
  Y 





f
0  


 7→  f Y  = 
 Z  .
 Z 
1 0
Z
1
1
x
P
X
If the camera center is at the origin and the image plane is the
plane Z = f the world coordinate (X, Y, Z)> is mapped to the point
(f X/Z, f Y /Z, f )> in space or (f X/Z, f Y /Z) in the image plane, i.e.
(X, Y, Z)> 7→ (f X/Z, f Y /Z)>
Y
Y
X
– p. 2
X
y
x
x
C
camera
centre
C
p
principal axis
image plane
The matrix P is called the camera matrix and maps the world point
X onto the image point x.
fY/Z
Z
p
Z
In more compact form P may be written as
f
P = diag(f, f, 1)[I | 0],
where diag(f, f, 1) is a diagonal matrix and I is the identity matrix.
– p. 3
– p. 4
The principal point
The camera calibration matrix
If the principal point is not at the origin
of the image coordinate system, the mapping becomes
If we write
py
(X, Y, Z)> 7→ (f X/Z + px , f Y /Z + py )> ,
2
ycam
p
6
K=4
x cam
y
the projection may be written as
where (px , py )> are the image coordinates
for the principal point.
px
x




X
Y
Z
1




f
f X + Zpx

 


 7→  f Y + Zpy  = 

Z
f
px
py
1


0 

0 

0
X
Y
Z
1
f
3
px
7
py 5
1
x = K[I | 0]Xcam .
The matrix K is called the camera calibration matrix. The notation Xcam
emphasizes that the world coordinates are with respect to the camera, i.e.
the camera center is at the origin, the X and Y axes coincide and the
principal axis coincides with the Z axis.
In homogenous coordinates

f





Ycam
Zcam
C
Xcam
– p. 6
– p. 5
The camera position and orientation
Internal and external parameters
Usually the camera coordinate system does not coincide with the world
coordinate system. The two coordinate systems are related via a rotation
and a translation.
The projection equation
x = KR[I | − C̃]X
that describes the general projection for a pinhole camera has 9 degrees of freedom: 3
in K (the elements f, px , py ), 3 in R (rotation angles) and 3 for C̃.
If the point X̃ denotes an cartesian 3D point in world coordinates and X̃cam
denotes the same point in camera coordinates, then their relation is given by
The elements of K describes properties internal to the camera while the parameters of
R and C̃ describe the relation between the camera and the world.
X̃cam = R(X̃ − C̃),
The parameters are therefore called one of
where C̃ is the camera center in world coordinates and R is a 3 × 3 rotation
matrix describing the orientation of the camera in space.
K
internal parameters
internal orientation
intrinsic parameters
sensor model
In homogenous coordinates
Xcam =
"
R
0
−RC̃
1
#
2
3
X
"
6 Y 7
R
6
7
6
7=
4 Z 5
0
1
−RC̃
1
#
R, C̃
external parameters
external orientation
extrinsic parameters
platform model
Sometimes it is practical not to write the camera center explicitly but instead describe
the world-to-camera transformation as X̃cam = RX̃ + t with camera matrix
X,
P = K[R | t],
or
x = KR[I | − C̃]X.
where t = −RC̃.
– p. 7
– p. 8
Aspect ratio
Skew
If we have different scale in the x and y directions, i.e. the pixels are not
square, we have to include that deformation into the equation.
For an even more general camera model we can add a skew parameter s to
describe any non-orthogonality between the image axis. Then the camera
matrix becomes
2
3
αx
s x0
6
7
K=4
αy y0 5 .
1
Let mx and my be the number of pixels per unit in the x and y direction of the
image. Then the camera calibration matrix becomes
2
6
K=4
2
6
=4
32
mx
my
1
mx f
my f
76
54
f
mx px
my py
1
3
px
7
f py 5
1
3 2
αx
7 6
αy
5=4
A camera matrix
P = KR[I | − C̃] = [KR | − KRC̃]
3
x0
7
y0 5 ,
1
where the camera calibration matrix K is in the form above is called a finite
projective camera.
A finite projective camera has 11 degrees of freedom, the same as a 3 × 4
homogenous matrix.
where αx = f mx and αy = f my is the focal length in pixels in the x and y
directions and x̃0 = (x0 , y0 )> = (mx px , my py )> is the principal point in
pixels.
For a finite projective camera P the left 3 × 3 block KR is always non-singular.
If we remove this restriction we get a general projective camera described by
a 3 × 4 matrix of rank 3.
A camera with unknown aspect ratio has 10 degrees of freedom.
– p. 9
The general projective camera
– p. 10
The camera center
A general projective camera P maps world points X onto image
points x according to
x = PX,
The camera matrix P has a 1-dimensional null-space. Let the vector C be a basis for
the null-space, i.e. PC = 0. We will see that C represents the camera center in
homogenous coordinates.
where the camera matrix P is a 3 × 4 homogenous matrix of rank 3.
Study the line through C and an arbitrary point A in space. Points on this line may be
described by
X(λ) = λA + (1 − λ)C, −∞ < λ < ∞.
A general projective camera may be blocked as
Under the mapping x = PX points on the line are mapped to
P = [M | p4 ],
x = PX(λ) = λPA + (1 − λ) PC = λPA, −∞ < λ < ∞.
|{z}
where M is a 3 × 3 matrix. We will see that P is a finite camera iff M
is non-singular
=0
This means that all points on the line are mapped to the same point PA. Thus, the line
has to be a ray through the camera center. Since A was arbitrary, C must be a
homogenous representation of the camera center.
For finite cameras this is given from the fact that C = (C̃> , 1)> is a null-vector to
P = KR[I | − C̃].
Another line of reasoning concludes that the projection PC = (0, 0, 0)> is undefined
and the camera center is the only point with an undefined projection.
– p. 11
– p. 12
The camera column vectors
The camera row vectors
Let pi , i = 1, . . . , 4 be the columns of P. Then p1 , p2 , p3 are the
mappings of the axis directions in the world coordinate system.
Let Pi> , i = 1, . . . , 3 be the rows of P.
The principal plane of the camera is the plane through
the camera center parallel with the image plane. It
consists of all points X that are mapped to the line at
infinity in the image plane, i.e. PX = (x, y, 0)> .
E.g. the X axis D = (1, 0, 0, 0)> is mapped to

PD =
h
p1
p2
p3
p4
i



1
0
0
0

A point is on the principal plane iff P3> X = 0. Thus
the vector P3 represents the principal plane.
Especially C is in the principal plane since PC = 0.


 = p1 .

All points X on the plane P2 satisfy P2> X = 0 and
are therefore mapped to PX = (x, 0, w)> on the
image x axis. Since PC = 0 the plane P2 the plane
may be defined by the camera center and the image x
axis.
The column vector p4 is the mapping of the world origin (0, 0, 0, 1)> .
Z
1
Similarly the plane P may be defined by the camera
center and the image y axis.
p
3
C
O
p
Y
1
X
x
principal plane
y
x
P2
The vectors P1 and P2 depend on the internal coordinate system of the camera. P3 does not.
2
p
y
P3
– p. 13
The principal point and the principal axis
The principal axis is the line through the camera center C
orthogonal to the principal plane P3 .
– p. 14
The direction of the principal axis
In theory all points X outside the principal plane are projected to a finite point
in the image plane according to x = PX. In reality only points in front of the
camera.
The axis intersects the image plane in the principal point.
Let P = [M | p4 ]. We know that m3 points in the direction of the principal axis.
However, the sign of P is undefined so the question is if m3 or −m3 points in
the positive direction.
The normal of the principal plane P3 = (p31 , p32 , p33 , p34 )> has
direction P̂3 = (p31 , p32 , p33 , 0)> .
Study the projection
The projection of this point gives the principal point PP̂3 .
If P = [M | p4 ] the principal point is calculated as
x = Pcam Xcam = K[I | 0]Xcam ,
where Xcam is a 3D point in camera coordinates. Note that the vector
v = det(M)m3 = (0, 0, 1)> points forward in the direction of the principal axis,
independently of the scaling of Pcam since
x0 = Mm3 ,
where m3> is the third row of M.
Pcam → kPcam ⇒ v → k 4 v
with unchanged sign.
In world coordinates the camera matrix is P = kK[R | − Rp4 ], where M = kKR.
Since det(R) = +1 the direction of v = det(M)m3 is unchanged.
– p. 15
– p. 16
Forward and backward projection of points
Point depth
A world point X is forward projected (mapped) onto an image point
according to x = PX.
Study a camera P = [M | p4 ] that projects a point X = (X, Y, Z, 1)> = (X̃> , 1)> in
R3 on the image point x = w(x, y, 1)> = PX.
Points at infinity (vanishing points) D = (d> , 0)> are mapped to
Let C = (C̃> , 1)> be the camera center. Then
w = P3> X = P3> (X − C)
x = PD = [M | p4 ]D = Md
since PC = 0 for the camera center C.
and are only affected by the left 3 × 3 block M of P.
Since
An image point is backward projected as a ray in space. We know
two points on this ray: The camera center C and the point P+ x,
where P+ is the psuedo inverse of P. The psuedo inverse of P is
the matrix P+ = P> (PP> )−1 such that PP+ = I.
P3> (X − C) = m3> (X̃ − C̃),
where m3 is the direction of the principal axis,
w = m3> (X̃ − C̃)
+
The point P x is on the ray since it is projected onto x, since
P(P+ x) = Ix = x.
may be interpreted as the inner product between the direction of the principal axis and
the ray through the camera center and X.
The ray can thus be describes as the line
X(λ) = P+ x + λC.
– p. 18
– p. 17
Point depth
Factorizing the camera matrix
If the camera matrix has been normalized such that det(M) > 0 and km3 k = 1 the m3
is a unit vector in the positive principal axis direction. Then w may be interpreted as
the depth of the point X from the camera center C in the direction of the principal axis
Given a camera matrix P the camera center is given from the nullspace
PC = 0.
For a finite camera
X
P = [M | − MC̃] = K[R | − RC̃]
with det(M) > 0, K and R may be calculated by the RQ factorization of M.
m3
C
The RQ factorization of a matrix A gives an upper triangular matrix K (“R”)
and an orthogonal matrix R (“Q”) such that KR = A.
X . m3
The matrix R describes the orientation and K the calibration of the camera.
For an unnormalized camera matrix, the depth of a point X = (X, Y, Z, T )> with
respect to a camera P = [M | p4 ] may instead be calculated as
depth(X; P) =
If K is chosen to have positive diagonal elements the factorization is unique.
If the calibration matrix K is scaled such that K33 = 1 it may be interpreted as
sign(det(M))w
,
T km3 k
2
6
K=4
where
P(X, Y, Z, T )> = w(x, y, 1)> .
If P is a finite camera, then all points satisfying
αx
s
αy
3
x0
7
y0 5 .
1
sign(det(M))w/T > 0
– p. 19
– p. 20
Affine cameras
An affine camera P = [M | p4 ] is an infinite camera, i.e. M has rank 2.
An affine camera P has last row P3> = (0, 0, 0, 1)> .
Points at infinity in P 3 are mapped onto points at infinity in P 2 .
The camera center C is on the plane at infinity.
The principal plane is the point at infinity.
The principal point is undefined.
The canonical form [I | 0] is replaced by the parallel projection matrix
2
1
6
4 0
0
0
1
0
3
0
7
0 5.
1
0
0
0
The camera caibration matrix K is replaced by
"
K2×2
0
0
1
#
.
– p. 21