TLIB documentation
 

tlChannel.h File Reference


Detailed Description

Internal channel manipulation routines.

#include "tlVision.h"

Include dependency graph for tlChannel.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TL_MAX_CHANNEL   10

Functions

int tl_to_channel (tlPixel *src, int width, int height, int pixel_width, int channel, tlPixel *mask, tlRect *rect, tlPixel *dest)
int tl_channel_put (tlPixel *src, int width, int height, int pixel_width, int channel, tlPixel *mask, tlRect *rect, tlPixel *dest)
int tl_channel_swap (tlPixel *src, int width, int height, int pixel_width, int channel1, int channel2, tlRect *rect, tlPixel *dest)


Define Documentation

#define TL_MAX_CHANNEL   10

Number of channels tolerated in an image. Used in tlImage, tlObject and tlColor.


Function Documentation

int tl_channel_put ( tlPixel src,
int  width,
int  height,
int  pixel_width,
int  channel,
tlPixel mask,
tlRect rect,
tlPixel dest 
)

Fill a given channel of a pixel array with another channel contained in another pixel array.

Parameters:
src pixel array containing source image
width image width
height image height
pixel_width destination image bytes per pixel
channel channel to put data into
mask conversion mask (only fills active pixels)
rect portion of the image to process
dest [out] pixel array containing the converted image
0 on success, -1 otherwise.
See error management for details.

int tl_channel_swap ( tlPixel src,
int  width,
int  height,
int  pixel_width,
int  channel1,
int  channel2,
tlRect rect,
tlPixel dest 
)

Swap channels in a pixel array

Parameters:
src pixel array containing source image
width image width
height image height
pixel_width destination image bytes per pixel
channel1 channel to swap
channel2 channel to swap
rect portion of the image to process
dest [out] pixel array containing the converted image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_to_channel ( tlPixel src,
int  width,
int  height,
int  pixel_width,
int  channel,
tlPixel mask,
tlRect rect,
tlPixel dest 
)

Extract a channel from an image. The result is placed in a pixel array.

Parameters:
src pixel array containing source image
width image width
height image height
pixel_width bytes per pixel
channel channel to extract
mask conversion mask (only converts active pixels)
rect portion of the image to process
dest [out] pixel array containing the converted image
Returns:
0 on success, -1 otherwise.
See error management for details.



TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.