
vpolygon(1)                  Khoros                   vpolygon(1)

PROGRAM
     vpolygon - Creates a vector image resulting from a polygonal
     approximation of an edge image.

SYNTAX
     vpolygon

     -i             Edge Image

     -o1            Vector Image Resulting from the Polygonal
                    Approximation

     [-o2]          Output Image Containing the Polygonal Edge
                    Approximation

     [-l]           Minimal Length For Segment Extraction

     [-p]           Percentage of Segment Rejected

     [-t]           Threshold Value for the Approximation

     [-V]           Gives the version for vpolygon

     [-U]           Gives the usage for vpolygon

     [-P]           Prompts for command line options

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

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

DESCRIPTION
     vpolygon will create a vector image resulting of a polygonal
     approximation.  The optional 2D image output can be used to
     display this approximation with a displaying function
     (putimage). The size of the optional image is equal to the
     size of the input image dimension, and it's a byte image
     with line points set to 255.

     There are some optional inputs to control the approximation
     process :

     [-l] : Minimal length for straight line extraction. When the
     estimated straigth line have a length less important than
     this threshold, it is skipped over.

     [-p] : Percentage of line length rejected to calculate
     parameters of the straight line.

     [-t] : Threshold Value for the approximation error. When the
     calculated error is greater than this value, the line is
     broken.

     The program creates a vector image to store the result of
     the linear approximation. This image is a four bands image
     containing two points for each estimated line : (x1,y1) and
     (x2,y2) or one band per coordinate (first band for x1 coor-
     dinates, second band for y1 coordinates, third band for x2
     coordinates and fourth band for y2 coordinates).

REQUIRED ARGUMENTS
     -i     type: infile
            desc: Edge Image

     -o1    type: outfile
            desc: Vector Image Resulting from the Polygonal
            Approximation

OPTIONAL ARGUMENTS
     -o2    type: outfile
            desc: Output Image Containing the Polygonal Edge
            Approximation

     -l     type: integer
            desc: Minimal Length For Segment Extraction
            default: 10
            bounds: value > 0

     -p     type: float
            desc: Percentage of Segment Rejected
            default: 0.1
            bounds: 0.000000 < [-p] < 1.000000

     -t     type: float
            desc: Threshold Value for the Approximation
            default: 0.6
            bounds: value > 0.0

EXAMPLES
     vpolygon -i edge.xv -o1 vector.xv -o2 segment_image.xv

     will create a vector image "vector.xv" resulting of the
     linear approximation on input image "edge.xv". We can
     display this result by using "segment_image.xv".

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvpolygon(3)

RESTRICTIONS
     vpolygon will operate on BYTE data storage type and with
     edge points set to 255.

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

Khoros                    Release: 1.0                          1

