Digital Images
(Based on material from Digital Imaging: Theory and Applications, H. E. Burdick, McGraw-Hill, 1997)
The world that we see or perceive is composed of
images created
in our minds based on sensory information gathered by our eyes. Most of us see
in wide-angle, and in vivid color. Our two eyes give us binocular vision
that allows us to perceive and navigate in three dimensions. We can see
in bright sunlight and also in nearly total darkness.
Analog Eyes and Digital Images
Human vision is analog, a term defined to describe data that
is represented by continuously variable physical quantities. Image elements
blend together smoothly for us: the red horizon of a sunset merges seamlessly
with the deep blue of the darkening sky. We can see objects that are large,
and at the same time details that are quite small. We are able to differentiate
subtle variations in light value, hue and saturation.
When a real-world image or scene is captured and stored in a computer,
this continuous range of detail, intensities, and colors must be converted
to discrete digital values. These continuous physical characteristics
must be converted into numbers of limited range so they can be stored and
manipulated by the computer. The image becomes digital, and its characteristics
are no longer continuous, but become discrete.
Human vision can distinguish image intensity or brightness levels over
a wide range of continuous values. A digital image however, can only contain
a discrete range of values, usually represented by integers within a limited
range. The same is true with color. The human eye, for example, can distinguish
a very large number of subtly different shades of red. But in a digital
image there might be only a few hundred, or at most a few thousand, distinguishable
shades of red.
Why bother with digital images? The answer lies in what we can do with
and to those images. There are many, many ways to manipulate digital
images; manipulations that we could not accomplish in other ways.
Image Spatial and Depth Resolution
The quality of conversion from the analog world to the digital is determined
by image resolution. There are two types of digital image resolution -
spatial resolution and color or intensity (depth) resolution.
Analog images are continuous in detail (spatial resolution) and in color
(depth resolution.) But digital images inherently have limited spatial
and color information.
Let's consider spatial resolution first. The figures below show a real
image and the same image with a 16 by 16 pixel grid overlaid which divides
the image into16 pieces in the horizontal dimension and 16 pieces in the
vertical dimension. In the real image, much detail is visible in each area
of the corresponding subdivided image. In the subdivided image we impose
the restriction that the entire area within each square to be represented
by only a single intensity value. The resulting image is not recognizable.
If the original image is divided into 32 by 32 pixels, it is somewhat recognizable,
but all fine detail is lost. These digitized images have low spatial resolution.
Digital images can also present information from sensors that see
outside of the visible spectrum. The visible spectrum for humans includes
wavelengths between about 400 to 700 nanometers, only a tiny fraction of
the electromagnetic spectrum. Certain sensors can generate digital images
that allow us to see in the microwave, infrared, ultraviolet, or
even x-ray regions of the spectrum. In this way, digital images extend
the capabilities of human vision. These capabilities can extend even beyond
the electromagnetic spectrum. An ultrasound image lets us see with sound,
and a MRI scan creates a digital image based on the responses of molecules
to magnetic fields.
|
|
| Real | |
|
|
| 16 x 16 | 32 x 32 |
|
|
| 64 x 64 | 128x128 |
Spatial resolution is usually determined by the sensor used to digitize the image or by the process used to create synthetic images. The next image version above has a spatial resolution of about 64 by 64 pixels, which is usually written as 64 x 64. The horizontal dimension is usually referred to as x and the vertical dimension is y, with the origin, location (0,0), in the upper left corner. If each pixel needs 1 byte of computer storage space to hold its value, saving this digital image would require a total of 4096 bytes (64 times 64 pixels, times 1 byte per pixel). Now suppose that we captured the same scene with a different sensor, one that has higher spatial resolution, say 128 x 128 pixels, or twice the resolution as shown in the last image above. It is obvious that this image can convey finer detail about the scene. It has a higher spatial resolution. But there is a cost involved. Even though the resolution of this image is only twice as high as the 64 x 64 pixel image, it requires 16384 bytes to store (128 times 128 times 1), or four times the amount of space required for the 64 x 64 image. This is because digital images are two-dimensional data sets. If one room in your house were 10 feet by 10 feet in size, for example, the area of the room is 100 sq. ft. If another room were twice that size in each dimension, or 20 x 20 feet, its area would be 400 sq. ft., not 200. The storage required for a digital image is a function of the product of the dimensions, not the sum.
In most practical applications, a 64 x 64 pixel image is probably not usable. North American television transmissions, when digitized, are commonly converted to 640 x 480-pixel images. Digital images to be projected in movie theaters are a minimum of 2048 x 1536 pixels in size. If you consider that these images are in color, meaning that each pixel requires 3 bytes (1 byte each for red, green, and blue), the storage requirements are 921,600 (almost a million) bytes for each television image. Each movie image, or frame, requires 9,437,184 bytes-more than 10 times as much. And if you further consider the fact that television displays 30 images per second and movie film runs at 24 frames per second, it becomes clear that only the recent advances in low-cost data storage and data compression techniques have made digital imagery widely accessible.
Some applications, such as space-based sensors that capture images of the Earth, have very high resolution. These can be on the order of tens of thousands of pixels in both the x and y dimensions, requiring phenomenal amounts of storage space for each image.
Depth Resolution
The other resolution with which digital imagery is concerned is color resolution or color depth resolution. This refers to the amount of information, the number of digital bits, stored for each image pixel. One or more bits can define the color intensity of a pixel. A single bit can represent a pixel value of black (0) or white (1). Two bits combined can represent a pixel value of black (00), dark gray (01), light gray (10), and white (11). Similarly, three bits can represent eight levels of intensity. Eight bits, or 1 byte, provide 256 levels of intensity. The number of bits used to hold each pixel value defines the depth resolution of a digital image. The following figures show images that have depth resolutions of 8 bits (256 intensity levels), 4 bits, 3 bits, 2 bits and finally only one bit.
| |
|
|
|
|
The depth resolution required for various digital images depends on the content of the images and the application. The text on a printed page can be represented with a depth resolution of 1 bit, or with pixels of either black or white. Television images contain only about 7 bits of depth resolution, or 128 levels of intensity. Computer displays typically present up to 256 levels of intensity each for the red, green, and blue primary colors. Therefore most displayed images usually have a depth of 24 bits; 8 for the red component, 8 for the green, and 8 for the blue information. High-end, full color images, such as those for film or detailed satellite imagery, often require 10 bits or even 12 bits for each color component. This means that a total of up to 36 bits may be needed for each image pixel.
Since digital images are usually two-dimensional, the processing loops of most image programs are basically two nested loops, one for the x dimension and one for the y dimension. Most programs are written for processing three-plane color images, but can be modified to process single-plane grayscale images.
Spatial vs. Depth Tradeoff
One final consideration about spatial and depth resolutions is that they are not independent of one another. In other words, an image that has low spatial resolution and high depth resolution could, in its final output form, look similar in quality to one that has high spatial resolution but low depth resolution. This may sound confusing, but it can be explained with the following example.
Many newspaper photographers now use digital cameras to capture their pictures. These images generally have fairly low spatial resolution, 640 x 480 pixels, but high depth resolution, 8 bits per color or 24 bits per pixel. Once an image has been enhanced, cropped, or otherwise manipulated, it is ready for printing on the newspaper page. This generates a dilemma. Most monochrome newspaper pictures are printed with only 1-bit depth resolution; for color pictures, there is 1 bit for each of the primary printing inks of cyan, yellow, magenta, and black. Either way, there's only a dot of ink that's on or off.
However, we know that if we reduce the depth resolution of a 24-bit color image to only 4 bits, the results will be unacceptable. Therefore processing methods such as halftoning are used to simulate depth resolutions greater than 1 bit. The lack of depth resolution can be traded off for higher spatial resolution. The original 640 x 480 image may be expanded in size to thousands of pixels across and miraculously once the image is printed, even with only 4-bit depth resolution it maintains a high-quality look.