Graphics Reference
In-Depth Information
Also, the origin of the physical image plane is in its center, while we usually index
the pixels of an image from the upper left-hand corner. Finally, the physical sensor
elements of a CCD may not actually be square, while in digital image processing we
coordinates in Equation (
6.1
) to determine the pixel coordinates in the digital images
we actually obtain, namely:
x
d
x
+
˜
y
d
y
+
˜
x
=
x
0
y
=
y
0
(6.2)
Here,
d
x
and
d
y
are the width and height of a pixel in the physical units used to
measure the world (e.g., meters). The quantity
d
x
/
d
y
is called the
aspect ratio
of a
pixel. The point
is the location, inpixel units, corresponding to the ray fromthe
camera center that is perpendicular to the image plane, called the
principal point
.
The principal point is usually very near the center of the image, but it may not be
exactly centered due to camera imperfections.
The parameters in Equation (
6.1
) and Equation (
6.2
) can be neatly encapsulated
by the
camera calibrationmatrix
K
:
(
x
0
,
y
0
)
α
0
x
0
x
K
=
0
y
y
0
001
α
(6.3)
where
α
x
=
f
/
d
x
and
α
y
=
f
/
d
y
represent the focal length in units of
x
and
y
pixels.
The four parameters
are called the
internal
or
intrinsic parameters
of
the camera, since they define the operation of the camera independently of where it
is placed in an environment.
3
We can see that the camera calibrationmatrix
K
relates the camera coordinates of
a scene point
(α
x
,
α
y
,
x
0
,
y
0
)
(
)
X
c
,
Y
c
,
Z
c
to the homogeneous coordinates of the corresponding pixel
(
x
,
y
)
via the simple equation
x
y
1
X
c
Y
c
Z
c
∼
K
(6.4)
The symbol
in Equation (
6.4
) means that the two vectors are equivalent up to
a scalar multiple; that is, to obtain actual pixel coordinates on the left side of
Equation (
6.4
), we need to divide the vector on the right side of Equation (
6.4
)
by its third element (corresponding to the perspective projection operation in
Equation (
6.1
)). For example, suppose a camera described by
K
∼
=
diag
(
10, 10, 1
)
2
Most digital cameras today use physically square sensor elements, but this was not always the case.
3
It is theoretically possible that the sensor elements are not physically rectangles but actually par-
allelograms, leading to a fifth internal parameter called the
skew
that appears in the (1,2) element
of
K
. We assume that the skew of all cameras considered here is exactly 0, which is realistic for
virtually all modern cameras.