Lably
Skip to content

Ridge detection

Function in image processing

  • 10 min read
  • 6 chapters

Related on Lably

Through Digital image processing, Image and Maximum and minimum

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. The union of ridge sets and valley sets, together with a related set of points called the connector set, form a connected set of curves that partition, intersect, or meet at the critical points of the function. This union of sets together is called the function's relative critical set.

Ridge sets, valley sets, and relative critical sets represent important geometric information intrinsic to a function. In a way, they provide a compact representation of important features of the function, but the extent to which they can be used to determine global features of the function is an open question. The primary motivation for the creation of ridge detection and valley detection procedures has come from image analysis and computer vision and is to capture the interior of elongated objects in the image domain. Ridge-related representations in terms of watersheds have been used for image segmentation. There have also been attempts to capture the shapes of objects by graph-based representations that reflect ridges, valleys and critical points in the image domain. Such representations may, however, be highly noise sensitive if computed at a single scale only. Because scale-space theoretic computations involve convolution with the Gaussian (smoothing) kernel, it has been hoped that use of multi-scale ridges, valleys and critical points in the context of scale space theory should allow for more a robust representation of objects (or shapes) in the image.

In this respect, ridges and valleys can be seen as a complement to natural interest points or local extremal points. With appropriately defined concepts, ridges and valleys in the intensity landscape (or in some other representation derived from the intensity landscape) may form a scale invariant skeleton for organizing spatial constraints on local appearance, with a number of qualitative similarities to the way the Blum's medial axis transform provides a shape skeleton for binary images. In typical applications, ridge and valley descriptors are often used for detecting roads in aerial images and for detecting blood vessels in retinal images or three-dimensional magnetic resonance images.

Differential geometric definition of ridges and valleys at a fixed scale in a two-dimensional image

Let f(x,y) denote a two-dimensional function, and let L be the scale-space representation of f(x,y) obtained by convolving f(x,y) with a Gaussian function

g(x,y,t)=12πte−(x2+y2)/2t.

Furthermore, let Lpp and Lqq denote the eigenvalues of the Hessian matrix

H=[LxxLxyLxyLyy]

of the scale-space representation L with a coordinate transformation (a rotation) applied to local directional derivative operators,

∂p=sin⁡β∂x−cos⁡β∂y,∂q=cos⁡β∂x+sin⁡β∂y

where p and q are coordinates of the rotated coordinate system.

It can be shown that the mixed derivative Lpq in the transformed coordinate system is zero if we choose

cos⁡β=12(1+Lxx−Lyy(Lxx−Lyy)2+4Lxy2),sin⁡β=sgn⁡(Lxy)12(1−Lxx−Lyy(Lxx−Lyy)2+4Lxy2).

Then, a formal differential geometric definition of the ridges of f(x,y) at a fixed scale t can be expressed as the set of points that satisfy

Lp=0,Lpp≤0,|Lpp|≥|Lqq|.

Correspondingly, the valleys of f(x,y) at scale t are the set of points

Lq=0,Lqq≥0,|Lqq|≥|Lpp|.

In terms of a (u,v) coordinate system with the v direction parallel to the image gradient

∂u=sin⁡α∂x−cos⁡α∂y,∂v=cos⁡α∂x+sin⁡α∂y

where

cos⁡α=LxLx2+Ly2,sin⁡α=LyLx2+Ly2

it can be shown that this ridge and valley definition can instead be equivalently written as

Luv=0,Luu2−Lvv2≥0

where

Lv2Luu=Lx2Lyy−2LxLyLxy+Ly2Lxx,
Lv2Luv=LxLy(Lxx−Lyy)−(Lx2−Ly2)Lxy,
Lv2Lvv=Lx2Lxx+2LxLyLxy+Ly2Lyy

and the sign of Luu determines the polarity; Luu<0 for ridges and Luu>0 for valleys.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Robotics