TLIB documentation
 

tlConvolution.h File Reference


Detailed Description

Internal convolution operators.

#include "tlVision.h"

Include dependency graph for tlConvolution.h:

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

Go to the source code of this file.

Functions

int tl_convolution (tlPixel *src, int width, int height, int pixel_width, char *kernel, int kernel_width, int kernel_height, tlRect *rect, tlPixel *dest)
int tl_convolution (tlPixel *src, int width, int height, int pixel_width, float *kernel, int kernel_width, int kernel_height, tlRect *rect, tlPixel *dest)
int tl_convolution_x (tlPixel *src, int width, int height, int pixel_width, char *kernel, int kernel_size, tlRect *rect, int *dest)
int tl_convolution_x (tlPixel *src, int width, int height, int pixel_width, float *kernel, int kernel_size, tlRect *rect, float *dest)
int tl_convolution_x (tlPixel *src, int width, int height, int pixel_width, float *kernel, int kernel_size, tlRect *rect, tlPixel *mask, float *dest)
int tl_convolution_y (int *src, int width, int height, int pixel_width, char *kernel, int kernel_size, tlRect *rect, tlPixel *dest)
int tl_convolution_y (float *src, int width, int height, int pixel_width, float *kernel, int kernel_size, tlRect *rect, tlPixel *dest)
int tl_convolution_y (float *src, int width, int height, int pixel_width, float *kernel, int kernel_size, tlRect *rect, tlPixel *mask, tlPixel *dest)
int tl_create_gaussian_kernel (int ksize, float sigma, float *kernel)


Function Documentation

int tl_convolution ( tlPixel src,
int  width,
int  height,
int  pixel_width,
float *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect,
tlPixel dest 
)

Perform linear convolution with any square kernel (with floating-point values).

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

int tl_convolution ( tlPixel src,
int  width,
int  height,
int  pixel_width,
char *  kernel,
int  kernel_width,
int  kernel_height,
tlRect rect,
tlPixel dest 
)

Perform linear convolution with any square kernel (with integer values).

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

int tl_convolution_x ( tlPixel src,
int  width,
int  height,
int  pixel_width,
float *  kernel,
int  kernel_size,
tlRect rect,
tlPixel mask,
float *  dest 
)

Perform linear convolution with any square kernel (with floating-point values); this routine performs monodimensional convolution along all rows of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
mask Mask the object of the src (must be of the same size of the source)
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_convolution_x ( tlPixel src,
int  width,
int  height,
int  pixel_width,
float *  kernel,
int  kernel_size,
tlRect rect,
float *  dest 
)

Perform linear convolution with any square kernel (with floating-point values); this routine performs monodimensional convolution along all lines of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_convolution_x ( tlPixel src,
int  width,
int  height,
int  pixel_width,
char *  kernel,
int  kernel_size,
tlRect rect,
int *  dest 
)

Perform linear convolution with any square kernel (with integer values); this routine performs monodimensional convolution along all lines of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_convolution_y ( float *  src,
int  width,
int  height,
int  pixel_width,
float *  kernel,
int  kernel_size,
tlRect rect,
tlPixel mask,
tlPixel dest 
)

Perform linear convolution with any square kernel (with floating-point values); this routine performs monodimensional convolution along all columns of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
mask mask the object of the src (must be of the same size of the source)
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_convolution_y ( float *  src,
int  width,
int  height,
int  pixel_width,
float *  kernel,
int  kernel_size,
tlRect rect,
tlPixel dest 
)

Perform linear convolution with any square kernel (with floating-point values); this routine performs monodimensional convolution along all columns of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_convolution_y ( int *  src,
int  width,
int  height,
int  pixel_width,
char *  kernel,
int  kernel_size,
tlRect rect,
tlPixel dest 
)

Perform linear convolution with any square kernel (with integer values); this routine performs monodimensional convolution along all columns of an image with a separable kernel

Parameters:
src image pixel array
width image width
height image height
pixel_width pixel width
kernel convolution kernel (line)
kernel_size size of the convolution kernel
rect portion of the image to process
dest [out] destination pixel array
Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_create_gaussian_kernel ( int  ksize,
float  sigma,
float *  kernel 
)

Compute gaussian kernel of a given size. The kernel is a line and must be applied by using the convolution in separate mode.

See also:
tlPixelArray::convolution(float *xkernel, int xksize, float *ykernel, int yksize)
Parameters:
ksize kernel size (line)
sigma desired sigma
kernel [out] destination gaussian kernel array
Returns:
0 on success, -1 otherwise.
See error management for details.
Todo:
check why output is different from Gaetan's version



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.