| Algorithm 1. Extraction of lines for one segment SS |
| 1: , c = 0, |
| % denotes a set of line set in segment S, c denotes count of loop, denotes a point of line |
| 2: for j = 0 in MAX_B do % for each bin |
| 3: if then % if there is a point mapping in |
| 4: if || >= 2 then % if the number of points in bigger than two |
| 5: () = fitline() % line fit to get of L |
| 6: if <= ∧ ( > || ∨ <= ) ∧ fitError() < then |
| % if match condition of thresholds |
| 7: % add to |
| 8: else |
| 9: () fitline () % line fit to get of L |
| 10: |
| 11: % clear |
| 12: cc + 1 % next line segment |
| 13: jj − 1 % next distance |
| 14: else % if the number of points in smaller than two |
| 15: if
c = 0 ∨ () ∨
then % if the first point or the distance of point and line match thresholds |
| 16: % add to |