splitLCH
Top  Previous  Next

splitLCH ( integer Input, integer Light, integer Chroma, integer Hue )

Use this function to split a color image into the Lightness, Chroma and Hue component images according to the LCH color model. A 48-bit RGB image will be split into 16-bit grayscale components; image of any other type will be split into 8-bit grayscale components.

Parameters
 
Input  
 
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Light, Chroma, Hue  
 
Integer between 1 and 116 specifying the output frame numbers for the Lightness, Chroma and Hue components respectively. Values in the range of 100-116 correspond to hidden frames.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example

This set of statements changes the chrominance of an RGB image by splitting it into the LCH components, offsetting all the pixels in the Chroma component by a value of +64 and then merging the components back into an RGB image.  
 
L=101  
C=102  
H=103  
Off=64  
setCurDir("samples")  
loadIm (1,"sample14.iwd")  
splitLCH (1, L, C, H)  
offsetIm (C, C, Off, M_CLIP)  
mergeLCH (L, C, H, 2)  

Remark


For more information on the LCH color space see setColorSpace.