next up previous contents
Next: Representing 3D rotations Up: Feature detection Previous: Displaying a line map   Contents

The Gandalf line detector

      #include <gandalf/vision/orthog_line.h>
The Gandalf line detector takes an edge map as input, and automatically segments each edge string into line segments. Here is an example code fragment using the Harris corner detector.
      Gan_EdgeFeatureMap EdgeMap; /* declare edge map */
      Gan_LineFeatureMap LineMap; /* declare line map */

      /* ... build edge map ... */

      /* initialise line map */
      gan_line_feature_map_form ( &LineMap,
                                  1000 ); /* initial limit on number of lines */

      /* compute lines from the edge map */
      gan_orthog_line_q ( &EdgeMap,
                          10, /* minimum length of line segment */
                          2, /* cut size, i.e. amount to shrink line segment */
                          1.0, /* RMS error threshold on fitted line */
                          NULL, /* or pointer to local feature map */
                          GAN_TRUE, /* whether to copy points */
                          &LineMap );

      /* free line map */
      gan_line_feature_map_free ( &LineMap );



2006-03-17