a) The canny strings are approximated by straight sections (as in the Edge Tool) according to the "fit thres" parameter.
b) Co-linear line segments are sought in the image using a perpendicularity threshold specified by "co thresh" (in pixels).
c) Groups of co-linear lines are joined together to form longer sections if the endpoints are closer than "join thres" (in pixels).
d) Resulting sets of co-linear lines are compared against a set of stored 2D projective invariants for horizontal and vertical line intersections from the known grid model to identify the lines comprising the grid surface. This process is controlled by the "grid thres" parameter (allowed deviation from the reprojected model in pixels).
e) Identified lines are ordered and labelled starting from the top left hand corner of the grid. Intersections of mainly horizontal and mainly vertical lines are then taken to calculate the sub-pixel location of grid verticies in the image. These vertices are displayed. Faliure of the algorithm is signaled by an incorrect number of recovered horizontal and vertical grid lines.