Declaration: ConvertRGBtoHSI (rd,gr,bl: TInt2DArray; var hue,sat,intens: TDouble2DArray): integer;
The function ConvertRGBtoHSI converts the three matrices rd, gr, bl, which represent the red, green and blue channels of a color image into the corresponding hue, saturation and intensity matrices (variable parameters hue, sat and intens).

The function returns the following error codes:

 0 ... everything is OK
-1 ... the three matrices rd, gr and bl do not have the same size