| rgbto8 | color | rgbto8 |
rgbto8 -- make an RGB 8-bit image and associated color map
rgbto8 red green blue rgb
Rgbto8 takes three input IRAF images and produces an 8-bit color map which samples the full range of RGB color values and an associated image with values indexing the color map. The compression algorithm is called the Median Cut Algorithm and the image is dithered with this color map using the Floyd-Steinberg algorithm. The resulting image is a short image with 199 values. The color map is output in a format suitable for use with SAOimage, IMTOOL or XIMTOOL. This method is recommended over the pixel dithering method.
The RGB values are input as three IRAF images. The images must each be scaled to an 8 bit range. This is done by specifying a range of input values to be mapped to the 8 bit range. In addition the range can be mapped logarithmically to allow a greater dynamic range.
The output image is displayed with rgbdisplay and SAOimage, IMTOOL, or XIMTOOL. Note that this requires V1.07 of SAOimage. The color map produced by the rgbto8 for a particular image must also be loaded into the display server manually. With IMTOOL use the setup panel and set the file name in the user1 or user2 field and then select the appropriate map. With SAOimage you select the "color" main menu function, and then the "cmap" submenu function, and then the "read" button. Note that usually a full pathname is required since the server is usually started from the login directory. For XIMTOOL the "XImtool*cmapDir1" resource must be set to the directory containing the color map and XIMTOOL must be restarted to cause the directory to be searched for color map files.
The display server must be setup in it's default contrast mapping (with IMTOOL you can use the RESET option, with XIMTOOL the "normalize" option is used, and with SAOimage you must restart) and the contrast mapping must not be changed. There are no adjustments that can be made in IMTOOL or XIMTOOL but with SAOimage you can adjust the colors using the "gamma" selections and the mouse.
1. Three 2048x2048 images of the Trifid nebula are obtained in the B, V, and R bandpasses. These images are properly registered. Examination of the histograms leads to selecting the display ranges 1-500 in each band. A half size image is created by subsampling using image sections.
cl> rgbto8 trifidr[*:2,*:2] trifidv[*:2,*:2] trifidb[*:2,*:2] \
>>> trifid8 maptype=saoimage rz1=1 rz2=500 gz1=1 gz2=500 \
>>> bz1=1 bz2=500
The file trifid8.sao will be created containing the color map for use with the image trifid8.
Example 1 takes 5 minutes on a SparcStation 2.
rgbdisplay, rgbdither, rgbsun, color.package