Graphically, the transfer function is usually shown as a curve transversing a square, with the value of p plotted on the horizontal axis and the value of/(/?) plotted on the vertical axis. The plotted line shows the relationship embodied in the transfer function.

In computer software, the look-up table must be large enough to contain the range of values expected. The look-up table is evaluated using the array index as p and the value of the array element as/(p). In this case, the function/is the procedure defined above.

FOR index = 0 to 65535

LUT(index) = F(index) NEXT index where LUT () is the look-up table and F (index) calls for the function F to be evaluated for the value index. To apply the look-up table, LUT (), the computer takes the value of each pixel in the old image, finds the corresponding value in the array, LUT (), and inserts a new value from the look-up table:

FOR y = 0 to ymax FOR x = 0 to xmax newimage(x, y) = LUT(oldimage(x, y)) NEXT x NEXT y where oldimage () is the old image and newimage () is the new image. Note that you can apply a point operation to an image without creating a new image: FOR y = 0 to ymax FOR x = 0 to xmax image (x, y) = LUT (image (x, y) ) NEXT x NEXT y where image () is the image that you are processing.

In scientific computing, you may encounter normalized pixel values, in which pixel values in an image are scaled into the range between 0 and 1 and treated as floating-point numbers. Normalized pixel values make use of many interest-

Figure 13.8 Case Study: the Helix Nebula. In this linear stretch, the black pixel value was set slightly below the mean sky brightness, and the white pixel value at twice the brightest value in the nebula itself. This stretch mimics the appearance of the object as it would appear in a dark sky. Image by Neil McMickle.

Figure 13.8 Case Study: the Helix Nebula. In this linear stretch, the black pixel value was set slightly below the mean sky brightness, and the white pixel value at twice the brightest value in the nebula itself. This stretch mimics the appearance of the object as it would appear in a dark sky. Image by Neil McMickle.

ing and convenient properties of numbers between 0 and 1, but they cannot take advantage of speedy look-up tables. However, with fast computers, this is no longer as important as it once was.

In direct endpoint specification and histogram specification, the transfer function is applied to the range of values between the black endpoint, pvblack, and the white endpoint, pvwhite. Although it is possible to use any function at all, the most common transfer functions are the linear, gamma, logarithmic, gam-malog, sawtooth, and inverse linear (negative) transfer functions.

• Tip: Earlier versions ofAIP for Windows (those with an AIP32 executable file) used a look-up table to speed brightness scaling and image display. With the advent of faster CPUs, AIP4Win 2.0 computes functions directly with no loss of speed, but with considerable gain in flexibility and numerical precision.

In the linear transfer function, the pixel values between pvblack and pvwhite are spread uniformly between the endpoints. The transfer function is a straight line between the black endpoint and the white endpoint:

Was this article helpful?

Through this ebook, you are going to learn what you will need to know all about the telescopes that can provide a fun and rewarding hobby for you and your family!

## Post a comment