i
i
i
i
i
i
i
i
58 3. Raster Images
3.1.3 Input Devices
Raster images have to come from somewhere, and any image that wasn’t com-
puted by some algorithm has to have been measured by some raster input device,
most often a camera or scanner. Even in rendering images of 3D scenes, pho-
tographs are used constantly as texture maps (see Chapter 11). A raster input
device has to make a light measurement for each pixel, and (like output devices)
they are usually based on arrays of sensors.
A digital camera is an example of a 2D array input device. The image sensor
lens
image
sensor
scene
Figure 3.7. The operation
of a digital camera.
in a camera is a semiconductor device with a grid of light-sensitive pixels. Two
common types of arrays are known as CCDs (charge-coupleddevices) and CMOS
(complimentary metal–oxide–semiconductor) image sensors. The camera’s lens
projects an image of the scene to be photographed onto the sensor, and then each
pixel measures the light energy falling on it, ultimately resulting in a number that
goes into the output image (Figure 3.7). In much the same way as color displays
use red, green, and blue subpixels, most color cameras work by using a colo r-filter
array or mosaic to allow each pixel to see only red, green, or blue light, leaving
the image processing software to fill in the missing values in a process known as
demosaicking (Figure 3.8).
Figure 3.8. Most color
digital cameras use a color-
filter array similar to the
Bayer mosaic
shown here.
Each pixel measures either
red, green, or blue light.
Other cameras use three separate arrays, or three separate layers in the array, to
measure independent red, green, and blue values at each pixel, producing a usable
color image without further processing. The resolution of a camera is determined
by the fixed number of pixels in the array and is usually quoted using the total
count of pixels: a camera with an array of 3000 columns and 2000 rows produces
an image of resolution 3000 × 2000, which has 6 million pixels, and is called a
6 megapixel (MP) camera. It’s important to remember that a mosiac sensor does
People who are selling
cameras use "mega" to
mean 10
6
, not 2
20
as with
megabytes.
not measure a complete color image, so a camera that measures the same number
of pixels but with independent red, green, and blue measurements records more
information about the image than one with a mosaic sensor.
A flatbed scanner also measures red, green, and blue values for each of a grid
of pixels, but like a thermal dye transfer printer it uses a 1D array that sweeps
across the page being scanned, making many measurements per second. The
resolution across the page is fixed by the size of the array, and the resolution
The resolution of a scanner
is sometimes called its “op-
tical resolution” since most
scanners can produce im-
ages of other resolutions,
via built-in conversion.
along the page is determined by the frequency of measurements compared to the
speed at which the scan head moves. A color scanner has a 3 × n
x
array, where
n
x
is the number of pixels across the page, with the three rows covered by red,
green, and blue filters. With an appropriate delay between the times at which the
three colors are measured, this allows three independent color measurements at
each grid point. As with continuous-tone printers, the resolution of scanners is
reported in pixels per inch (ppi).