F-16 2 Basics
also be achieved if a small hole is drilled in a thin planar object and this plane is held parallel in front of
another plane (the image plane).
The second type of lens that is relevant for machine vision is called a telecentric lens. Its major difference
is that it effects a parallel projection of the world coordinates onto the image plane (for a certain range
of distances of the object from the camera). This means that objects have the same size in the image
independent of their distance to the camera. This combination of camera and lens is called a telecentric
camera model.
In the following, first the camera model for area scan cameras is described in detail, then, the camera
model for line scan cameras is explained.
2.2.1 Area scan cameras
Figure 11 displays the perspective projection effected by a pinhole camera graphically. The world point
P is projected through the optical center of the lens to the point P
0
in the image plane, which is located
at a distance of f (the focal length) behind the optical center. Actually, the term “focal length” is not
quite correct and would be appropriate only for an infinite object distance. To simplify matters, in the
following always the term “focal length” is used even if the “image distance” is meant. Note that the
focal length and thus the focus must not be changed after applying the camera calibration.
Although the image plane in reality lies behind the optical center of the lens, it is easier to pretend that
it lies at a distance of f in front of the optical center, as shown in figure 12. This causes the image
coordinate system to be aligned with the pixel coordinate system (row coordinates increase downward
and column coordinates to the right) and simplifies most calculations.
With this, we are now ready to describe the projection of objects in 3D world coordinates to the 2D
image plane and the corresponding camera parameters. First, we should note that the points P are given
in a world coordinate system (WCS). To make the projection into the image plane possible, they need
to be transformed into the camera coordinate system (CCS). The CCS is defined so that its x and y axes
are parallel to the column and row axes of the image, respectively, and the z axis is perpendicular to the
image plane.
The transformation from the WCS to the CCS is a rigid transformation, which can be expressed by a pose
or, equivalently, by the homogeneous transformation matrix
c
H
w
. Therefore, the camera coordinates
p
c
= (x
c
, y
c
, z
c
)
T
of point P can be calculated from its world coordinates p
w
= (x
w
, y
w
, z
w
)
T
simply by
p
c
=
c
H
w
·p
w
(21)
The six parameters of this transformation (the three translations t
x
, t
y
, and t
z
and the three rotations α,
β, and γ) are called the exterior camera parameters because they determine the position of the camera
with respect to the world. In HALCON, they are stored as a pose, i.e, together with a code that describes
the order of translation and rotations.
The next step is the projection of the 3D point given in the CCS into the image plane coordinate system
(IPCS). For the pinhole camera model, the projection is a perspective projection, which is given by
u
v
=
f
z
c
x
c
y
c
(22)