Previous Table of Contents Next


Chapter 11
Mathematics Primer

What This Chapter is About

This chapter reviews all the important mathematical concepts this book requires. The various topics are:

This material attempts to capitalize on intuitive analogies. We opt for the latter because there is no shortage of complex image processing discussions. At least give the first topic a try—you may well be surprised how well you do.

Normalization

Suppose you have an automobile that drives forward at a maximum 100 miles per hour (mph). If we define a forward speed as not going in reverse, this car’s allowable forward speeds are zero (stopped but not going in reverse) up to and including 100 mph. Here, the car’s forward speeds can vary continuously (can assume any value, say exactly 52.6863452639204 mph) and have an absolute range or dynamic range from zero to 100.

A normalized forward speed is the speed divided by the absolute range’s maximum speed (100 mph). Thus, 50 mph becomes 50/100, or 0.50, and 25 mph becomes 25/100, or 0.25. How about 66.3 mph? (Answer: 0.663.) Since allowable absolute speeds range from and include zero up to and including 100, normalized speeds therefore range from and include 0.00 (0 mph divided by 100 mph) up to and including 1.00 (100 mph divided by 100 mph). Pretty simple, right?

Normalization is important when image processing assigns values to light intensities. Sometimes a monitor’s absolute intensity range varies from zero (dark) to fifteen (maximum intensity). Other times the absolute range is from zero (dark) to 255 (maximum intensity). In the first case, an intensity with a value of five is 5/15, or one-third the maximum intensity value. In the second case, an intensity with a value of five is 5/255, or 1/51 the maximum intensity value. To have one-third the maximum intensity value requires the absolute value to be 255/3, or 85.

So, to eliminate intensity value confusion, digital imaging discussions use normalized intensity values. When an intensity has a 0.5 value, multiplying it by the maximum intensity value translates it to its output intensity value. For example, 0.5 times 255 produces 127.5 which becomes 127 in integer arithmetic. Finally, normalization is used to understand gamma correction procedures.

Gamma Correction

Using normalized image processing values suggests we can obtain a 50 percent output display intensity by specifying a value of 0.5, regardless of the display (e.g., monitor) characteristics. But things are not that simple. In fact, most display devices do not have a linear (straight line) response to normalized image values. An analogy helps to explain this.

Suppose you have a one-gear automobile that drives forward at a maximum 100 miles per hour (mph). If you set your speed control dial to zero percent, you are at rest (zero mph). Similarly, if you set the speed control dial to 100 percent, you eventually go 100 mph. Normalizing, you can continuously go 0.00 to 1.00, depending on the speed dial setting.

Now, suppose you set the speed dial halfway (0.50) and discover you go less than 50 mph. You eventually reach 50 mph by periodically increasing the speed dial setting and watching your speedometer. When you achieve 50 mph, you leave the speed dial in that position. For other speeds you might do the same. Finally, to automate the process, you might construct a look-up table (LUT), similar to Table 11-1, which lists a speed dial setting for every desired speed.

Speed Look-Up Table
Desired Speed (MPH) Normalized Desired Value Required Speed Dial Setting
0 0.00 0.00
50 0.50 0.7075
100 1.00 1.00

Table 11-1: Look-up table

This type of situation exists in image processing. Quantized images may direct monitors to reach a 0.50 normalized intensity level for one or more pixels. However, intensity measurements may reveal the normalized intensity level is only 0.25—far too dark and far from satisfactory. So, image processing software must compensate for this hardware phenomena. One approach creates a LUT for every display intensity and color combination. This requires millions of measurements and several megabytes. And, as phosphors age, the table becomes increasingly invalid.


Previous Table of Contents Next