Main Page   Modules   Compound List   File List   Compound Members   File Members  

Convolution Operations
[Vision Package]


Compounds

struct  Gan_Mask1D
 1D convolution mask. More...


Defines

#define SHIFT_DOWN(v, s)   ((v) < (s) ? (v) : ((v)-(s)))
#define SHIFT_UP(v, s)   ((v) < 0 ? ((v)+(s)) : (v))

Enumerations

enum  Gan_Mask1DFormat { GAN_MASK1D_SYMMETRIC, GAN_MASK1D_ANTISYMMETRIC, GAN_MASK1D_GENERIC }
 Format of convolution mask. More...


Functions

Gan_Bool gan_convolve1D_f (float *source, int sstride, float *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for float arrays.

Gan_Bool gan_convolve1D_d (double *source, int sstride, double *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for double arrays.

Gan_Bool gan_convolve1D_i (int *source, int sstride, int *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for integer arrays.

Gan_Bool gan_convolve1D_uc (unsigned char *source, int sstride, unsigned char *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for integer arrays.

Gan_Bool gan_convolve1D_us (unsigned short *source, int sstride, unsigned short *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for integer arrays.

Gan_Bool gan_convolve1D_ui (unsigned int *source, int sstride, unsigned int *dest, int dstride, Gan_Mask1D *mask, unsigned int dsize)
 1D convolution function for unsigned integer arrays.

Gan_Bool gan_convolve_circular1D_f (float *source, int sstride, float *dest, int dstride, Gan_Mask1D *mask, unsigned int size)
 Circular 1D convolution function for float arrays.

Gan_Bool gan_convolve_circular1D_d (double *source, int sstride, double *dest, int dstride, Gan_Mask1D *mask, unsigned int size)
 Circular 1D convolution function for double arrays.

Gan_Imagegan_image_convolve1Dx_q (Gan_Image *image, Gan_ImageChannelType channel, Gan_Mask1D *mask, Gan_Image *dest)
 Convolves an image in the x-direction.

Gan_Imagegan_image_convolve1Dy_q (Gan_Image *image, Gan_ImageChannelType channel, Gan_Mask1D *mask, Gan_Image *dest)
 Convolves an image in the y-direction.

Gan_Imagegan_image_convolve1Dx_s (Gan_Image *image, Gan_ImageChannelType channel, Gan_Mask1D *mask)
 Macro: Convolves an image in the x-direction.

Gan_Imagegan_image_convolve1Dy_s (Gan_Image *image, Gan_ImageChannelType channel, Gan_Mask1D *mask)
 Macro: Convolves an image in the y-direction.

Gan_Mask1Dgan_mask1D_form_gen (Gan_Mask1D *mask, Gan_Mask1DFormat format, Gan_Type type, void *data, unsigned int size)
 Form a new 1D convolution mask.

Gan_Bool gan_mask1D_copy_q (Gan_Mask1D *source, Gan_Mask1D *dest)
 Copies a convolution mask.

Gan_Bool gan_mask1D_free (Gan_Mask1D *mask)
 Frees a convolution mask.

Gan_Mask1Dgan_gauss_mask_new (Gan_Type type, double sigma, unsigned mask_size, double scale, void *mask_data)
 Make new Gaussian convolution mask.

Gan_Mask1Dgan_mask1D_alloc (Gan_Mask1DFormat format, Gan_Type type, unsigned int size)
 Macro: Allocate and return a new 1D convolution mask.

Gan_Mask1Dgan_mask1D_alloc_data (Gan_Mask1DFormat format, Gan_Type type, void *data, unsigned int size)
 Macro: Allocate and return a new 1D convolution mask.

Gan_Mask1Dgan_mask1D_form (Gan_Mask1D *mask, Gan_Mask1DFormat format, Gan_Type type, unsigned int size)
 Macro: Build a new 1D convolution mask.

Gan_Mask1Dgan_mask1D_form_data (Gan_Mask1D *mask, Gan_Mask1DFormat format, Gan_Type type, void *data, unsigned int size)
 Macro: Build a new 1D convolution mask.


Enumeration Type Documentation

enum Gan_Mask1DFormat
 

Format of convolution mask.

Enumeration values:
GAN_MASK1D_SYMMETRIC  Symmetric 1D convolution mask
GAN_MASK1D_ANTISYMMETRIC  Antisymmetric 1D convolution mask
GAN_MASK1D_GENERIC  General 1D convolution mask


Function Documentation

Gan_Bool gan_convolve1D_d double *    source,
int    sstride,
double *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for double arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array in units of doubles
dest The destination array for the convolution
dstride The stride of the dest array in units of doubles
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type double.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_i().

Gan_Bool gan_convolve1D_f float *    source,
int    sstride,
float *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for float arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array in units of floats
dest The destination array for the convolution
dstride The stride of the dest array in units of floats
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type float.
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_i().

Gan_Bool gan_convolve1D_i int *    source,
int    sstride,
int *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for integer arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array
dest The destination array for the convolution
dstride The stride of the dest array
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type int. There is no checking for overflow.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_i().

Gan_Bool gan_convolve1D_uc unsigned char *    source,
int    sstride,
unsigned char *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for integer arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array
dest The destination array for the convolution
dstride The stride of the dest array
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type unsigned char. There is no checking for overflow.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_uc().

Gan_Bool gan_convolve1D_ui unsigned int *    source,
int    sstride,
unsigned int *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for unsigned integer arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array
dest The destination array for the convolution
dstride The stride of the dest array
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type unsigned int. There is no checking for overflow.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_uc().

Gan_Bool gan_convolve1D_us unsigned short *    source,
int    sstride,
unsigned short *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    dsize
 

1D convolution function for integer arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array
dest The destination array for the convolution
dstride The stride of the dest array
mask The convolution mask
dsize The number of output elements to compute
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type unsigned short. There is no checking for overflow.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve1D_uc().

Gan_Bool gan_convolve_circular1D_d double *    source,
int    sstride,
double *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    size
 

Circular 1D convolution function for double arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array in units of doubles
dest The destination array for the convolution
dstride The stride of the dest array in units of doubles
mask The convolution mask
size The number of input/output elements
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type double. The input source array is treated as circular, so that no values are lost at the ends.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve_circular1D_i().

Gan_Bool gan_convolve_circular1D_f float *    source,
int    sstride,
float *    dest,
int    dstride,
Gan_Mask1D   mask,
unsigned int    size
 

Circular 1D convolution function for float arrays.

Parameters:
source The input array to be convolved
sstride The stride of the source array in units of floats
dest The destination array for the convolution
dstride The stride of the dest array in units of floats
mask The convolution mask
size The number of input/output elements
Applies a one-dimensional convolution operation to the given source array. Both arrays must be of type float. The input source array is treated as circular, so that no values are lost at the ends.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_convolve_circular1D_i().

Gan_Mask1D* gan_gauss_mask_new Gan_Type    type,
double    sigma,
unsigned    mask_size,
double    scale,
void *    mask_data
 

Make new Gaussian convolution mask.

Parameters:
type Type of mask element, e.g. GAN_DOUBLE
sigma Standard deviation of convolution
mask_size Mask dimension, must be odd/
scale Scale factor for mask entries
mask_data Pointer to mask data or NULL
Allocates, fills and returns a pointer to a new Gaussian convolution mask structure with given size and standard deviation.

Returns:
Non-NULL Pointer to the created convolution mask structure, or NULL on failure.
See also:
gan_mask1D_free().

Gan_Image* gan_image_convolve1Dx_q Gan_Image   image,
Gan_ImageChannelType    channel,
Gan_Mask1D   mask,
Gan_Image   dest
 

Convolves an image in the x-direction.

Parameters:
image The input image
channel Colour channel to be convolved where applicable
mask The image convolution mask
dest The destination image for the convolution operation
Applies a one-dimensional convolution operation to the given image in the x-direction. When the image contains colour or vector field data, a particular colour channel/vector field element can be specified by the channel argument, which should otherwise be passed as GAN_ALL_CHANNELS. There is no checking for overflow of integer values.

Macro call to gan_image_convolve1Dx_q().

Returns:
Non-NULL on successfully returning the destination image dest, NULL on failure.
See also:
gan_image_convolve1Dx_q, gan_gauss_mask_new().

Gan_Image* gan_image_convolve1Dx_s Gan_Image   image,
Gan_ImageChannelType    channel,
Gan_Mask1D   mask
 

Macro: Convolves an image in the x-direction.

Parameters:
image The input image
channel Colour channel to be convolved where applicable
mask The image convolution mask
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Applies a one-dimensional convolution operation to the given image in the x-direction. When the image contains colour or vector field data, a particular colour channel/vector field element can be specified by the channel argument, which should otherwise be passed as GAN_ALL_CHANNELS.

Macro call to gan_image_convolve1Dx_q().

See also:
gan_image_convolve1Dx_q, gan_gauss_mask_new().

Gan_Image* gan_image_convolve1Dy_q Gan_Image   image,
Gan_ImageChannelType    channel,
Gan_Mask1D   mask,
Gan_Image   dest
 

Convolves an image in the y-direction.

Parameters:
image The input image
channel Colour channel to be convolved where applicable
mask The image convolution mask
dest The destination image for the convolution operation
Applies a one-dimensional convolution operation to the given image in the y-direction. When the image contains colour or vector field data, a particular colour channel/vector field element can be specified by the channel argument, which should otherwise be passed as GAN_ALL_CHANNELS. There is no checking for overflow of integer values.

Macro call to gan_image_convolve1Dy_q().

Returns:
Non-NULL on successfully returning the destination image dest, NULL on failure.
See also:
gan_image_convolve1Dy_q, gan_gauss_mask_new().

Gan_Image* gan_image_convolve1Dy_s Gan_Image   image,
Gan_ImageChannelType    channel,
Gan_Mask1D   mask
 

Macro: Convolves an image in the y-direction.

Parameters:
image The input image
channel Colour channel to be convolved where applicable
mask The image convolution mask
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Applies a one-dimensional convolution operation to the given image in the y-direction. When the image contains colour or vector field data, a particular colour channel/vector field element can be specified by the channel argument, which should otherwise be passed as GAN_ALL_CHANNELS.

Macro call to gan_image_convolve1Dy_q().

See also:
gan_image_convolve1Dy_q, gan_gauss_mask_new().

Gan_Mask1D* gan_mask1D_alloc Gan_Mask1DFormat    format,
Gan_Type    type,
unsigned int    size
 

Macro: Allocate and return a new 1D convolution mask.

Allocates and returns a new 1D convolution mask with the given format, type and size.

Implemented as a macro call to gan_mask1D_form_gen().

See also:
gan_mask1D_form() and gan_mask1D_alloc_data().

Gan_Mask1D* gan_mask1D_alloc_data Gan_Mask1DFormat    format,
Gan_Type    type,
void *    data,
unsigned int    size
 

Macro: Allocate and return a new 1D convolution mask.

Allocates and returns a new 1D convolution mask with the given format, type, data array and size.

Implemented as a macro call to gan_mask1D_form_gen().

See also:
gan_mask1D_form() and gan_mask1D_alloc().

Gan_Bool gan_mask1D_copy_q Gan_Mask1D   source,
Gan_Mask1D   dest
 

Copies a convolution mask.

Parameters:
source The input convolution mask
dest The output convolution mask
Copy 1D convolution mask from source mask to dest mask
Returns:
GAN_TRUE on success, GAN_FALSE on failure.

Gan_Mask1D* gan_mask1D_form Gan_Mask1D   mask,
Gan_Mask1DFormat    format,
Gan_Type    type,
unsigned int    size
 

Macro: Build a new 1D convolution mask.

Builds and returns a new 1D convolution mask with the given format, type and size, writing it into the provided structure mask.

Implemented as a macro call to gan_mask1D_form_gen().

See also:
gan_mask1D_alloc() and gan_mask1D_alloc_data().

Gan_Mask1D* gan_mask1D_form_data Gan_Mask1D   mask,
Gan_Mask1DFormat    format,
Gan_Type    type,
void *    data,
unsigned int    size
 

Macro: Build a new 1D convolution mask.

Builds and returns a new 1D convolution mask with the given format, type, data and size, writing it into the provided structure mask.

Implemented as a macro call to gan_mask1D_form_gen().

See also:
gan_mask1D_alloc() and gan_mask1D_alloc_data().

Gan_Mask1D* gan_mask1D_form_gen Gan_Mask1D   mask,
Gan_Mask1DFormat    format,
Gan_Type    type,
void *    data,
unsigned int    size
 

Form a new 1D convolution mask.

Don't call this function directly. Use the macro gan_mask1D_form_data() instead.

Gan_Bool gan_mask1D_free Gan_Mask1D   mask
 

Frees a convolution mask.

Parameters:
mask The convolution mask to be freed
Free memory associated with 1D convolution mask.
Returns:
GAN_TRUE on success, GAN_FALSE on failure.


Generated on Mon Oct 13 16:15:01 2003 by doxygen1.3-rc1