Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_erode(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_sel_create(3)

xil_erode(3)

NAME

xil_erode, xil_dilate − erode or dilate an image

SYNOPSIS

#include <xil/xil.h>

void xil_erode (XilImage src,

XilImage dst,
XilSel sel);

void xil_dilate (XilImage src,

XilImage dst,
XilSel sel);

DESCRIPTION

xil_erode() erodes an image.

xil_dilate() dilates an image.

src is the source image handle.  dst is the destination image handle.  sel is a structuring element that describes which of a source pixel’s neighbors will be used as input to the 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 key pixel aligns with the output pixel and constrains which input pixels are used to generate the output. The erode and dialate 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

Erode an image using a 3 x 3 "cross-shaped" structuring element with the key pixel in the center (1,1). 

XilSystemState State;
XilImage src, dst;
XilSel sel;
unsigned int sel_data[] = { 0, 1, 0,
      1, 1, 1,
      0, 1, 0 };
sel=xil_sel_create (State, 3, 3, 1, 1, sel_data);
xil_erode(src, dst, sel);

Dilate an image using a 3 x 3 "X-shaped" structuring element with the key pixel in the upper left-hand corner (0,0). 

XilSystemState State;
XilImage src, dst;
XilSel sel;
unsigned int sel_data[] = { 1, 0, 1,
      0, 1, 0,
      1, 0, 1 };
sel=xil_sel_create (State, 3, 3, 0, 0, sel_data);
xil_dilate(src, dst, sel);

NOTES

Source and destination images must be the same type and have the same number of bands.  This operation cannot be performed in place. 

SEE ALSO

xil_sel_create(3)
 
 

SunOS   —  Last change: 15 June 1993

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