Ridge detectionIn , ridge detection is the attempt, via software, to locate ridges in an , defined as curves whose points are local maxima of the function, akin to geographical ridges. For a function of N variables, its ridges are a set of curves whose points are local maxima in N − 1 dimensions. In this respect, the notion of ridge points extends the concept of a local maximum. Correspondingly, the notion of valleys for a function can be defined by replacing the condition of a local maximum with the condition of a local minimum.