Game Development Reference
In-Depth Information
As a brief aside, conceptually the acquisition of an image with a camera uses
the same geometric concepts as rendering an image, except that the two oper-
ations are effectively inverses of one another. In rendering we have a geometric
model of the objects in the scene, and then we project them to an image plane.
With a camera, the 2D image is generated for us by the real world, and we are
trying to convert back to a 3D geometric representation of the objects in the
scene. Keeping this in mind during the following discussion should provide some
familiarity to the concepts being discussed.
2.3.1
Pinhole Camera Model
The simplest camera model is typically referred to as a pinhole camera .This
name comes from the fact that we assume that all light that enters the camera
to create the image enters through only a single point and is then striking an
image sensor inside the camera. An example of this type of camera configuration
is depicted in Figure 2.6, which only considers the y -and z -axes for the sake of
simplicity.
Using this image as a reference, we can develop the equations that govern the
projection of 3D objects to 2D representations of those objects in an image. On
the right side of the diagram, we can see an example point P that we want to
project onto our image plane. The light that is reflected off of point P travels
toward the camera, and only some small amount of the light is able to enter the
camera through the pinhole. That light then strikes the image sensor, which we
will simply refer to as the image plane.
The path along which this light travels defines two triangles: one outside of
the camera and one inside of the camera. Since the interior angles of both of the
P
Pinhole
Y
f
Z
-y
p
Figure 2.6. The pinhole camera model.