xil_kernel_create(3)
NAME
xil_kernel_create, xil_kernel_create_copy, xil_kernel_destroy − create and destroy kernels
SYNOPSIS
#include <xil/xil.h>
XilKernel xil_kernel_create (XilSystemState State,
unsigned int width,
unsigned int height,
unsigned int key_x,
unsigned int key_y,
float ∗data);
XilKernel xil_kernel_create_copy (XilKernel kernel);
void xil_kernel_destroy (XilKernel kernel);
DESCRIPTION
These routines create and destroy XilKernel objects. Kernels are used in image convolution, error diffusion, painting, and band combine operations. The key values specify the key pixel position - a position relative to the upper left corner of the kernel. The key pixel aligns with the output pixel and constrains which input pixels are used to generate the output. Kernel data is single-precision floating point.
xil_kernel_create() creates an XilKernel object of the specified size and with the specified data.
xil_kernel_create_copy() creates and returns a copy of the specified kernel. The name of a copy is initially empty (NULL).
xil_kernel_destroy() destroys the specified kernel.
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Create a 3x3 kernel for edge-sharpening, with the key value located at the center of the kernel:
XilSystemState State;
unsigned int width=3, height=3, key_x=1, key_y=1;
XilKernel kernel;
float data[]={ 0., -1., 0.,
-1., 5., -1.,
0., -1., 0. };
kernel = xil_kernel_create (State, width, height, key_x, key_y, data);
NOTES
The key pixel must lie within the boundaries of the kernel.
SEE ALSO
xil_convolve(3), xil_kernel_get_height(3), xil_kernel_get_width(3), xil_kernel_get_key_x(3), xil_kernel_get_key_y(3), xil_error_diffusion(3), xil_paint(3), xil_band_combine(3).
SunOS Solaris_2.4_x86_SDK — Last change: 04 August 1993