 <p>The Hough transform gives you equations of lines (ie infinitely long lines not segments).</p> <p>Once you have these equations you could test how <a href="http://paulbourke.net/geometry/pointline/" rel="nofollow">far each point is from a line</a> and decide whether it is on the line or not (given some maximum distance).</p> <p>When you add new points you can do the same test to see if they are sufficiently close to any of the existing lines.</p>