Computing the shape of a point set in digital images