TLIB documentation
 

tlImage Class Reference

Inheritance diagram for tlImage:

Inheritance graph
[legend]
Collaboration diagram for tlImage:

Collaboration graph
[legend]

List of all members.


Detailed Description

Image object, provides access to image data and processing.

Perhaps the most commonly used object in TLIB is the tlImage object. It contains the image data (from its tlPixelArray parent), as well as useful routines such as drawing functions, file read/write, etc.

Public Member Functions

 tlImage ()
 tlImage (tl_format format, int width, int height)
 tlImage (tlImage *image)
virtual ~tlImage ()
int writeToFile (char *filename)
int writeToPPM (char *filename)
int writeToBMP (char *filename)
int writeToJPG (char *filename, int quality=80)
int readFromFile (char *filename)
int readFromPPM (char *filename)
int readFromBMP (char *filename)
int readFromJPG (char *filename)
int drawPoint (int x, int y, unsigned char r, unsigned char g, unsigned char b)
int drawPoint (int x, int y, unsigned char v)
int drawPoint (tlPoint *point, unsigned char r, unsigned char g, unsigned char b)
int drawPoint (tlPoint *point, unsigned char v)
int drawLine (int x1, int y1, int x2, int y2, unsigned char r, unsigned char g, unsigned char b)
int drawLine (int x1, int y1, int x2, int y2, unsigned char v)
int drawLine (tlPoint *p1, tlPoint *p2, unsigned char r, unsigned char g, unsigned char b)
int drawLine (tlPoint *p1, tlPoint *p2, unsigned char v)
int drawLine (tlLine *line, unsigned char r, unsigned char g, unsigned char b)
int drawLine (tlLine *line, unsigned char v)
int drawRect (tlRect *rect, unsigned char r, unsigned char g, unsigned char b)
int drawRect (tlRect *rect, unsigned char v)
int drawCross (int x, int y, int size, unsigned char r, unsigned char g, unsigned char b)
int drawCross (int x, int y, int size, unsigned char v)
int drawCross (tlPoint *point, int size, unsigned char r, unsigned char g, unsigned char b)
int drawCross (tlPoint *point, int size, unsigned char v)
int drawCross (tlRect *rect, unsigned char r, unsigned char g, unsigned char b)
int drawCross (tlRect *rect, unsigned char v)
int drawCross (tlChain *chain, int size, unsigned char r, unsigned char g, unsigned char b)
int drawCross (tlChain *chain, int size, unsigned char v)
int drawMask (tlMask *mask, unsigned char r, unsigned char g, unsigned char b)
int drawMask (tlMask *mask, unsigned char v)
int drawMask (tlMask *mask, int x, int y, unsigned char r, unsigned char g, unsigned char b)
int drawMask (tlMask *mask, int x, int y, unsigned char v)
int drawChain (tlChain *chain, unsigned char r, unsigned char g, unsigned char b)
int drawChain (tlChain *chain, unsigned char v)
int drawObject (tlObject *object)
int drawObject (tlObject *object, int x, int y)
int drawImage (tlImage *image, int x, int y)
int fillRect (tlRect *rect, unsigned char r, unsigned char g, unsigned char b)
int fillRect (tlRect *rect, unsigned char v)
int fillObject (tlObject *object, unsigned char r, unsigned char g, unsigned char b)
int fillObject (tlObject *object, unsigned char v)
int fillObject (tlObject *object, int x, int y, unsigned char r, unsigned char g, unsigned char b)
int fillObject (tlObject *object, int x, int y, unsigned char v)
int drawText (char *text, int x, int y, unsigned char r, unsigned char g, unsigned char b, bool blackbg=false)
int drawText (char *text, int x, int y, unsigned char v, bool blackbg=false)
int drawText (char *text, tlPoint *p, unsigned char r, unsigned char g, unsigned char b, bool blackbg=false)
int drawText (char *text, tlPoint *p, unsigned char v, bool blackbg=false)
int normalize ()
int normalize (tlRect *rect)
int normalize (tlMask *mask)
int normalize (tlMask *mask, tlRect *rect)
int normalize (tlImage *dest)
int normalize (tlRect *rect, tlImage *dest)
int normalize (tlMask *mask, tlImage *dest)
int normalize (tlMask *mask, tlRect *rect, tlImage *dest)
int edges (int method=TL_EDGES_SOBEL)
int edges (tlRect *rect, int method=TL_EDGES_SOBEL)
int edgesVert (int method=TL_EDGES_SOBEL)
int edgesVert (tlRect *rect, int method=TL_EDGES_SOBEL)
int edgesHor (int method=TL_EDGES_SOBEL)
int edgesHor (tlRect *rect, int method=TL_EDGES_SOBEL)
int edges (tlImage *dest, int method=TL_EDGES_MORPH)
int edges (tlRect *rect, tlImage *dest, int method=TL_EDGES_MORPH)
int edgesVert (tlImage *dest, int method=TL_EDGES_SOBEL)
int edgesVert (tlRect *rect, tlImage *dest, int method=TL_EDGES_SOBEL)
int edgesHor (tlImage *dest, int method=TL_EDGES_SOBEL)
int edgesHor (tlRect *rect, tlImage *dest, int method=TL_EDGES_SOBEL)
int borderBlack (int b)
int borderBlack (int bx, int by)
int borderMirror (int b)
int borderMirror (int bx, int by)
int crop (tlRect *rect)
int crop (int x, int y, int width, int height)
int crop (tlRect *rect, tlImage *dest)
int crop (int x, int y, int width, int height, tlImage *dest)
int borderBlack (int b, tlImage *dest)
int borderBlack (int bx, int by, tlImage *dest)
int borderMirror (int b, tlImage *dest)
int borderMirror (int bx, int by, tlImage *dest)
int mirror ()
int mirror (tlImage *dest)
int invert ()
int invert (tlImage *dest)
int rotateRight ()
int rotateLeft ()
int rotateRight (tlImage *dest)
int rotateLeft (tlImage *dest)
int init (tlPixelArray *pixelArray)
int init (tl_format format, int width, int height)
int init (int width, int height, int pixelWidth)
int setPixel (int val, int x, int y, int channel=0)
int setPixel (int val, tlPoint *point, int channel=0)
int getPixel (int x, int y, int channel=0)
int getPixel (tlPoint *point, int channel=0)
int copy (tlPixelArray *pixelArray)
int copy (tlPixelArray *pixelArray, tlRect *rect)
int copy (tlRect *rect)
tlRectcopy ()
int copyTo (tlPixelArray *pixelArray)
int copyTo (tlPixelArray *pixelArray, tlRect *rect)
int copyTo (tlRect *rect)
int toRect (tlRect *rect)
tlRecttoRect ()
int scale (float factor, int method=TL_SCALE_DECIMATE)
int scale (int newWidth, int newHeight, int method=TL_SCALE_DECIMATE)
int scale (float factor, tlPixelArray *dest, int method=TL_SCALE_DECIMATE)
int scale (int newWidth, int newHeight, tlPixelArray *dest, int method=TL_SCALE_DECIMATE)
int clear (void)
int clear (tlRect *rect)
int addChannel ()
int remChannel (int channel)
int remChannel (int channel, tlPixelArray *dest)
int toChannel (int channel)
int toChannel (int channel, tlRect *rect)
int toChannel (int channel, tlPixelArray *dest)
int toChannel (int channel, tlRect *rect, tlPixelArray *dest)
int putChannel (tlPixel *pixelArray, int channel)
int putChannel (tlPixel *pixelArray, tlRect *rect, int channel)
int putChannel (tlPixelArray *pixelArray, int channel)
int putChannel (tlPixelArray *pixelArray, tlRect *rect, int channel)
int putChannel (tlPixel *pixelArray, int channel, tlPixelArray *dest)
int putChannel (tlPixel *pixelArray, tlRect *rect, int channel, tlPixelArray *dest)
int putChannel (tlPixelArray *pixelArray, int channel, tlPixelArray *dest)
int putChannel (tlPixelArray *pixelArray, tlRect *rect, int channel, tlPixelArray *dest)
int swapChannels (int channel1, int channel2)
int swapChannels (int channel1, int channel2, tlPixelArray *dest)
int toRgb ()
int toRgb (tlRect *rect)
int toRgb (tlPixelArray *dest)
int toRgb (tlRect *rect, tlPixelArray *dest)
int toYuv ()
int toYuv (tlRect *rect)
int toYuv (tlPixelArray *dest)
int toYuv (tlRect *rect, tlPixelArray *dest)
int toNrg ()
int toNrg (tlRect *rect)
int toNrg (tlPixelArray *dest)
int toNrg (tlRect *rect, tlPixelArray *dest)
int toHsi ()
int toHsi (tlRect *rect)
int toHsi (tlPixelArray *dest)
int toHsi (tlRect *rect, tlPixelArray *dest)
int toGray ()
int toGray (tlRect *rect)
int toGray (tlPixelArray *dest)
int toGray (tlRect *rect, tlPixelArray *dest)
int toBin (int threshold=1)
int toBin (int threshold, tlRect *rect)
int toBin (int min, int max)
int toBin (int min, int max, tlRect *rect)
int toBin (int threshold, tlPixelArray *dest)
int toBin (int threshold, tlRect *rect, tlPixelArray *dest)
int toBin (int min, int max, tlPixelArray *dest)
int toBin (int min, int max, tlRect *rect, tlPixelArray *dest)
int mask (tlRect *rect)
int mask (tlPixelArray *mask)
int mask (tlPixelArray *mask, tlRect *rect)
int mask (tlRect *rect, tlPixelArray *dest)
int mask (tlPixelArray *mask, tlPixelArray *dest)
int mask (tlPixelArray *mask, tlRect *rect, tlPixelArray *dest)
int add (tlPixelArray *pixelArray)
int add (tlPixelArray *pixelArray, tlRect *rect)
int add (tlPixelArray *pixelArray, tlPixelArray *dest)
int add (tlPixelArray *pixelArray, tlRect *rect, tlPixelArray *dest)
int sub (tlPixelArray *pixelArray)
int sub (tlPixelArray *pixelArray, tlRect *rect)
int sub (tlPixelArray *pixelArray, tlPixelArray *dest)
int sub (tlPixelArray *pixelArray, tlRect *rect, tlPixelArray *dest)
int convolution (char *kernel, int kernel_size)
int convolution (char *kernel, int kernel_width, int kernel_height)
int convolution (float *kernel, int kernel_size)
int convolution (float *kernel, int kernel_width, int kernel_height)
int convolution (char *kernel, int kernel_size, tlRect *rect)
int convolution (char *kernel, int kernel_width, int kernel_height, tlRect *rect)
int convolution (float *kernel, int kernel_size, tlRect *rect)
int convolution (float *kernel, int kernel_width, int kernel_height, tlRect *rect)
int convolution (char *xkernel, int xksize, char *ykernel, int yksize)
int convolution (char *xkernel, int xksize, char *ykernel, int yksize, tlRect *rect)
int convolution (float *xkernel, int xksize, float *ykernel, int yksize)
int convolution (float *xkernel, int xksize, float *ykernel, int yksize, tlRect *rect)
int convolution (char *kernel, int kernel_size, tlPixelArray *dest)
int convolution (char *kernel, int kernel_width, int kernel_height, tlPixelArray *dest)
int convolution (float *kernel, int kernel_size, tlPixelArray *dest)
int convolution (float *kernel, int kernel_width, int kernel_height, tlPixelArray *dest)
int convolution (char *kernel, int kernel_size, tlRect *rect, tlPixelArray *dest)
int convolution (char *kernel, int kernel_width, int kernel_height, tlRect *rect, tlPixelArray *dest)
int convolution (float *kernel, int kernel_size, tlRect *rect, tlPixelArray *dest)
int convolution (float *kernel, int kernel_width, int kernel_height, tlRect *rect, tlPixelArray *dest)
int convolution (char *xkernel, int xksize, char *ykernel, int yksize, tlPixelArray *dest)
int convolution (char *xkernel, int xksize, char *ykernel, int yksize, tlRect *rect, tlPixelArray *dest)
int convolution (float *xkernel, int xksize, float *ykernel, int yksize, tlPixelArray *dest)
int convolution (float *xkernel, int xksize, float *ykernel, int yksize, tlRect *rect, tlPixelArray *dest)
int convolution (float *xkernel, int xksize, float *ykernel, int yksize, tlRect *rect, tlPixelArray *mask, tlPixelArray *dest)
int median (int size)
int median (int size, tlRect *rect)
int erode (int size, tlRect *rect)
int erode (int size, tlRect *rect, tlPixelArray *dest)
int dilate (int size, tlRect *rect)
int dilate (int size, tlRect *rect, tlPixelArray *dest)
int opening (int size, tlRect *rect)
int opening (int size, tlRect *rect, tlPixelArray *dest)
int closing (int size, tlRect *rect)
int closing (int size, tlRect *rect, tlPixelArray *dest)
int thin (tlRect *rect)
int thin (tlRect *rect, tlPixelArray *dest)
int filter (int minVal, int maxVal)
int filter (int minVal, int maxVal, tlRect *rect)
int filter (int minVal, int maxVal, tlPixelArray *dest)
int filter (int minVal, int maxVal, tlRect *rect, tlPixelArray *dest)
int filter (tlColor *minColor, tlColor *maxColor)
int filter (tlColor *minColor, tlColor *maxColor, tlRect *rect)
int filter (tlColor *minColor, tlColor *maxColor, tlPixelArray *dest)
int filter (tlColor *minColor, tlColor *maxColor, tlRect *rect, tlPixelArray *dest)
int getMax (tlMask *mask, tlPoint *point, int channel=0)
int getMin (tlMask *mask, tlPoint *point, int channel=0)
int getColor (tlPoint *point, tlColor *color)
int getColor (int x, int y, tlColor *color)
int getColors (tlColor *minColor, tlColor *maxColor)
int getColors (tlColor *minColor, tlColor *maxColor, tlRect *rect)
int getColorMin (tlColor *minColor)
int getColorMin (tlColor *minColor, tlRect *rect)
int getColorMax (tlColor *maxColor)
int getColorMax (tlColor *maxColor, tlRect *rect)
int find (tlObject *object, int confidence, int increment=TL_DEFAULT_INCREMENT)
int find (tlObject *object, int confidence, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int find (tlMask *shape, int confidence, int increment=TL_DEFAULT_INCREMENT)
int find (tlMask *shape, int confidence, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int findBest (tlObject *object, int increment=TL_DEFAULT_INCREMENT)
int findBest (tlObject *object, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int findBest (tlMask *shape, int increment=TL_DEFAULT_INCREMENT)
int findBest (tlMask *shape, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int findShape (tlObject *object, int confidence, int increment=TL_DEFAULT_INCREMENT)
int findShape (tlObject *object, int confidence, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int findBestShape (tlObject *object, int increment=TL_DEFAULT_INCREMENT)
int findBestShape (tlObject *object, tlRect *rect, int increment=TL_DEFAULT_INCREMENT)
int buildHist (tlHist *hist, tlMask *mask, tlRect *rect, int channel=0)
int buildHist (tlHist2D *hist, tlMask *mask, tlRect *rect, int xchannel=0, int ychannel=1)
int set (int x, int y, int width, int height)
int collapse (int dsize)
int expand (int dsize)
int setCenter (int x, int y)
int intersect (tlRect *rect)
int setSize (int width, int height, int depth=255)
int setLocation (int x, int y, int disp=0)
int setLocation (tlPoint *point)
int shift (int dx, int dy, int ddisp=0)
int setWorldLocation (float wx, float wy, float wz)
tlLocationtoLocation ()
int toLocation (tlLocation *location)

Public Attributes

tl_format format
unsigned long timeStamp
int pixelWidth
tlPixelpixel
int width
int height
int depth
int x
int y
int disp
float wx
float wy
float wz

Protected Member Functions

int create (tl_format format, int width, int height)
int deletePixel ()


Constructor & Destructor Documentation

tlImage::tlImage (  ) 

Constructor.

Note:
See error management for details.

tlImage::tlImage ( tl_format  format,
int  width,
int  height 
)

Constructor.

Parameters:
format image format
width image width [pix]
height image height [pix]
Note:
See error management for details.

tlImage::tlImage ( tlImage image  ) 

Constructor.

Parameters:
image image to copy
Note:
See error management for details.

tlImage::~tlImage (  )  [virtual]

Destructor.

Note:
See error management for details.


Member Function Documentation

int tlImage::writeToFile ( char *  filename  ) 

Write the image to a file of the default format (which is a proprietary TLIB format)

Parameters:
filename the file name. If NULL, write to stdout
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::writeToPPM ( char *  filename  ) 

Write the image to a PPM (binary) file

Parameters:
filename the file name. If NULL, write to stdout
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::writeToBMP ( char *  filename  ) 

Write the image to a BMP file

Parameters:
filename the file name. If NULL, write to stdout
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::writeToJPG ( char *  filename,
int  quality = 80 
)

Write the image to a JPG file

Parameters:
filename the file name. If NULL, write to stdout
quality quality of JPEG compression [%]
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
JPEG is a lossy compression format that's very handy for web distribution of images; it is not recommended to use JPEG images as a source for image processing, because of the dramatic data loss (not visually perceptible, as JPEG compression is optimized to minimize loss in human perception of pictures)

int tlImage::readFromFile ( char *  filename  ) 

Read an image from a given file, expecting the default format (which is a proprietary TLIB format)

Parameters:
filename the file name
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::readFromPPM ( char *  filename  ) 

Read an image from a PPM file.

Parameters:
filename the file name
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::readFromBMP ( char *  filename  ) 

Read an image from a BMP file.

Parameters:
filename the file name
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::readFromJPG ( char *  filename  ) 

Read an image from a JPG file.

Parameters:
filename the file name
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
JPEG is a lossy compression format that's very handy for web distribution of images; it is not recommended to use JPEG images as a source for image processing, because of the dramatic data loss (not visually perceptible, as JPEG compression is optimized to minimize loss in human perception of pictures)

int tlImage::drawPoint ( int  x,
int  y,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a pixel on the image with a given color.

Parameters:
x point x location
y point y location
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawPoint ( int  x,
int  y,
unsigned char  v 
)

Draw a pixel on the single-channel image.

Parameters:
x point x location
y point y location
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawPoint ( tlPoint point,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a pixel on the image with a given color.

Parameters:
point point location
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawPoint ( tlPoint point,
unsigned char  v 
)

Draw a pixel on the single-channel image.

Parameters:
point point location
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawLine ( int  x1,
int  y1,
int  x2,
int  y2,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a line on the image with a given color.

Parameters:
x1 starting point x location
y1 starting point y location
x2 ending point x location
y2 ending point y location
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawLine ( int  x1,
int  y1,
int  x2,
int  y2,
unsigned char  v 
)

Draw a line on the single-channel image.

Parameters:
x1 starting point x location
y1 starting point y location
x2 ending point x location
y2 ending point y location
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawLine ( tlPoint p1,
tlPoint p2,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a line on the image with a given color.

Parameters:
p1 starting point location
p2 ending point location
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawLine ( tlPoint p1,
tlPoint p2,
unsigned char  v 
)

Draw a line on the single-channel image.

Parameters:
p1 starting point location
p2 ending point location
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawLine ( tlLine line,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a line on the image with a given color.

Parameters:
line line to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawLine ( tlLine line,
unsigned char  v 
)

Draw a line on the single-channel image.

Parameters:
line line to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
if the line overshoots the image boundaries, an error is returned

int tlImage::drawRect ( tlRect rect,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a rectangle on the image with a given color.

Parameters:
rect the rectangle to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawRect ( tlRect rect,
unsigned char  v 
)

Draw a rectangle on the single-channel image.

Parameters:
rect the rectangle to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( int  x,
int  y,
int  size,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a cross on the image at the given point, of the given size, with a given color.

Parameters:
x point X coord
y point Y coord
size cross segment length
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( int  x,
int  y,
int  size,
unsigned char  v 
)

Draw a cross on the single-channel image at the given point and of the given size.

Parameters:
x point X coord
y point Y coord
size cross segment length
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlPoint point,
int  size,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a cross on the image at the given point, of the given size, with a given color.

Parameters:
point the point
size cross segment length
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlPoint point,
int  size,
unsigned char  v 
)

Draw a cross on the image at the given point and of the given size.

Parameters:
point the point
size cross segment length
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlRect rect,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a cross on the image contained in a rectangle with a given color.

Parameters:
rect the bounding rectangle
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlRect rect,
unsigned char  v 
)

Draw a cross on the single-channel image contained in a rectangle.

Parameters:
rect the bounding rectangle
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlChain chain,
int  size,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a cross on the image at every point of the given chain.

Parameters:
chain the chain to draw
size cross segment length
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawCross ( tlChain chain,
int  size,
unsigned char  v 
)

Draw a cross on the single-channel image at every point of the given chain.

Parameters:
chain the chain to draw
size cross segment length
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawMask ( tlMask mask,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a mask on the image at its stored location and with a given color.

Parameters:
mask the mask to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawMask ( tlMask mask,
unsigned char  v 
)

Draw a mask on the single-channel image at its stored location.

Parameters:
mask the mask to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawMask ( tlMask mask,
int  x,
int  y,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a mask on the image at a given location and with a given color.

Parameters:
mask the mask to draw
x the X coordinate (UL corner) of the mask on the image
y the Y coordinate (UL corner) of the mask on the image
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawMask ( tlMask mask,
int  x,
int  y,
unsigned char  v 
)

Draw a mask on the single-channel image at a given location.

Parameters:
mask the mask to draw
x the X coordinate (UL corner) of the mask on the image
y the Y coordinate (UL corner) of the mask on the image
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawChain ( tlChain chain,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Draw a chain representation on the image.

Parameters:
chain the chain to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawChain ( tlChain chain,
unsigned char  v 
)

Draw a chain representation on the single-channel image.

Parameters:
chain the chain to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawObject ( tlObject object  ) 

Draw an object representation on the image.

Parameters:
object the object to draw
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawObject ( tlObject object,
int  x,
int  y 
)

Draw an object representation on the image at a given location.

Parameters:
object the object to draw
x object x location
y object y location
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawImage ( tlImage image,
int  x,
int  y 
)

Draw an image on the image at a given location.

Parameters:
image the image to draw
x object x location
y object y location
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillRect ( tlRect rect,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Fill up a rectangle on the image with a desired color.

Parameters:
rect the rectangle to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillRect ( tlRect rect,
unsigned char  v 
)

Fill up a rectangle on the single-channel image.

Parameters:
rect the rectangle to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillObject ( tlObject object,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Fill an object on the image with a given color at the object stored location.

Parameters:
object the object to draw
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillObject ( tlObject object,
unsigned char  v 
)

Fill an object on the image with a given color at the object stored location.

Parameters:
object the object to draw
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillObject ( tlObject object,
int  x,
int  y,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Fill an object on the image with a given color at a desired location.

Parameters:
object the object to draw
x desired object x location
y desired object y location
r desired R color value
g desired G color value
b desired B color value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::fillObject ( tlObject object,
int  x,
int  y,
unsigned char  v 
)

Fill an object on the single-channel image at a desired location.

Parameters:
object the object to draw
x desired object x location
y desired object y location
v desired intensity value
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawText ( char *  text,
int  x,
int  y,
unsigned char  r,
unsigned char  g,
unsigned char  b,
bool  blackbg = false 
)

Draw the requested text on the image.

Parameters:
text the text to draw
x text X location
y text Y location
r desired R color value
g desired G color value
b desired B color value
blackbg true for black background, false for transparent
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawText ( char *  text,
int  x,
int  y,
unsigned char  v,
bool  blackbg = false 
)

Draw the requested text on the single-channel image.

Parameters:
text the text to draw
x text X location
y text Y location
v desired intensity value
blackbg true for black background, false for transparent
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawText ( char *  text,
tlPoint p,
unsigned char  r,
unsigned char  g,
unsigned char  b,
bool  blackbg = false 
)

Draw the requested text on the image.

Parameters:
text the text to draw
p text location
r desired R color value
g desired G color value
b desired B color value
blackbg true for black background, false for transparent
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::drawText ( char *  text,
tlPoint p,
unsigned char  v,
bool  blackbg = false 
)

Draw the requested text on the single-channel image.

Parameters:
text the text to draw
p text location
v desired intensity value
blackbg true for black background, false for transparent
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::normalize (  ) 

Normalize pixel values in an image. The pixel value range used in the image is projected to [0,TL_MAX_PIXEL].

Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlRect rect  ) 

Normalize pixel values in a portion of the image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL].

Parameters:
rect portion of the image to process
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlMask mask  ) 

Normalize pixel values in a masked image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL].

Parameters:
mask mask that defines which pixels are taken into account
Returns:
0 on success, -1 otherwise. See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlMask mask,
tlRect rect 
)

Normalize pixel values in a masked portion of the image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL].

Parameters:
mask mask that defines which pixels are taken into account
rect portion of the image to process
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlImage dest  ) 

Normalize pixel values in an image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL]. The result is put in another image.

Parameters:
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlRect rect,
tlImage dest 
)

Normalize pixel values in a portion of the image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL]. The result is put in another image.

Parameters:
rect portion of the image to process
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlMask mask,
tlImage dest 
)

Normalize pixel values in a masked image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL]. The result is put in another image.

Parameters:
mask mask that defines which pixels are taken into account
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::normalize ( tlMask mask,
tlRect rect,
tlImage dest 
)

Normalize pixel values in a masked portion of the image. The pixel value range of the image portion is projected to [0,TL_MAX_PIXEL]. The result is put in another image.

Parameters:
mask mask that defines which pixels are taken into account
rect portion of the image to process
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only GRAY images can be normalized.

int tlImage::edges ( int  method = TL_EDGES_SOBEL  ) 

Extract edges using the given method.

Parameters:
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edges ( tlRect rect,
int  method = TL_EDGES_SOBEL 
)

Extract edges using the given method in a portion of the image.

Parameters:
rect portion of the image to process
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesVert ( int  method = TL_EDGES_SOBEL  ) 

Extract vertical edges using the given method.

Parameters:
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesVert ( tlRect rect,
int  method = TL_EDGES_SOBEL 
)

Extract vertical edges using the given method in a portion of the image.

Parameters:
rect portion of the image to process
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesHor ( int  method = TL_EDGES_SOBEL  ) 

Extract horizontal edges using the given method.

Parameters:
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesHor ( tlRect rect,
int  method = TL_EDGES_SOBEL 
)

Extract horizontal edges using the given method in a portion of the image.

Parameters:
rect portion of the image to process
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edges ( tlImage dest,
int  method = TL_EDGES_MORPH 
)

Extract edges using the given method; the result is put in another image.

Parameters:
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edges ( tlRect rect,
tlImage dest,
int  method = TL_EDGES_MORPH 
)

Extract edges using the given method in a portion of the image; the result is put in another image.

Parameters:
rect portion of the image to process
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesVert ( tlImage dest,
int  method = TL_EDGES_SOBEL 
)

Extract vertical edges using the given method; the result is put in another image.

Parameters:
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesVert ( tlRect rect,
tlImage dest,
int  method = TL_EDGES_SOBEL 
)

Extract vertical edges using the given method in a portion of the image; the result is put in another image.

Parameters:
rect portion of the image to process
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesHor ( tlImage dest,
int  method = TL_EDGES_SOBEL 
)

Extract horizontal edges using the given method; the result is put in another image.

Parameters:
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::edgesHor ( tlRect rect,
tlImage dest,
int  method = TL_EDGES_SOBEL 
)

Extract horizontal edges using the given method in a portion of the image; the result is put in another image.

Parameters:
rect portion of the image to process
dest [out] destination image
method edge extraction method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderBlack ( int  b  ) 

Add black pixels around current image

Parameters:
b border thickness [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderBlack ( int  bx,
int  by 
)

Add black pixels around current image

Parameters:
bx border thickness on the X axis [pix]
by border thickness on the Y axis [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderMirror ( int  b  ) 

Add mirrored pixels around current image

Parameters:
b border thickness [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderMirror ( int  bx,
int  by 
)

Add mirrored pixels around current image.

Parameters:
bx border thickness on the X axis [pix]
by border thickness on the Y axis [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::crop ( tlRect rect  ) 

Crop an image to a given area

Parameters:
rect area to keep
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::crop ( int  x,
int  y,
int  cwidth,
int  cheight 
)

Crop an image to a given area

Parameters:
x crop area starting point on X axis [pix]
y crop area starting point on Y axis [pix]
cwidth crop area width [pix]
cheight crop area height [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::crop ( tlRect rect,
tlImage dest 
)

Crop an image to a given area Result is placed in another image (original is unmodified).

Parameters:
rect area to keep
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::crop ( int  x,
int  y,
int  cwidth,
int  cheight,
tlImage dest 
)

Crop an image to a given area. Result is placed in another image (original is unmodified).

Parameters:
x crop area starting point on X axis [pix]
y crop area starting point on Y axis [pix]
cwidth crop area width [pix]
cheight crop area height [pix]
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderBlack ( int  b,
tlImage dest 
)

Add black pixels around current image place result in a new image

Parameters:
b border thickness [pix]
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderBlack ( int  bx,
int  by,
tlImage dest 
)

Add black pixels around current image place result in a new image

Parameters:
bx border thickness on the X axis [pix]
by border thickness on the Y axis [pix]
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderMirror ( int  b,
tlImage dest 
)

Add mirrored pixels around current image place result in a new image

Parameters:
b border thickness [pix]
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::borderMirror ( int  bx,
int  by,
tlImage dest 
)

Add mirrored pixels around current image place result in a new image

Parameters:
bx border thickness on the X axis [pix]
by border thickness on the Y axis [pix]
dest [out] destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::mirror (  ) 

Mirror the image to itself

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::mirror ( tlImage dest  ) 

Mirror the image and put the result into another image. The original is untouched.

Parameters:
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::invert (  ) 

Make a negative of a given image. The original is untouched.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::invert ( tlImage dest  ) 

Make a negative of a given image. The original is untouched.

Parameters:
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::rotateRight (  ) 

Rotate the image clockwise.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::rotateLeft (  ) 

Rotate the image clockwise.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::rotateRight ( tlImage dest  ) 

Rotate the image clockwise.

Parameters:
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlImage::rotateLeft ( tlImage dest  ) 

Rotate the image counter-clockwise.

Parameters:
dest destination image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::create ( tl_format  format,
int  width,
int  height 
) [protected, inherited]

Perform pixel array creation and allocation.

Parameters:
format pixel array format
width pixel array width [pix]
height pixel array height [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::deletePixel ( void   )  [protected, inherited]

Deallocate the pixel array pixel array.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::init ( tlPixelArray pixelArray  )  [inherited]

Image initialization copies attributes from another pixel array. The pixel array, however, is allocated but not copied.

Parameters:
pixelArray reference pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::init ( tl_format  format,
int  width,
int  height 
) [inherited]

Image initialization reset the pixel array format and size. The pixel array is reallocated accordingly.

Parameters:
format pixel array format
width pixel array width [pix]
height pixel array height [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::init ( int  width,
int  height,
int  pixelWidth 
) [inherited]

Image initialization reset the pixel array format and size. The pixel array is reallocated accordingly.

Parameters:
width pixel array width [pix]
height pixel array height [pix]
pixelWidth pixel width [bytes]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::setPixel ( int  val,
int  x,
int  y,
int  channel = 0 
) [inherited]

Set the pixel value at the given position, and for the given channel.

Parameters:
val new pixel value
x X position in pixel array
y Y position in pixel array
channel channel index
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::setPixel ( int  val,
tlPoint point,
int  channel = 0 
) [inherited]

Set the pixel value at the given position, and for the given channel.

Parameters:
val new pixel value
point pixel position in pixel array
channel channel index
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getPixel ( int  x,
int  y,
int  channel = 0 
) [inherited]

Return the pixel value at the given position.

Parameters:
x position in pixel array
y position in pixel array
channel specific channel
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getPixel ( tlPoint point,
int  channel = 0 
) [inherited]

Return the pixel value at a given position for a given channel.

Parameters:
point pixel location
channel specific channel (default is 0)
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::copy ( tlPixelArray pixelArray  )  [inherited]

Copy the pixel array content from another pixel array.

Parameters:
pixelArray the pixel array to copy from
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::copy ( tlPixelArray pixelArray,
tlRect rect 
) [inherited]

Copy the pixel array content from another pixel array.

Parameters:
pixelArray the pixel array to copy from
rect portion of the pixel array to copy from
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::copy ( tlRect rect  )  [inherited]

Copy the rectangle parameters from another tlRect object.

Parameters:
rect the rectangle that should be copied
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
copy(), copyTo(tlRect *rect)

tlRect * tlRect::copy (  )  [inherited]

Create a copy of the rectangle.

Returns:
A pointer to the new (copied) rectangle.
Warning:
The new rectangle is allocated. Do not forget to deallocate it using delete when done with it.
See also:
copy(tlRect *rect), copyTo (tlRect *rect)

int tlPixelArray::copyTo ( tlPixelArray dest  )  [inherited]

Copy the pixel array content to another pixel array.

Parameters:
dest [out] the pixel array to copy content to
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::copyTo ( tlPixelArray dest,
tlRect rect 
) [inherited]

Copy the pixel array content to another pixel array.

Parameters:
rect part of the pixel array to copy
dest [out] the pixel array to copy content to
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::copyTo ( tlRect rect  )  [inherited]

Copy rectangle parameters to another rect object

Parameters:
rect the rectangle that should contained copied parameters
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
copy (), copy (tlRect *rect)

int tlPixelArray::toRect ( tlRect rect  )  [inherited]

Reset a tlRect object with the pixel array dimensions.

Parameters:
rect [out] the bounding rectangle
Returns:
0 on success, -1 otherwise.
See error management for details.

tlRect * tlPixelArray::toRect (  )  [inherited]

Create a tlRect object that contains the pixel array.

Returns:
A pointer to a tlRect object, NULL on error.

int tlPixelArray::scale ( float  factor,
int  method = TL_SCALE_DECIMATE 
) [inherited]

Scale the pixel array.

Parameters:
factor the fp scaling factor
method scaling method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::scale ( int  newWidth,
int  newHeight,
int  method = TL_SCALE_DECIMATE 
) [inherited]

Scale the pixel array.

Parameters:
newWidth desired width of the scaled image
newHeight desired height of the scaled image
method scaling method
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::scale ( float  factor,
tlPixelArray dest,
int  method = TL_SCALE_DECIMATE 
) [inherited]

Copy a scaled version of the pixel array to another pixel array.

Parameters:
factor the fp scaling factor
method scaling method
dest destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::scale ( int  newWidth,
int  newHeight,
tlPixelArray dest,
int  method = TL_SCALE_DECIMATE 
) [inherited]

Copy a scaled version of the pixel array to another pixel array.

Parameters:
newWidth desired width of the scaled image
newHeight desired height of the scaled image
method scaling method
dest destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::clear ( void   )  [inherited]

Set all pixels in the pixel array to black.

Returns:
0 on success, -1 otherwise.
See error management for details.

Reimplemented in tlMask.

int tlPixelArray::clear ( tlRect rect  )  [inherited]

Set all pixels in a portion of the pixel array to black.

Parameters:
rect portion of the pixel array to clear
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::addChannel ( void   )  [inherited]

Add a channel to a pixel array. The new channel is added after the current last channel.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::remChannel ( int  channel  )  [inherited]

Remove a channel from a pixel array.

Parameters:
channel channel to remove
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::remChannel ( int  channel,
tlPixelArray dest 
) [inherited]

Remove a channel from a pixel array and store the result in a new pixel array.

Parameters:
channel channel to remove
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toChannel ( int  channel  )  [inherited]

Extract one of the pixel array channel.

Parameters:
channel channel to extract
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toChannel ( int  channel,
tlRect rect 
) [inherited]

Extract a portion of one of the pixel array channel.

Parameters:
channel channel to extract
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toChannel ( int  channel,
tlPixelArray dest 
) [inherited]

Extract one of the pixel array channel. The result is put in another pixel array.

Parameters:
channel channel to extract
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toChannel ( int  channel,
tlRect rect,
tlPixelArray dest 
) [inherited]

Extract a portion of one of the pixel array channel. The result is put in another pixel array.

Parameters:
channel channel to extract
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::putChannel ( tlPixel pixelArray,
int  channel 
) [inherited]

Add a channel to a pixel array at a given index.

Parameters:
pixelArray pixel array to insert in the pixel array
channel channel where pixel array is to be inserted
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::putChannel ( tlPixel pixelArray,
tlRect rect,
int  channel 
) [inherited]

Add a channel to part of a pixel array at a given index.

Parameters:
pixelArray pixel array to insert in the pixel array
channel channel where pixel array is to be inserted
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::putChannel ( tlPixelArray pixelArray,
int  channel 
) [inherited]

Add a channel to a pixel array at a given index.

Parameters:
pixelArray pixel array to insert
channel channel where pixel array is to be inserted
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
The pixel array must contain a single channel.

int tlPixelArray::putChannel ( tlPixelArray pixelArray,
tlRect rect,
int  channel 
) [inherited]

Add a channel to part of a pixel array at a given index.

Parameters:
pixelArray pixel array to insert
channel channel where pixel array is to be inserted
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
The pixel array must contain a single channel.

int tlPixelArray::putChannel ( tlPixel pixelArray,
int  channel,
tlPixelArray dest 
) [inherited]

Add a channel to a pixel array at a given index, and store the result in a new pixel array

Parameters:
pixelArray pixel array to insert in the pixel array
channel channel where pixel array is to be inserted
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::putChannel ( tlPixel pixelArray,
tlRect rect,
int  channel,
tlPixelArray dest 
) [inherited]

Add a channel to part of an pixel array at a given index, and store the result in a new pixel array.

Parameters:
pixelArray pixel array to insert in the pixel array
channel channel where pixel array is to be inserted
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::putChannel ( tlPixelArray pixelArray,
int  channel,
tlPixelArray dest 
) [inherited]

Add a channel to a pixel array at a given index and store the result in a new pixel array

Parameters:
pixelArray pixel array to insert
channel channel where pixel array is to be inserted
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
The pixel array must contain a single channel.

int tlPixelArray::putChannel ( tlPixelArray pixelArray,
tlRect rect,
int  channel,
tlPixelArray dest 
) [inherited]

Add a channel to part of an pixel array at a given index and store the result in a new pixel array

Parameters:
pixelArray pixel array to insert
channel channel where pixel array is to be inserted
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Remarks:
The pixel array must contain a single channel.

int tlPixelArray::swapChannels ( int  channel1,
int  channel2 
) [inherited]

Swap two channels in a pixel array.

Parameters:
channel1 first channel to swap
channel2 second channel to swap
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::swapChannels ( int  channel1,
int  channel2,
tlPixelArray dest 
) [inherited]

Swap two channels in a pixel array and store the result in a new pixel array.

Parameters:
channel1 first channel to swap
channel2 second channel to swap
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toRgb (  )  [inherited]

Convert the pixel array to RGB format.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toRgb ( tlRect rect  )  [inherited]

Convert part of the pixel array to RGB format

Parameters:
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toRgb ( tlPixelArray dest  )  [inherited]

Convert the pixel array to RGB format. The result is put in another pixel array.

Parameters:
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toRgb ( tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to RGB format. The result is put in another pixel array.

Parameters:
rect portion of the pixel array to convert
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toYuv (  )  [inherited]

Convert the pixel array to YUV format.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toYuv ( tlRect rect  )  [inherited]

Convert part of the pixel array to YUV format

Parameters:
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toYuv ( tlPixelArray dest  )  [inherited]

Convert the pixel array to YUV format. The result is put in another pixel array.

Parameters:
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toYuv ( tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to YUV format. The result is put in another pixel array.

Parameters:
rect portion of the pixel array to convert
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toNrg (  )  [inherited]

Convert the pixel array to NRG format.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toNrg ( tlRect rect  )  [inherited]

Convert part of the pixel array to NRG format.

Parameters:
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toNrg ( tlPixelArray dest  )  [inherited]

Convert the pixel array to NRG format. The result is put in another pixel array.

Parameters:
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toNrg ( tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to NRG format. The result is put in another pixel array.

Parameters:
rect portion of the pixel array to convert
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toHsi (  )  [inherited]

Convert the pixel array to HSI format.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toHsi ( tlRect rect  )  [inherited]

Convert part of the pixel array to HSI format.

Parameters:
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toHsi ( tlPixelArray dest  )  [inherited]

Convert the pixel array to HSI format. The result is put in another pixel array.

Parameters:
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toHsi ( tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to HSI format. The result is put in another pixel array.

Parameters:
rect portion of the pixel array to convert
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::toGray (  )  [inherited]

Convert the pixel array to GRAY format.

Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to GRAY simply saves the luma (Y) channel into the GRAY image - it is therefore NOT equivalent to the RGB to GRAY conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toGray ( tlRect rect  )  [inherited]

Convert part of the pixel array to GRAY format.

Parameters:
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to GRAY simply saves the luma (Y) channel into the GRAY image - it is therefore NOT equivalent to the RGB to GRAY conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toGray ( tlPixelArray dest  )  [inherited]

Convert the pixel array to GRAY format. The result is put in another pixel array.

Parameters:
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to GRAY simply saves the luma (Y) channel into the GRAY image - it is therefore NOT equivalent to the RGB to GRAY conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toGray ( tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to GRAY format. The result is put in another pixel array.

Parameters:
rect portion of the pixel array to convert
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to GRAY simply saves the luma (Y) channel into the GRAY image - it is therefore NOT equivalent to the RGB to GRAY conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  threshold = 1  )  [inherited]

Convert the pixel array to BINARY format.

Parameters:
threshold binary threshold ´[0...255]
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  threshold,
tlRect rect 
) [inherited]

Convert part of the pixel array to BINARY format.

Parameters:
threshold binary threshold [0...255]
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  min,
int  max 
) [inherited]

Convert the pixel array to BINARY format. The result is put in another pixel array.

Parameters:
min binary lower threshold [0...255]
max binary upper threshold [0...255]
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  min,
int  max,
tlRect rect 
) [inherited]

Convert part of the pixel array to BINARY format. The result is put in another pixel array.

Parameters:
min binary lower threshold [0...255]
max binary upper threshold [0...255]
rect portion of the pixel array to convert
Returns:
0 on success, -1 otherwise. See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  threshold,
tlPixelArray dest 
) [inherited]

Convert the pixel array to GRAY format. The result is put in another pixel array.

Parameters:
threshold binary threshold [0...255]
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  threshold,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to BINARY format. The result is put in another pixel array.

Parameters:
threshold binary threshold [0...255]
rect portion of the pixel array to process
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  min,
int  max,
tlPixelArray dest 
) [inherited]

Convert the pixel array to BINARY format. The result is put in another pixel array.

Parameters:
min binary lower threshold [0...255]
max binary upper threshold [0...255]
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::toBin ( int  min,
int  max,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convert part of the pixel array to BINARY format. The result is put in another pixel array.

Parameters:
min binary lower threshold [0...255]
max binary upper threshold [0...255]
rect portion of the pixel array to process
dest [out] convert to destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Conversion from YUV to BIN simply thresholds the luma (Y) channel into the BIN image - it is therefore NOT equivalent to the RGB to BIN conversion. See http://www.answers.com/topic/yuv-rgb-conversion-formulas for details.

int tlPixelArray::mask ( tlRect rect  )  [inherited]

Hide all the pixels that are not in a given portion of the image by setting their value to 0 on every channel.

Parameters:
rect the portion of the pixel array to keep
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::mask ( tlPixelArray pixelArray  )  [inherited]

Hide the pixel array behind a given mask (provided by a binary pixel array) by setting all inactive pixels to value 0 on every channel.

Parameters:
pixelArray the binary pixel array to apply as a mask to the pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only the portion of the image that is overlapped by mask will be processed.

int tlPixelArray::mask ( tlPixelArray mask,
tlRect rect 
) [inherited]

Hide a portion of the pixel array behind a given mask (provided by a binary pixel array) by setting all inactive pixels to value 0 on every channel.

Parameters:
mask the binary pixel array to apply as a mask to the pixel array
rect the portion of the pixel array to mask
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only the portion of the image that is overlapped by mask will be processed.

int tlPixelArray::mask ( tlRect rect,
tlPixelArray dest 
) [inherited]

Hide all the pixels that are not in a given portion of the image by setting their value to 0 on every channel. The result is placed in the dest pixel array.

Parameters:
rect the portion of the pixel array to keep
dest the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::mask ( tlPixelArray pixelArray,
tlPixelArray dest 
) [inherited]

Hide the pixel array behind a given mask (provided by a binary pixel array) by setting all inactive pixels to value 0 on every channel. The result is placed in the dest pixel array.

Parameters:
pixelArray the binary pixel array to apply as a mask to the pixel array
dest the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only the portion of the image that is overlapped by mask will be processed.

int tlPixelArray::mask ( tlPixelArray mask,
tlRect rect,
tlPixelArray dest 
) [inherited]

Hide a portion of the pixel array behind a given mask (provided by a binary pixel array) by setting all inactive pixels to value 0 on every channel. The result is placed in the dest pixel array.

Parameters:
mask the binary pixel array to apply as a mask to the pixel array
rect the portion of the pixel array to mask
dest the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Only the portion of the image that is overlapped by mask will be processed.

int tlPixelArray::add ( tlPixelArray pixelArray  )  [inherited]

Add a pixel array to another.

Parameters:
pixelArray the pixel array to add to the current pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::add ( tlPixelArray pixelArray,
tlRect rect 
) [inherited]

Add part of a pixel array to another.

Parameters:
pixelArray the pixel array to add to the current pixel array
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::add ( tlPixelArray pixelArray,
tlPixelArray dest 
) [inherited]

Add a pixel array to another; the result is put into a third pixel array.

Parameters:
pixelArray the pixel array to add to the current pixel array
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::add ( tlPixelArray pixelArray,
tlRect rect,
tlPixelArray dest 
) [inherited]

Add part of a pixel array to another; the result is put into a third pixel array

Parameters:
pixelArray the pixel array to add to the current pixel array
rect portion of the pixel array to process
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::sub ( tlPixelArray pixelArray  )  [inherited]

Subtract a pixel array from another.

Parameters:
pixelArray the pixel array to subtract from the current pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::sub ( tlPixelArray pixelArray,
tlRect rect 
) [inherited]

Subtract part of a pixel array from another

Parameters:
pixelArray the pixel array to subtract from the current pixel array
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::sub ( tlPixelArray pixelArray,
tlPixelArray dest 
) [inherited]

Subtract a pixel array from another; the result is put into a third pixel array

Parameters:
pixelArray the pixel array to subtract from the current pixel array
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::sub ( tlPixelArray pixelArray,
tlRect rect,
tlPixelArray dest 
) [inherited]

Subtract part of a pixel array from another; the result is put into a third pixel array

Parameters:
pixelArray the pixel array to subtract from the current pixel array
rect portion of the pixel array to process
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_size 
) [inherited]

Convolution with an integer square kernel.

Parameters:
kernel convolution kernel (integer values)
kernel_size square kernel dimension
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_width,
int  kernel_height 
) [inherited]

Convolution with an integer rectangular kernel.

Parameters:
kernel convolution kernel (integer values)
kernel_width convolution kernel width
kernel_height convolution kernel height
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_size 
) [inherited]

Convolution with a floating point square convolution kernel.

Parameters:
kernel convolution kernel (floating-point values)
kernel_size square kernel dimension
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_width,
int  kernel_height 
) [inherited]

Convolution with a floating point rectangular convolution kernel.

Parameters:
kernel convolution kernel (floating-point values)
kernel_width convolution kernel width
kernel_height convolution kernel height
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_size,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with an integer square convolution kernel.

Parameters:
kernel convolution kernel (integer values)
kernel_size square kernel dimension
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with an integer rectangular convolution kernel.

Parameters:
kernel convolution kernel (integer values)
kernel_width convolution kernel width
kernel_height convolution kernel height
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_size,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with a floating point square convolution kernel.

Parameters:
kernel convolution kernel (floating-point values)
kernel_size square kernel dimension
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with a floating point rectangular convolution kernel.

Parameters:
kernel convolution kernel (floating-point values)
kernel_width convolution kernel width
kernel_height convolution kernel height
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  xkernel,
int  xksize,
char *  ykernel,
int  yksize 
) [inherited]

Convolution with a separable integer kernel.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  xkernel,
int  xksize,
char *  ykernel,
int  yksize,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with a separable integer kernel.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  xkernel,
int  xksize,
float *  ykernel,
int  yksize 
) [inherited]

Convolution with a separable floating point kernel.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  xkernel,
int  xksize,
float *  ykernel,
int  yksize,
tlRect rect 
) [inherited]

Convolution of part of the pixel array with a separable floating point kernel.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_size,
tlPixelArray dest 
) [inherited]

Convolution with an integer square kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (integer values)
kernel_size square kernel dimension
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_width,
int  kernel_height,
tlPixelArray dest 
) [inherited]

Convolution with an integer rectangular kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (integer values)
kernel_width convolution kernel width
kernel_height convolution kernel height
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_size,
tlPixelArray dest 
) [inherited]

Convolution with a floating point square convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (floating-point values)
kernel_size square kernel dimension
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_width,
int  kernel_height,
tlPixelArray dest 
) [inherited]

