At the end of this module you should be able to do the following:
Describe how digital images are represented
Enumerate and define important technical properties of digital images
Describe what a digital image metadata are for
Name some common image file formats
Describe what information compression is and why it is important
Describe possible effect of compression on a file
Digital images (which are also referred to as graphics) are rich and expressive way of communicating content to a reader. This section is an introduction to issues specific to digital images and digital imaging.
Allot 30 minutes
First, watch a video about digital imaging produced by Udacity and embedded below.
Then read selected pages from Cornell University Library Digital Imaging Online Tutorial. The URLs to the pages are linked in the list of the following key ideas:
A digital image is a 2D array of numbers. In the example on this page, the values are bitonal, but you can have more than 2 values to represent all shades of gray.
Digital images are approximations. Namely, they are approximations of a non-digital reality, and the amount by which you sample that reality determines how fine the approximation is. The amount by which you sample determines the resolution of the image.
The size of a digital image is given by its pixel dimensions. The resolution of a file (which is measured in dots per inch, or dpi) and the dimensions of a file (e.g., 8 inches x 10 inches) give you the pixel dimensions of a file.
The bit depth of an image determines how many colors you can display.
There is a trade-off between showing large contrasts and showing fine detail. Setting the dynamic range of your image determines which of the two you emphasize.
In order for software to display an image file correctly, image metadata are embedded in the image file. These metadata are data about the image data, such as file format, bit depth, and author.
Digital media files can use up many, many bits of information, so many in fact that size of the file may become problematic. If you've ever tried to download or email a video file or a very large digital image, you will know what I mean! So sometimes, we need to compress digital graphics and audio while retaining as much of the original information as possible. In this section, you will be introduced to some basic concepts around compression, noise, and artifacts.
Read selected pages from Cornell University Library Digital Imaging Online Tutorial. The URLs to the pages are linked in the list of the following key ideas:
This page discusses how to estimate file size of an (uncompressed) image.
Digital images can be compressed to save disk space, but fidelity may suffer.
Different image file formats are appropriate for different purposes. As a rule of thumb, use GIF if the image does not have too many colors, JPG if there are a lot of colors but the image is not very detailed, and PNG if there lots of colors and lots of detail and you want to conserve disk space as much possible.
There are two general types of compression mechanisms. Lossy compression discard data irretrievably. This leads to some loss of quality, but depending on how the compression is performed, this loss may not be noticeable. Lossless compression reduces file sizes without discarding essential information. This is possible because the way that data is recorded as bits is not always efficient. Generally, lossy compression can produce more dramatic file size reductions. Save your media in file formats that use lossless compression whenever possible, but also remember that lossy compression (if managed well) can provide significant benefits without affecting the experience of the user.
Representing information using bits--and especially if you compress the information--carries inherent risks. Two of these are noise and artifacts. Noise is unwanted data or data that carries no useful information , while digital artifacts are imperfections that result from the editing, compression, and reproduction of digital media. (See this archived post from StackExchange.com for a more detailed explanation on the difference between noise and artifacts.)
In digital photography, noise is a grainy effect that occurs because of sub-optimal lighting conditions, poor choice of shutter speed, imperfections in the camera hardware, or a combination of these factors.
In sound recording, noise can occur also because of imperfections in the recording equipment, but also because ambient sound is not filtered out during the recording process. Often, this ambient sound is a sustained, undifferentiated hum that has a particular kind of "flavor". Or maybe the better term is "color", because noise is often categorized according to colors, such as white noise, purple noise, and grey noise. You can listen to Brown noise here. (See this discussion on Wikipedia on noise colors for more information about audio noise. Also, whitenoisemp3s.com offers various background sounds for download; these hour-long tracks include "brown noise", "refrigerator hum", and "air conditioner hum".)
Let's talk about digital artifacts now. A common artifact in JPEG images is the presence of blocky areas, such as shown in the image below. JPG is a lossy compression scheme and it throws away fine details. When those details are discarded, you get blockiness (Figures 5.3a and 5.3b).
Sound can have artifacts, too, but artifacts in digital sound takes a different form. A common one involves a metallic quality in the sound of highly compressed MP3 files.
Figure 5.3a. Image of an orchid
Figure 5.3b. Compressed version of Figure 5.3
How many bits do you need to represent 3000 grayscale tones?
Why do outdoor photos taken early in the morning or late in the afternoon often turn out better than those taken at noon?
Consider the dialog box in this scanning program (see Figure 5.5). Why do you think the programming is asking you to specify the kind of picture you want to scan?
In many Hollywood spy and science fiction films, you often see details of faces, buildings, and other structures reconstructed from very blurry or pixellated images. A classic example includes Blade Runner (see the Video 5.1.). In reality, to what extent is this possible?