MMACH (lmmach) functions


LIBRARY ROUTINE

lvdiskstr - Creates disk-like structuring elements for use in morphological operations

LIBRARY CALL

int lvgdisk (
      mat_str  *ker,
      int      d,
      int      type,
      int      offset,
      int      dim,
      char     *met)

INPUT

none

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) on failure

DESCRIPTION

vgdisk generates special structuring elements which are disks in one of three well-known metrics:

_ Euclidean : D(p,q) = sqrt( (px-qx)^2 + (py-qy)^2 )

_ City-Block: D(p,q) = |px-qx| + |py-qy|

_ Chessboard: D(p,q) = max( |px-qx| , |py-qy| )

Disks in each one of the above metrics are respectively circles, diamonds and squares. For a concise review of this subject, see Gonzales & Wintz, "Digital Image Processing", chapter 2.

The disks generated may be planar or nonplanar, 2-dimensional or 3-dimensional. The default is euclidean planar 2-D.

The offset makes sense only for the nonplanar case, in which case the value specified is added to the element. If no offset or 0 is specified, the element values will be adjusted so as to have zero in the borders. For example, a 5x5 chessboard nonplanar 2-D element will look like this: 0 0 0 0 0 0 1 1 1 0 0 1 2 1 0 0 1 1 1 0 0 0 0 0 0

The disk-like structuring elements are very useful in many morphological operations such as distance transforms, granulometry, skeleton algorithms etc.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

The disks generated are "planar", i.e., they define only a 2-D or 3-D domain, assuming no values.

MODIFICATION

none

FILES

$MMACH/objects/library/lmmach/src/lvdiskstr.c

SEE ALSO

lmmach(3)

COPYRIGHT

Copyright (C) 1993-1997 Junior Barrera, Roberto Lotufo. All rights reserved.