RGB to IHS

This tool transforms three raster images of multispectral data (red, green, and blue channels) into their equivalent intensity, hue, and saturation (IHS; sometimes HSI or HIS) images. Intensity refers to the brightness of a color, hue is related to the dominant wavelength of light and is perceived as color, and saturation is the purity of the color (Koutsias et al. 2000 Photogrammetric Engineering & Remote Sensing 66:7, 829-839). There are numerous algorithms for performing a red-green-blue (RGB) to IHS transformation. This tool uses the transformation described by Haydn (1982). Note that, based on this transformation, the output IHS values follow the ranges:

0 < I < 3
0 < H < 3
0 < S < 1

The user must specify the names of the red, green, and blue images. Importantly, these images need not necessarily correspond with the specific regions of the electromagnetic spectrum that are red, green, and blue. Rather, the input images are three multispectral images that could be used to create a RGB color composite. The user must also specify the names of the output intensity, hue, and saturation images.

Image enhancements, such as contrast stretching, are often performed on the IHS components, which are then inverse transformed back in RGB components to then create an improved color composite image.

References:

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
redFile = wd + "red_band.dep"
greenFile = wd + "green_band.dep"
blueFile = wd + "blue_band.dep"
outIntensityFile = wd + "intensity.dep"
outHueFile = wd + "hue.dep"
outSaturationFile = wd + "saturation.dep"
args = [redFile, greenFile, blueFile, outIntensityFile, outHueFile, outSaturationFile]
pluginHost.runPlugin("RGBtoIHS", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def redFile = wd + "red_band.dep"
def greenFile = wd + "green_band.dep"
def blueFile = wd + "blue_band.dep"
def outIntensityFile = wd + "intensity.dep"
def outHueFile = wd + "hue.dep"
def outSaturationFile = wd + "saturation.dep"
String[] args = [redFile, greenFile, blueFile, outIntensityFile, outHueFile, outSaturationFile]
pluginHost.runPlugin("RGBtoIHS", args, false)

Credits: