home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 3 / RISC_DISC_3.iso / resources / etexts / gems / gemsv / ch6_5 / revfit.h < prev   
C/C++ Source or Header  |  1995-04-04  |  1KB  |  26 lines

  1. /* revfit.h: definitions for reversible straight line reconstruction routines */
  2. #include "../ch7-7/GG4D/GGems.h"
  3. #define HRZ             1
  4. #define VRT             2
  5. /* Watch out for the precision of `int' type. Make sure that the max */
  6. /* coordinate value * SUBPIXRES can be stored in an `int'.           */
  7. #define SUBPIXRES       32
  8.  
  9. /************************************************************************/
  10. /* typedef for Edgelist: the list of edges where lines are to be fitted */
  11. /************************************************************************/
  12. typedef struct {
  13.  int x,y;               /* in bitmap resolution        +ve         */
  14.  int dir;               /*           ---  <-- H edge    ^          */
  15. } PixelEdge;            /* (x,y)-->   * | <-- V edge    | --> +ve  */
  16.  
  17. typedef struct {
  18.  int Nedges;            /* number of edges in the list             */
  19.  int current;           /* current edge being visited              */
  20.  PixelEdge *list;       /* the list of edges found from the pixmap */
  21. } Edgelist;
  22.  
  23. int fitlines(Edgelist el, boolean Pretest, boolean TryAllEndPts,
  24.              IntPoint2 *lines, int MaxLines);
  25. void linestojagged(int Nlines, IntPoint2 *lines);
  26.