TLIB documentation
 

tlMemory.h File Reference


Detailed Description

Internal memory allocation routines.

#include "tlVision.h"

Include dependency graph for tlMemory.h:

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

Go to the source code of this file.

Functions

tlPixeltl_create_array (int width, int height, int pixel_width)
tlPixeltl_copy_array (tlPixel *src, int width, int height, int pixel_width)
tlPixeltl_copy_array (tlPixel *src, int width, int height, int pixel_width, tlRect *rect)
tlPixeltl_copy_subarray (tlPixel *src, int width, int height, int pixel_width, tlRect *subRect)
tlHRPixel * tl_create_hrarray (int width, int height, int pixel_width)
tlHRPixel * tl_copy_hrarray (tlHRPixel *src, int width, int height, int pixel_width)
tlHRPixel * tl_copy_hrarray (tlHRPixel *src, int width, int height, int pixel_width, tlRect *rect)
tlHRPixel * tl_copy_hrsubarray (tlHRPixel *src, int width, int height, int pixel_width, tlRect *subRect)


Function Documentation

tlPixel* tl_copy_array ( tlPixel src,
int  width,
int  height,
int  pixel_width,
tlRect rect 
)

Create a copy of a portion of a given array containing an image; new (copied) array has the same size as the original.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width byte per pixel
rect portion of the image to copy
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tlSize::height, tl_copy_array(), TL_MAX, TL_MIN, TL_PIXEL, tlSize::width, tlLocation::x, and tlLocation::y.

tlPixel* tl_copy_array ( tlPixel src,
int  width,
int  height,
int  pixel_width 
)

Create a copy of a given array containing an image.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width byte per pixel
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tl_copy_array(), TL_ERRNO_MSG, and TL_ERROR_ALLOCATION_FAILED.

Referenced by tlPixelArray::addChannel(), tlImage::borderBlack(), tlImage::borderMirror(), tlPixelArray::convolution(), tlPixelArray::copy(), tlObject::copy(), tlImage::crop(), tlPixelArray::dilate(), tlImage::edges(), tlImage::edgesHor(), tlImage::edgesVert(), tlPixelArray::erode(), tlPixelArray::remChannel(), tlImage::rotateLeft(), tlImage::rotateRight(), tlPixelArray::swapChannels(), tlPixelArray::thin(), tl_copy_array(), tlPixelArray::tlPixelArray(), tlPixelArray::toBin(), tlPixelArray::toChannel(), tlPixelArray::toGray(), tlPixelArray::toHsi(), tlPixelArray::toNrg(), tlPixelArray::toRgb(), and tlPixelArray::toYuv().

tlHRPixel* tl_copy_hrarray ( tlHRPixel *  src,
int  width,
int  height,
int  pixel_width,
tlRect rect 
)

Create a copy of a portion of a given high-resolution array containing an image; new (copied) array has the same size as the original.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width channels per pixel
rect portion of the image to copy
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tlSize::height, tl_copy_hrarray(), TL_MAX, TL_MIN, TL_PIXEL, tlSize::width, tlLocation::x, and tlLocation::y.

tlHRPixel* tl_copy_hrarray ( tlHRPixel *  src,
int  width,
int  height,
int  pixel_width 
)

Create a copy of a given high-resolution array containing an image.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width channel per pixel
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tl_copy_hrarray(), TL_ERRNO_MSG, and TL_ERROR_ALLOCATION_FAILED.

Referenced by tlPixelArray::copy(), tl_copy_hrarray(), tlPixelArray::toBin(), and tlPixelArray::toGray().

tlHRPixel* tl_copy_hrsubarray ( tlHRPixel *  src,
int  width,
int  height,
int  pixel_width,
tlRect rect 
)

Create a copy of a portion of a given high-resolution array containing an image; new (copied) array has the same size as the portion of the image to duplicate.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width byte per pixel
rect portion of the image to copy
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tlSize::height, tl_copy_hrsubarray(), TL_MAX, TL_MIN, TL_PIXEL, tlSize::width, tlLocation::x, and tlLocation::y.

Referenced by tl_copy_hrsubarray().

tlPixel* tl_copy_subarray ( tlPixel src,
int  width,
int  height,
int  pixel_width,
tlRect rect 
)

Create a copy of a portion of a given array containing an image; new (copied) array has the same size as the portion of the image to duplicate.

Parameters:
src source array
width image width [pix]
height image height [pix]
pixel_width byte per pixel
rect portion of the image to copy
Returns:
A pointer to the new (copied) array, NULL if allocation failed.
Note:
for optimization reasons, no verification of the validity of the input array is made; in case an invalid pointer is passed, results are impredictable.

References tlSize::height, tl_copy_subarray(), TL_MAX, TL_MIN, TL_PIXEL, tlSize::width, tlLocation::x, and tlLocation::y.

Referenced by tlObject::define(), and tl_copy_subarray().

tlPixel* tl_create_array ( int  width,
int  height,
int  pixel_width 
)

Allocate a new pixel array.

Parameters:
width image width [pix]
height image height [pix]
pixel_width byte per pixel
Returns:
A pointer to the new array, NULL if allocation failed.

References tl_create_array().

Referenced by tlMask::adjust(), tlCameraTSAI::dewarp(), tlImage::edges(), tlPixelArray::mask(), tlPixelArray::median(), tlMask::minimize(), tl_create_array(), tl_hsi2yuv(), tl_read_bmp(), tl_read_jpg(), tl_scale_bspline(), and tl_yuv2hsi().

tlHRPixel* tl_create_hrarray ( int  width,
int  height,
int  pixel_width 
)

Allocate a new high-resolution pixel array.

Parameters:
width image width [pix]
height image height [pix]
pixel_width byte per pixel
Returns:
A pointer to the new array, NULL if allocation failed.

References tl_create_hrarray().

Referenced by tlPixelArray::mask(), and tl_create_hrarray().



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