Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_sel_create_copy(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_erode(3)

xil_dilate(3)

xil_sel_get_height(3)

xil_sel_get_width(3)

xil_sel_get_key_x(3)

xil_sel_get_key_y(3)

xil_sel_get_state(3)

xil_sel_create(3)

NAME

xil_sel_create, xil_sel_create_copy, xil_sel_destroy − create and destroy structuring element objects

SYNOPSIS

#include <xil/xil.h>

XilSel xil_sel_create ( XilSystemState State,

unsigned int width,
unsigned int height,
unsigned int keyx,
unsigned int keyy,
unsigned int ∗data);

XilSel xil_sel_create_copy ( XilSel sel);

void xil_sel_destroy ( XilSel sel);

DESCRIPTION

These routines create and control access to the structuring element (SEL) objects used in the XIL erosion and dilation imaging operations.  Structuring elements are similar to convolution kernels, except that the member values are Boolean ( unsigned int ). 

width and height are the width of the structuring element in pixels. Common sizes for structuring elements are 3-by-3 and 5-by-5.  keyx and keyy are the coordinates of the key value in the kernel. The coordinates are specified with respect to the upper-left value in the structuring element (0,0).  data is a pointer to the Boolean values that will be written to the kernel. 

Key values specify the key pixel position - a position relative to the upper left corner of the SEL.  The key pixel aligns with the output pixel and constrains which input pixels are used to generate the output. 

xil_sel_create () creates a SEL of the specified size with the specified data.

xil_sel_create_copy () returns a copy of the specified SEL. The name of a copy is initially empty (NULL).

xil_sel_destroy () destroys the specified SEL.

ERRORS

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

EXAMPLES

Create a 3x3, cross-shaped structuring element, with the key value located at the center of the SEL:

XilSystemState State;
unsigned int width=3, height=3, key_x=1, key_y=1;
XilSel sel;
unsigned int data[] = {

0, 1, 0,
1, 1, 1,
0, 1, 0

};
sel = xil_sel_create (State, width, height, key_x, key_y, data);

NOTES

The key pixel must lie within the boundaries of the SEL. 

SEE ALSO

xil_erode(3), xil_dilate(3), xil_sel_get_height(3), xil_sel_get_width(3), xil_sel_get_key_x(3), xil_sel_get_key_y(3), xil_sel_get_state(3). 

SunOS 5.6  —  Last change: 16 June 1993

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