splitRGB
Top  Previous  Next

splitRGB ( integer Input, integer Red, integer Green, integer Blue )

Use this function to split a color image into the Red, Green and Blue component images. 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.  
 
Red, Green, Blue  
 
Integer between 1 and 116 specifying the output frame numbers for the Red, Green and Blue 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 will continuously grab an image into the DMA frame, split it into three channels and display the resulting images in frames #1, #2 and #3. The technique can be used for the simultaneous capture from three synchronized black & white cameras connected to an RGB framegrabber.  
 
do  
  grabIm (0)  
  splitRGB (0, 1, 2, 3)  
loop