8. The method of claim 1 , wherein determining the regular grid hypothesis closest to a true regular grid comprises: determining a transformation that corrects a perspective distortion of a regular grid hypothesis; applying the determined transformation to the surface coded pattern; and applying one or more criteria to the transformed surface coded pattern to generate a measure of validity of the regular grid hypothesis.
1. A method of determining a regular grid pattern from a surface coded pattern that comprises the regular grid pattern interleaved with a further data carrying pattern wherein the surface coded pattern is subject to perspective distortion, the method comprising: extracting a set of straight line hypotheses from the surface coded pattern by identifying a plurality of surface pattern points that are co-linear to one another, identifying sets of the plurality of surface pattern points that are co-linear to one another, deleting sets of the plurality of surface pattern points that have a cross-ratio value outside a predetermined range, and fitting a line hypothesis to sets of the plurality of surface pattern points that have a cross-ratio value within the predetermined range; clustering the straight line hypotheses by orientation; for each cluster, extracting a set of line pencil hypotheses; generating a set of regular grid hypotheses from pairs of the line pencil hypotheses; and determining, by a processor, a regular grid hypothesis closest to a true regular grid.