lvpolygon(3)

LIBRARY ROUTINE
lvpolygon - Creates a vector image resulting from a polygonal approximation.

LIBRARY CALL
#include "vinclude.h"
int lvpolygon(image,vector,seuil,coef,longmin)
struct xvimage *image,
               **vector;
int            longmin;
double         coef,
               seuil;

INPUT

    image -- xvimage structure of edge image (input image)

    seuil -- double of threshold value for approximation error.

    coef -- double of percentage line length that is rejected.

    longmin -- integer of minimal length for skipping over too small straigth lines.

OUTPUT

    image -- xvimage structure of 2D image to display the result of linear approximation.

    vector -- xvimage structure of output vector image.

MODIFICATIONS

This code needs a lot of work. I modified the drawligne routine as suggested by Bruno Orsier. I sabered the code and removed a lot of unused variables. The driver was also modified to remove un needed code. John Rasure Thu Nov 14 16:31:22 MST 1991

DESCRIPTION
lvpolygon will create a vector image resulting of a linear approximation. image is a pointer to a xvimage structure that contains the edge image to process. Note that image is used for both the input xvimage structure and the resulting output xvimage structure for displaying. This is done to save space, but you must be careful not to overwrite important data.

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

RESTRICTIONS
lvpolygon will operate on VFF_TYP_4_BYTE data storage types and with edge points set to 255.

AUTHOR
Jean-Pierre COCQUEREZ, Marc VIALA, Pascal ADAM

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