I am looking for a method that finds ridges (local maxima) in an image and returns them as an array of ridges (where the ridge is a vector of points defining the ridge). That is, a method that behaves exactly the same as findContours (which finds contours and returns them as an array of vectors defining the contours), except for ridges.
Is this, and if not, how could I achieve this effect? (I use the Emgu CV shell for OpenCV)
I have this image (it's a little weak, sorry), obtained using distance conversion from a binary image of a road system:

I can easily use findContours on the source binary to get road outlines as point vectors. However, I am interested in the road center line . The center line of the road is represented by the local maxima of the image above.
Obviously, using findContours in this image again gives me the outline of the road. I planned to use non-maximum suppression to remove everything except the center line and use findContours, but I don't know how to do non-maxim suppression, so my question is here
source share