On least-squares digital contour smoothing