Local Lines line detector code

Sharlee Climer
sharlee@climer.us

This code can be freely used for academic and personal use.  Contact
me for licensing for any other purposes. 

---

This code is written in C++ and we have run it on Linux.  The package
is a gzipped tar file.  Use "gunzip lines.tar.gz" followed by "tar
-xvf lines.tar".  The executable can be compiled by typing "make". 

To execute a test file, type "findline" and follow the online
prompts.  The file name is "binim" and has 50 rows and 40 columns.

This code is designed to be used on a binary edge image with edge
thinning already applied.  It reads the edge image and yields endpoints
using the TOP left-hand corner as the origin.  

---

Following are a number of parameters in linedet.h that should be adjusted
to suit your image and edge detector characteristics as well as your
desired results.    

MINPOINTS specifies the minimum score to rank a set of edge points as
a line.  Increasing the value will reduce the number of lines found,
requiring that the lines are more well-defined.

PRINTLENGTH is the minimum length line you would like to have output.

DELTOL specifies the value for deleting pixels that are believed to be
part of an identified line.  Increasing this value will help preserve
pixels in overlapping lines. 

SLOPETOL is the tolerance for catenating two line segments.
Decreasing this value will cause slightly curved or crooked lines to
be separated into a set of shorter, straighter lines.

---

The mask values are in the file "mask".  These values are relatively
arbritrary and could be improved.  I started a project using
artificial neural nets to learn optimal values for the mask, but I
haven't had time to complete it.  If you are interested in pursuing
this project, please let me know and I will send you my code.

---

Please send any questions, comments, bugs, etc. to Sharlee Climer at
sharlee@climer.us.  I'd really like to hear how this code worked out
for you!
