Multilocal methods for ridge and valley delineation in image analysis