O(N) Computation of Projections and Moments from the Labeled Skeleton

Abstract The projections of a digital figure F on the coordinate axes are computed starting from the 8-distance labeled skeleton of F . Since F can be interpreted as the union of the maximal squares centered on the local maxima of the skeleton, the projections of F coincide with the projections of the union of the maximal squares. An ordering of the maximal squares along the skeleton is achieved by tracing the skeleton. In the meanwhile, the contribution given by each maximal square to the projection of F is computed. Since a single tracing of the skeleton is enough to accomplish the process, the algorithm requires O ( N ) time, where N is the cardinality of the skeleton.