lvmspan(3)

LIBRARY ROUTINE
lvmspan - Dilate a binary image region by a single pixel.

LIBRARY CALL
#include "vinclude.h"
#define BLACK 0
#define GREY  128
#define LIGHT 192
#define WHITE 255
int
lvmspan(image,source,medium,wave,iter)
struct xvimage *image;
int source, medium, wave, iter;

INPUT

    img1 -- xvimage structure
    source -- integer (source color)
    medium -- integer (medium color)
    wave -- integer (wave color)
    iter -- number of iterations

OUTPUT

    img1 -- holds the result of the dilation

MODIFICATIONS

DESCRIPTION
Although classified with the morphological routines, this does not fit the classical theory of mathematical morphology. It is a simplified version of a conditional dilation.

    vmspan takes three integer arguments which are pixel values or colors: a source, a medium and a wave. Image regions in which a pixel with a value equal to source lie next to a pixel with value medium, the medium pixel is replaced with the value wave. This process is repeated iter times. This is like a conditional morphological dilation with a fixed, 3x3 square kernel. Spaning twice is like dilating with a 5x5 kernel; spaning three times is equivalent to dilating with a 7x7 kernel, etc.

    This routine is patterned after the span routine in the C4PL image processing lanuage developed by the Evironmental Research Institute of Michigan (ERIM), Ann Arbor, Michigan.

SEE ALSO
vmspan(1), intro(3), vipl(3), verror(3), vutils(3) vmspan(1)

RESTRICTIONS
vmspan will only operate on:
    BYTE
data storage types.

AUTHOR
Greg Donohoe Pascal Adam

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.