Image segmentation on the basis of a HSI color image

The ‘HSI to grey converter’ is a useful LemnaGrid tool to convert an RGB image into a more human intuitive color appearance system, i.e. the hue-saturation-intensity (HSI) model. In this post I will show applications of the HSI to grey converter for color analysis.

The figure shows the difference in color distribution within the RGB color cube versus the HSI model. If the color property of a target object is within a small region of the RGB cube, then a foreground based color picking method in an RGB image is sufficient. However, if the color region is more complex, then a transformation into HSI can help the specification of the color property.

This figure shows the LemnaGrid workflow I used to segment a complex region within the RGB cube by picking foreground colors from its corresponding HSI image. I used the HSI to grey converter three times to obtain the three individual HSI channels (greyscale images). To create an HSI image I assigned the hue component to the red channel, saturation to green, and intensity to the blue channel. This was done by first casting the greyscale images as RGB images, and then applying the RGB amplifier with the following three settings: [1, .01, .01], [.01, 1, .01], and [.01, .01, 1]. Finally, Image adder was used to combine all three images into a single HSI color image.

Measuring greenness in plant leaves

Plant leaves contain many types of pigments, among which chlorophyll is the richest. Greenness of a leaf depends on chlorophyll content and provides key information for the diagnosis of plant physiological status, including nitrogen or water status. In the seminal paper by Rorie et al 2011, the dark green color index (DGCI) was introduced as a method to quantify the greenness in turfgrass:

  • DGCI := [(hue-42/42) + (255-sat) + (255-int)]/3

While a complete description of my turfgrass study utilising the DGCI is listed Opens external link in new windowhere (presentation slides; Application Note is in progress), the following is a quick summary of how to implement the DGCI in LemnaGrid. From a loaded RGB image I used the HSI to grey converter to obtain the individual channels as grayscale images. The first term of the DGCI formula restricts the hue values to the range 42 – 84 of a 8bit colour image (256 pixel values), and rescales it to 0 – 255. This was done by first casting the hue image as an RGB image, and then applying the RGB calculator. The second and third term of the formula are inversion of the saturation and intensity images, and therefore I used the Image inverter for each image. Finally, the mean pixel values of all three images are determined by using the Image mean device. The result is a greyscale image with DGCI values.

Quantifying plant disease using the hue channel

A common symptom of plant disease is a detectable change in color from green (healthy), to yellow (chlorotic), to brown/grey (necrotic). A digitalised image of a diseased plant can however exhibit different shades of the same color. This can be explained by leaf thickness, surface property, or shading. Here I use the hue compoment of the HSI image to reduce the complexity of color variations and to stably quantify three color regions in plant leaves: green, yellow (chlorosis), red (infection).

From an RGB image the HSI to grey converter is used to obtain the hue color component. By casting the result image to an RGB image, the Color classification tool is used to assign each image pixel to one out of three colour classes: green (RGB = [84/84/84]), yellow ([42/42/42]), and red ([30/30/30]). The green class represents healthy leaf tissue, yellow reflects chlorosis, and red captures infections.

Conclusion

HSI to grey converter is a handy LemnaGrid tool. It can be used for complex image segmentation tasks. HSI is a color appearance model that matches our human sense of color impression. Therefore HSI compoments are used for various color analysis tasks, including plant disease quantification, leave greenness measurement.