
vmerode(1)                   Khoros                    vmerode(1)

PROGRAM
     vmerode - Erode a binary image X, by a structuring element
     B.

SYNTAX
     vmerode

     -i             input image

     -k             input kernel

     -o             output image

     [-V]           Gives the version for vmerode

     [-U]           Gives the usage for vmerode

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vmerode.ans or
                    file1

     [-a [file1]]   Uses vmerode.ans or file1 as the answer file

DESCRIPTION
     vmerode computes the Erosion of an binary image by a struc-
     turing element.

     From a general scientific perspective, the word MORPHOLOGY
     refers to the study of form and structure.

     The morphological approach is generally based upon the
     analysis of a two valued image in terms of some predeter-
     mined geometric shape known as a structuring element.

     Essentially, the manner in which the structuring element
     fits into the image is studied.

     The morphological operations can be employed for many pur-
     poses, including edge detection, segmentation, and enhance-
     ment of images.

     BASIC OPERATIONS:

     Most morphological operations can be defined in terms of two
     basic operations, the EROSION and the DILATION.

     Suppose the object X and the structuring element (or morpho-
     logical kernel) B are represented as sets in two dimensional
     Euclidean space.

     Let Bx denote the translation of B so that its origin is
     located at x.

          The erosion of X by B is defined as the set of all
          points x such that Bx is included in X, that is:

          ERODE(X,B) = { x : Bx included in X }

     Eroding an image by a structuring element B has the effect
     of "shrinking" the image in a manner determined by B.

     It is obvious that erosion of an object is accompanied by
     enlargement or dilation of the background.

     PROPERTIES:

     The erosion has the following properties.

     1. Translation Invariant
               that is, a translation of the object causes the
               same shift in the result. (the size of the image
               is a limitation of this property)

     2. It is not the inverse of dilation

     3. Distributivity
               ERODE does not distribute over the intersection
               from both the left and the right.
               ERODE satisfies a sort of left antidistributivity
               over union:
               Erode(A,UNION(B,C)) = INTERSECTION(Erode(A,B) ,
               Erode(A,C))
               ERODE satisfies a right distributivity over inter-
               section
               Erode(A,UNION(B,C)) = INTERSECTION(Erode(A,B) ,
               Erode(A,C))

     4. Iteration
               Erode(Erode(A,B),C)) = Erode(A,Dilate(B,C))

     5. Increasing
               if the set X is included in the set X', then the
               erosion of X by B is also included in the erosion
               of X' by B, whatever B.
               Now if the structuring element B is included in
               B', whatever the set X is, the erosion of X by B
               is included in the erosion of X by B'.

     6. Duality
               Erosion and dilation are dual with respect to the
               complement operation.
               In other words, eroding a set by a kernel is
               equivalent to dilating the background (or comple-
               ment of the set).

     Set of morphological functions:

     vmerode is part of a set of morphological functions avail-
     able.

     vmcustom:   Customizes a structuring element

     vm180:      180 degree rotation of a structuring element.

     vmdilate:   dilation.

     vmopen:     opening.

     vmclose:    closing.

     vmoredge:   edge extractor.

     vmskeleton: skeleton extractor.

     ADVICE:

     1.   For this binary erosion function, all grey levels dif-
          ferent from 0 are considered "white" or equivalent to
          255.
          Therefore, the image is not required to be binary, how-
          ever, it is strongly advisable to use vthresh on grey
          level images before using any morphological function.

     2.   The structuring element must be a morphological kernel
          (created by vmcustom).
          This kernel is nothing but an image form file with two
          variables ispare1 and ispare2 that define the origin of
          the structuring element (refer to vmcustom and lvmcus-
          tom).

     These algorithms were obtained from :

          "Morphological Methods in Image and Signal Processing"

          Charles R. Giardina

          Edward R. Dougherty

          Prentice Hall, Englewood Cliffs, New Jersey 07632

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input image

     -k     type: infile
            desc: input kernel

     -o     type: outfile
            desc: output image

OPTIONAL ARGUMENTS
     none

EXAMPLES
     vmerode -i image1 -k kernel -o image2

     Computes the erosion of an image X (input -i ) by a struc-
     turing element B (input -k) and stores the result in the
     output image ( -o)

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvmerode(3)
     vmcustom(1), lvmcustom(3)

RESTRICTIONS
     vmerode accepts only BYTE images, and it is strongly advis-
     able to use vthresh to binarize the image before eroding it.
     The structuring element is an image form file, nevertheless,
     it should always be created by vmcustom.

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

Khoros                    Release: 1.0                          1

