An alternate smoothing and stripping algorithm for thinning digital binary patterns