mergeYIQ
Top  Previous  Next

mergeYIQ ( integer Y, integer I, integer Q, integer Output )

Use this function to merge the Luminosity, I-chromaticity and Q-chromaticity components of a color image into an RGB image according to the YIQ color model. If at least one of the component images is of the high-bit depth, the components will merge into a 48-bit RGB image, otherwise a 24-bit RGB image will be created.

Parameters
 
Y, I, Q  
 
Integers between 0 and 116 specifying the frame numbers of the Luminosity, I-chromaticity and Q-chromaticity component images respectively. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the frame number of the output RGB image. 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 increases the brightness of an RGB image by splitting it into the YIQ components, offsetting all the pixels in the Luminosity component by a value of +64 and then merging the components back into an RGB image.  
 
Y=101  
I=102  
Q=103  
Off=64  
setCurDir("samples")  
loadIm (1,"sample14.iwd")  
splitYIQ (1, Y, I, Q)  
offsetIm (Y, Y, Off, M_CLIP)  
mergeYIQ (Y, I, Q, 2)  
 
Remark

For more information on the YIQ color space see setColorSpace.