
vmediaxis(1)                 Khoros                  vmediaxis(1)

PROGRAM
     vmediaxis - Computes the medial axis transform

SYNTAX
     vmediaxis

     -i             input image

     -o             output image

     -w             if flag=1 the medial axis has the value 255,
                    otherwise (default) the value is the distance
                    from the border

     [-V]           Gives the version for vmediaxis

     [-U]           Gives the usage for vmediaxis

     [-P]           Prompts for command line options

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

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

DESCRIPTION
     vmediaxis Computes the medial axis transform on a byte
     binary image.

     The median axis of a region in a binary image is the set of
     pixels whose minimum distance from the edge is a local max-
     imum. It is a thinning algorithm that is comparable to the
     morphological skeletonization.  The median axis is generally
     not connected.

     An optional flag allows the user to obtain the medial axis
     pixel values set either to their distance from the border,
     or to 255. If the flag is set to one, it leads to a better
     visualization of the median axis but the information that
     permits the user to reconstruct the original binary image is
     lost.
     If the flag is not set to 1, it is possible to reconstruct
     the original image from the medial axis.

     Presentation of the medial axis transform algorithm :

     U(m,n) : original image. This image must be a two-valued
     byte image, 0 for the background, and any other value for
     the objects.

     Uk(i,j) : image after k iterations.

     U0(m,n)= U(m,n) ,  and for k= 1, 2, 3, ...
     Uk(m,n)= U(m,n)+min{U0(i,j);((i,j):dist(m,n;i,j)<= 1)},
     dist(m,n;i,j) is the mediaxis between (m,n) and (i,j).
     dist(i,j-1;i,j)=dist(i,j+1;i,j)=dist(i-
     1,j;i,j)=dist(i+1,j;i,j)=1.
     dist(i-1,j-1;i,j)=dist(i+1,j-1;i,j)=dist(i-
     1,j+1;i,j)=dist(i+1,j+1;i,j)=2.

     The transform is done when k equals the maximum thickness of
     the region, that is when Uk+1 equals Uk.

     The last part consists of using this image and keeping only
     the pixels that are a local maximum in the 4 neighborhood.
     The Medial Axis image is a form of skeletonization.

     Functions that can be useful when using vmediaxis:

     vthresh     generates a binary image.

     ADVICE:

          For this routine, the image must be a byte binary
          image, with the gray level value 0 for the background.
          So it is advisable to use vthresh on the image before
          using vmediaxis.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input image

     -o     type: outfile
            desc: output image

     -w     type: boolean
            desc: if flag=1 the medial axis has the value 255,
            otherwise (default) the value is the distance from
            the border

OPTIONAL ARGUMENTS
     none

EXAMPLES
     vmediaxis -i image1  [-w wflag]  -o image2
     Computes the medial axis transform.
     For this routine, the image must be a byte binary image,
     with the gray-level value 0 for the background. So it is
     advisable to use vthresh on the image before using
     vmediaxis.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvmediaxis(3)
     lvmediaxis(3), lvthresh(3), vthresh(1).

RESTRICTIONS
     vmediaxis works only with binary BYTE images.

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

Khoros                    Release: 1.0                          1

