Melter and Rosenfeld posed the following question: If a continuous line is digitized and a least square line fits (a straight line that minimizes the sum of squares of distances over all points from the line) is applied to the set of points that is the image of a given line, can the original line be recovered? In this paper we prove that distinct digital line segments on a given interval correspond to distinct least square line fits. We then give a new simple representation (x1, n, b0, b1) of a digital line segment, where x1 and n are the x-coordinate of the left endpoint and the number of digital points, respectively, while b0 and b1 are the coefficients of the least square line fit Y equals b0 + b1X for the given digital line segment. An O(nK) time (linear in practice) algorithm for obtaining a digital line segment from its least square line fit is described, where K is the number of digits of accuracy in the slope.
Robert A. Melter,
"Statistical characterization of digital lines", Proc. SPIE 1832, Vision Geometry, (9 April 1993); doi: 10.1117/12.142164; https://doi.org/10.1117/12.142164