Convolution with a floating point rectangular convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (floating-point values)
kernel_width convolution kernel width
kernel_height convolution kernel height
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with an integer square convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (integer values)
kernel_size square kernel dimension
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with an integer rectangular convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (integer values)
kernel_width convolution kernel width
kernel_height convolution kernel height
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with a floating point square convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (floating-point values)
kernel_size square kernel dimension
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with a floating point rectangular convolution kernel. Put the result in another pixel array.

Parameters:
kernel convolution kernel (floating-point values)
kernel_width convolution kernel width
kernel_height convolution kernel height
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  xkernel,
int  xksize,
char *  ykernel,
int  yksize,
tlPixelArray dest 
) [inherited]

Convolution with a separable integer kernel. Put the result in another pixel array.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( char *  xkernel,
int  xksize,
char *  ykernel,
int  yksize,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with a separable integer kernel. Put the result in another pixel array.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  xkernel,
int  xksize,
float *  ykernel,
int  yksize,
tlPixelArray dest 
) [inherited]

Convolution with a separable floating point kernel. Put the result in another pixel array.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  xkernel,
int  xksize,
float *  ykernel,
int  yksize,
tlRect rect,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with a separable floating point kernel. Put the result in another pixel array.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::convolution ( float *  xkernel,
int  xksize,
float *  ykernel,
int  yksize,
tlRect rect,
tlPixelArray mask,
tlPixelArray dest 
) [inherited]

