A thinning algorithm for discrete binary images