Finding local maxima in a pseudo-Euclidean distance transform