Translates RGB inputs into HIS outputs or vice versa.
Translates a three-band input image representing red, green, and blue values into hue, intensity, and saturation components. In addition, it also translates an image representing hue, intensity, and saturation into red, green, and blue values.
- IN
- Input image. The input image must be BYTE and must contain three image bands containing the red, green, and blue components. Windowing and subbanding of input images is allowed.
- OUT
- Output image. The output image is a three-band image containing the hue, intensity, and saturation components. The output data type is INTEGER*2.
- IN
- Input image. The input image must be INTEGER*2 and must contain three image bands, containing the hue, intensity, and saturation components in that order.
- OUT
- Output image. The output image is a three-band image containing the red, green, and blue components. The output data type will be BYTE.
RGB2HIS translates RGBIMG (containing the three images of RGB components) into HISIMG (consisting of HIS components).
HIS2RGB translates HISIMG (containing the three HIS component images) into RGBIMG (consisting of RGB components).
A variety of techniques exist for displaying multi-spectral image data in color. One of these is chromaticity. HIS (hue, intensity, and saturation) is a chromatic representation. Hue refers to the actual color; intensity refers to the brightness or dullness of a color; saturation refers to the purity of the color. The algorithm used in this module was modeled after one presented in Fundamentals of Interactive Computer Graphics by J. D. Foley and A. VanDam.This algorithm is specifically set up for RGB data to HIS data for the RGB2HIS subcommand and for HIS data to RGB data for the HIS2RGB subcommand.
Reference: J. D. Foley and A. VanDam, Fundamentals of Interactive Computer Graphics, Addison-Wesley Publishing Company, Reading, Massachusetts, 1982, Chap. 17, Section 17.4.5, "The HLS Color Model," p. 617.
Unable to allocate buffer memory.
A nonfatal error was encountered during processing.
Unable to open input or the output image. Verify that the image exists.
Message indicates that image IN contains less than or more than three bands which are required. Error results because HIS tries to apply the HIS to RGB or RGB to HIS algorithm and fails if three bands are not present.
Message indicates that the size of the windows within images IN are not equal. To correct the error, use the window option to indicate the size to be used.
The subcommand RGB2HIS only allows BYTE data for input; subcommand HIS2RGB only allows INTEGER*2 data for input. Use COPY to convert the input image to BYTE or INTEGER*2 data for subcommands RGB2HIS or HIS2RGB, respectively.
A fatal error was encountered during processing. The output image file is either deleted or not depending upon the global $DELFLG, and processing is terminated. The message that is displayed immediately preceding this error message is the specific error that was encountered.
No color = -1 Red = 0 Yellow = 60 Green = 120 Cyan = 180 Blue = 240 Magenta = 300