Convolution of part of the pixel array with a separable floating point kernel. Put the result in another pixel array.

Parameters:
xkernel convolution kernel along the X axis
xksize X convolution kernel size
ykernel convolution kernel along the Y axis
yksize Y convolution kernel size
rect portion of the pixel array to process
mask actual pixels to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::median ( int  size  )  [inherited]

Apply a median filter to the pixel array.

Parameters:
size size of the median kernel
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::median ( int  size,
tlRect rect 
) [inherited]

Apply a median filter to a portion of the pixel array.

Parameters:
size size of the median kernel
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::erode ( int  size,
tlRect rect 
) [inherited]

Perform morphological erosion on the pixel array using a square mask. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::erode ( int  size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Perform morphological erosion on the pixel array using a square mask; the result is put in another pixel array. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::dilate ( int  size,
tlRect rect 
) [inherited]

Perform morphological dilatation on the pixel array using a square mask. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::dilate ( int  size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Perform morphological dilatation on the pixel array using a square mask; the result is put in another pixel array. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::opening ( int  size,
tlRect rect 
) [inherited]

Perform morphological opening on the pixel array using a square mask. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::opening ( int  size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Perform morphological opening on the pixel array using a square mask; the result is put in another pixel array. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::closing ( int  size,
tlRect rect 
) [inherited]

Perform morphological closing on the pixel array using a square mask. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::closing ( int  size,
tlRect rect,
tlPixelArray dest 
) [inherited]

Perform morphological closing on the pixel array using a square mask; the result is put in another pixel array. The operation is performed on every pixel array channel independantly.

Parameters:
size the square mask size [pix]
rect the portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::thin ( tlRect rect  )  [inherited]

Perform morphological (hit and miss) thinning on the pixel array using a square mask. The operation is performed on BIN type only.

Parameters:
rect the portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::thin ( tlRect rect,
tlPixelArray dest 
) [inherited]

Perform morphological (hit and miss) thinning on the pixel array using a square mask; the result is put in another pixel array. The operation is performed on BIN type only.

Parameters:
rect the portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( int  minVal,
int  maxVal 
) [inherited]

Filter a monochrome pixel array using arbitrary boundaries.

Parameters:
minVal lower pixel value boundary
maxVal upper pixel value boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( int  minVal,
int  maxVal,
tlRect rect 
) [inherited]

Filter a portion of a monochrome pixel array using arbitrary boundaries.

Parameters:
minVal lower pixel value boundary
maxVal upper pixel value boundary
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( int  minVal,
int  maxVal,
tlPixelArray dest 
) [inherited]

Filter a monochrome pixel array using arbitrary boundaries. The result is put in another pixel array.

Parameters:
minVal lower pixel value boundary
maxVal upper pixel value boundary
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( int  minVal,
int  maxVal,
tlRect rect,
tlPixelArray dest 
) [inherited]

Filter a portion of a monochrome pixel array using arbitrary boundaries. The result is put in another pixel array.

Parameters:
minVal lower pixel value boundary
maxVal upper pixel value boundary
rect portion of the pixel array to process
dest [out] the destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( tlColor minColor,
tlColor maxColor 
) [inherited]

Filter a pixel array using color boundaries.

Parameters:
minColor lower pixel value boundary
maxColor upper pixel value boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( tlColor minColor,
tlColor maxColor,
tlRect rect 
) [inherited]

Filter a portion of a pixel array using color boundaries.

Parameters:
minColor lower pixel value boundary
maxColor upper pixel value boundary
rect portion of the pixel array to process
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( tlColor minColor,
tlColor maxColor,
tlPixelArray dest 
) [inherited]

Filter a pixel array using color boundaries. The result is put in another pixel array.

Parameters:
minColor lower pixel value boundary
maxColor upper pixel value boundary
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::filter ( tlColor minColor,
tlColor maxColor,
tlRect rect,
tlPixelArray dest 
) [inherited]

Filter a portion of a pixel array using color boundaries. The result is put in another pixel array.

Parameters:
minColor lower pixel value boundary
maxColor upper pixel value boundary
rect portion of the pixel array to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getMax ( tlMask mask,
tlPoint point,
int  channel = 0 
) [inherited]

Extract maxima from a portion of a pixel array.

Parameters:
mask portion of the pixel array to process
channel channel of the pixel array to process
point location of maxima in image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getMin ( tlMask mask,
tlPoint point,
int  channel = 0 
) [inherited]

Extract minima from a portion of a pixel array.

Parameters:
mask portion of the pixel array to process
channel channel of the pixel array to process
point location of minima in image
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColor ( tlPoint point,
tlColor color 
) [inherited]

Retrieve the color of a given pixel.

Parameters:
point point in the pixel array to retrieve
color [out] color object with expected color and format
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColor ( int  x,
int  y,
tlColor color 
) [inherited]

Retrieve the color of a given pixel.

Parameters:
x X coord of the pixel to retrieve
y Y coord of the pixel to retrieve
color [out] color object with expected color and format
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColors ( tlColor minColor,
tlColor maxColor 
) [inherited]

Extract color maxima/minima from a pixel array. The color objects are set to the same format as the input pixel array.

Parameters:
minColor [out] lower color boundary
maxColor [out] upper color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColors ( tlColor minColor,
tlColor maxColor,
tlRect rect 
) [inherited]

Extract color maxima/minima from a portion of a pixel array. The color objects are set to the same format as the input pixel array.

Parameters:
rect portion of the pixel array to process
minColor [out] lower color boundary
maxColor [out] upper color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColorMin ( tlColor minColor  )  [inherited]

Extract color minima from a pixel array. The color object is set to the same format as the input pixel array.

Parameters:
minColor [out] lower color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColorMin ( tlColor minColor,
tlRect rect 
) [inherited]

Extract color minima from a portion of a pixel array. The color object is set to the same format as the input pixel array.

Parameters:
rect portion of the pixel array to process
minColor [out] lower color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColorMax ( tlColor maxColor  )  [inherited]

Extract color maxima from a pixel array. The color object is set to the same format as the input pixel array.

Parameters:
maxColor [out] upper color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::getColorMax ( tlColor maxColor,
tlRect rect 
) [inherited]

Extract color maxima from a portion of a pixel array. The color object is set to the same format as the input pixel array.

Parameters:
rect portion of the pixel array to process
maxColor [out] upper color boundary
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::find ( tlObject object,
int  confidence,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object in an image given a minimum confidence threshold. This call updates the object argument.

Parameters:
object [out] object to find
confidence min match threshold [%]
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::find ( tlObject object,
int  confidence,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object in a portion of an image given a minimum confidence threshold. This call updates the object argument.

Parameters:
object [out] object to find
confidence min match threshold [%]
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::find ( tlMask shape,
int  confidence,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object shape in an image given a minimum confidence threshold. This call updates the shape argument.

Parameters:
shape shape to find
confidence min match threshold [%]
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::find ( tlMask shape,
int  confidence,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object shape in a portion of an image given a minimum confidence threshold. This call updates the shape argument.

Parameters:
shape shape to find
confidence min match threshold [%]
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBest ( tlObject object,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object in the image. This call updates the object argument.

Parameters:
object [out] object to find
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBest ( tlObject object,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object in a portion of the image. This call updates the object argument.

Parameters:
object [out] object to find
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBest ( tlMask shape,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object shape in the image. This call updates the shape argument.

Parameters:
shape shape to find
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBest ( tlMask shape,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object shape in a portion of the image. This call updates the shape argument.

Parameters:
shape shape to find
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findShape ( tlObject object,
int  confidence,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object shape in an image given a minimum confidence threshold. This call updates the shape argument.

Parameters:
object shape to find
confidence min match threshold [%]
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findShape ( tlObject object,
int  confidence,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find an object shape in a portion of an image given a minimum confidence threshold. This call updates the shape argument.

Parameters:
object shape to find
confidence min match threshold [%]
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBestShape ( tlObject object,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object shape in the image. This call updates the shape argument.

Parameters:
object shape to find
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::findBestShape ( tlObject object,
tlRect rect,
int  increment = TL_DEFAULT_INCREMENT 
) [inherited]

Find the best match for an object shape in a portion of the image. This call updates the shape argument.

Parameters:
object shape to find
rect portion of the image to process
increment correlation increment
Returns:
An arbitraty confidence index in [%], -1 if not found.
See error management for details.

int tlPixelArray::buildHist ( tlHist hist,
tlMask mask,
tlRect rect,
int  channel = 0 
) [inherited]

Build a histogram of a given channel for a portion of a pixel array.

Parameters:
mask pixel array mask (do not consider inactive pixels)
rect portion of the pixel array to consider
channel channel to extract
hist [out] the resulting histogram
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlPixelArray::buildHist ( tlHist2D hist,
tlMask mask,
tlRect rect,
int  xchannel = 0,
int  ychannel = 1 
) [inherited]

Build a 2D histogram of two given channels from a portion of a pixel array.

Parameters:
mask pixel array mask (do not consider inactive pixels)
rect portion of the pixel array to consider
xchannel channel to extract
ychannel channel to extract
hist [out] a valid pointer to the resulting histogram
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::set ( int  x,
int  y,
int  width,
int  height 
) [inherited]

Set rectangle member values.

Parameters:
x rectangle upper-left corner x position [pix]
y rectangle upper-left corner y position [pix]
width rectangle width [pix]
height rectangle height [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::collapse ( int  dsize  )  [inherited]

Evenly shrinks the rectangle around its center.

Parameters:
dsize width/height decrease [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::expand ( int  dsize  )  [inherited]

Evenly expands the rectangle around its center

Parameters:
dsize width/height decrease [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlRect::setCenter ( int  x,
int  y 
) [inherited]

Set the location of the rectangle center.

Parameters:
x rectangle center x position [pix]
y rectangle center corner y position [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.

Reimplemented in tlMask.

int tlRect::intersect ( tlRect rect  )  [inherited]

Check if a given rectangle intesects with the current object.

Parameters:
rect the rectangle to check for intersection
Returns:
1 if rectangles intersect, 0 if not, -1 on error.
See error management for details.

int tlSize::setSize ( int  width,
int  height,
int  depth = 255 
) [inherited]

Set the size object parameters.

Parameters:
width object width
height object height
depth object disparity range size
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLocation::setLocation ( int  x,
int  y,
int  disp = 0 
) [inherited]

Set the location object parameters.

Parameters:
x x location of the object [pix]
y y location of the object [pix]
disp disparity of the object [disp]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLocation::setLocation ( tlPoint point  )  [inherited]

Set the location object parameters.

Parameters:
point tlPoint object
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLocation::shift ( int  dx,
int  dy,
int  ddisp = 0 
) [inherited]

Shift the object location.

Parameters:
dx shift along x axis [pix]
dy shift along y axis [pix]
ddisp disparity shift [disp]
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLocation::setWorldLocation ( float  wx,
float  wy,
float  wz 
) [inherited]

Set the world location object parameters.

Parameters:
wx world X location
wy world Y location
wz world Z location
Returns:
0 on success, -1 otherwise.
See error management for details.

tlLocation * tlLocation::toLocation (  )  [inherited]

Get a copy of the location of the object.

Returns:
A pointer to a tlLocation object containing the data.
Note:
It is the responsibility of the programmer to delete the object returned.

int tlLocation::toLocation ( tlLocation location  )  [inherited]

Get the location of the object.

Parameters:
location [out] tlLocation object that will receive the data
Returns:
0 on success, -1 otherwise.
See error management for details.


Member Data Documentation

int tlPixelArray::format [inherited]

Image format (see tl_format for more information).

long tlPixelArray::timeStamp [inherited]

Time at which the pixel array was updated (from a hardware digitizer).

int * tlPixelArray::pixelWidth [inherited]

The number of bytes per pixel (depends on the image format).

tlPixel * tlPixelArray::pixel [inherited]

Pointer to the pixel array. The array size is (width * height * pixelWidth) bytes.

int tlSize::width [inherited]

width of the object inheriting from tlSize.

int tlSize::height [inherited]

height of the object inheriting from tlSize.

int tlSize::depth [inherited]

disparity range size of the object inheriting from tlSize.

int tlLocation::x [inherited]

X location of the object [pix].

int tlLocation::y [inherited]

Y location of the object [pix].

int tlLocation::disp [inherited]

Disparity of the object [disp].

int tlLocation::wx [inherited]

X location of the object in real-world coordonates [m].

int tlLocation::wy [inherited]

Y location of the object in real-world coordonates [m].

int tlLocation::wz [inherited]

Z location of the object in real-world coordonates [m].


The documentation for this class was generated from the following files:

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.