Vector code probability and metrication error in the representation of straight lines of finite length

Abstract An unbiased estimate for the length of straight lines represented by an arbitrary number of discrete vector elements is derived from statistical evaluation of line segments randomly positioned on a grid. The computational method is independent of the connectivity of the grid, whether it is rectangular or hexagonal. Estimates for the variance of the length are also given. The length estimate may be used in combination with linearity conditions to evaluate the length of an arbitrary curved contour by polygonal approximation. The length of the original curve can then be estimated with greater accuracy than when existing methods are used. An alternative method for length estimation is also presented, based on least-squares approximation of infinitely long straight lines. For 8-connectivity, the alternative method gives a greater accuracy than similar existing methods. Figures are presented for both alternatives in comparison with existing methods.