Specifications

Color Space Conversion
9-13
9
RGB2HLS
Converts RGB images
to the HLS color model.
void iplRGB2HLS(IplImage*
rgbImage
, IplImage*
hlsImage
);
rgbImage
ThesourceRGBimage.
hlsImage
The resultant HLS image.
Discussion
The function converts the RGB image
rgbImage
to the HLS image
hlsImage
. The function checks that the input image is an RGB image. The
function sets the channel sequence and color model of the output image to
HLS.
HLS2RGB
Converts HLS images to
the RGB color model.
void iplHLS2RGB(IplImage*
hlsImage
, IplImage*
rgbImage
);
hlsImage
The source HLS image.
rgbImage
The resultant RGB image.
Discussion
The function converts the HLS image
hlsImage
to the RGB image
rgbImage
; see [Rogers85]. The function checks that the input image is an
HLS image and that the output image is RGB.