| Previous | Table of Contents | Next |
A simpler approach uses a function to describe the relationship between the input pixel values and the monitors intensity value. A function is simply a mathematical rule that relates one set of numbers (pixel values in this case) to another (the monitors measured intensity). Once the function is known, it is easy to put the values in a look-up table (described above) and use this to correct the monitor output values. For high accuracy, a complicated function could be required. But, it turns out we can do a very good job with the following simple function:
output display intensity = (input pixel value)gamma
where the value gamma is an exponent (the number of times a normalized value is multiplied by itself). For most display monitors we need a gamma in the range of 0.5 to 0.8, and this fractional exponent compresses the range pixel values so that the monitor output is approximately correct. The challenge is picking the gamma value without making numerous measurements and calculations.
A straightforward approach uses midpoint correction. In this approach we pick the gamma value so a 0.50 input pixel value gives a 0.50 output intensity and then apply this value (using the above function) to all pixel values in the input range of 0 to 1.0. To continue the speed dial example, we compute a gamma of 0.5 (square root) using the midpoint correction method.
Gamma correction is a fundamental video system and computer graphics consideration. Referring to Table 11-1, note setting the speed dial to 0.7075 produced a desired normalized 0.50 speed value. Note also that multiplying 0.7075 times 0.7075 approximately produces 0.50. Restated, 0.7075 squared approximately produces 0.50 which means 0.7075 is the approximate square root of 0.50. So, taking the square root of the desired normalized speed provides a quick speed dial setting for the normalized speed. Whats going on?
Previous material discussed normalization, a process that transforms a number range into a range from 0.00 to 1.00. This range has an unusual propertymultiplying any number in the range by itself produces a number that is smaller than the original number. So for numbers within this range, a numbers square root is bigger than the original number. Transforming the normalized square root value back into the original absolute range, therefore, produces a larger absolute number than the original absolute number.
So, apply the process to the above speed example to achieve 64 mph:
| Normalize 64 mph: | 64/100 = 0.64 |
| Find the normalized values square root (0.80): | 0.80 x 0.80 = 0.64 |
| Convert the normalized square root to speed dial: | 0.80 = 8/10 |
But life is not so simple. As the phosphors slowly age, this rudimentary correction slowly fails as well, requiring another recalculation. So, the problem becomes, What simple process produces a speed dial setting that causes the automobile to achieve a normalized 0.50 speed? Also, note the red, green, and blue electron guns likely have individual root correction values, requiring different independent corrections.
The previous discussion contrived the 0.7075 value so we could use the square root (gamma = 0.50). In other cases, the square root may amplify intensities too much or too little. So, the real process actually consists of determining what root (gamma value) to use. It proceeds by displaying intermixed intensities. Half the intensities are normalized at 0.50. The remaining intensities alternate between scan lines consisting of 0.00 and 1.00 to minimize slew rate problems. Under visual spatial integration these lines should approximate the 0.50 intensity. Programming has users indicate when illuminated areas appear equal, providing different trial root values in the process.
The GAMMA.C program allows users to increase and decrease trial root values for each electron gun in a color monitor by depressing the CURSOR_UP and CURSOR_DOWN keys. When the intensities appear correct when viewed from a distance to help blend screen texture differences, users signal this by depressing the ENTER key. Redirecting the program output to a file named gamma.val saves the gamma values for other program use in this book.
| Previous | Table of Contents | Next |