Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_convolve(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_kernel_create(3)

xil_kernel_destroy(3)

xil_convolve(3)

NAME

xil_convolve − convolve an image with a user-specified kernel

SYNOPSIS

#include <xil/xil.h>

void xil_convolve (XilImage src,

XilImage dst,
XilKernel kernel,
XilEdgeCondition edge_condition);

DESCRIPTION

This function convolves an image with the specified kernel.  src is the source image handle.  dst is the destination image handle.  kernel is a handle to an XilKernel structure that contains floating-point values. 

edge_condition is an enumeration type that controls what happens when the convolution encounters the edge of an image.  The three possible edge conditions are as follows:

XIL_EDGE_NO_WRITE The edge of the destination image is not touched. 

XIL_EDGE_ZERO_FILL The edge of the destination image is set to zero. 

XIL_EDGE_EXTEND The edge of the source image is duplicated to provide information necessary for the convolution operation. 

ROI Behavior

An ROI (region of interest) is used as a read mask for key pixels in the source image and as a write mask in the destination image. The convolve operation may access data outside a source ROI as long as the key pixel remains inside. 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

For this example, a 2 x 2 kernel is created, and the key pixel is set to the lower right-hand corner of the kernel.  Convolve the src image using the kernel, with the edge condition set to XIL_EDGE_ZERO_FILL. 

XilSystemState State;
XilImage src, dst;
XilKernel kernel;
float data[4];
data[0] = data[1] = 0.5;
data[2] = data[3] = 0.0;
kernel = xil_kernel_create(State, 2, 2, 1, 1, data);
xil_convolve(src, dst, kernel, XIL_EDGE_ZERO_FILL);

NOTES

Source and destination images must be the same data type and have the same number of bands. The images need not have the same width and height.  This operation cannot be performed in place. 

SEE ALSO

xil_kernel_create(3), xil_kernel_destroy(3). 
 

SunOS   —  Last change: 09 June 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026