# Edges and Ridges

In medical image analysis, local image features are detected from given images in order to constrain degrees of freedom (DoF) of the locations of anatomical structures. Though one needs to constrain three DoF for uniquely identifying the location of each structure, image features that can constrain only one or two DoFs are also useful for accurately segmenting organ regions in given images. Local appearances that are invariant with respect to translation cannot constrain three DoF of their locations. For example, a local appearance around a point on a smooth surface is invariant with respect to translation along tangential directions and can constrain the spatial location only along the direction perpendicular to the surface. In this subsection, edge and ridge features are described. Edge features constrain one DoF in given 3D images and ridge features constrain two DoFs. In this subsection, the functions with subscripts denote the derivatives of the functions with respect to the variables indicated by the subscripts. For example, *I _{x}* and

*I*denote

_{xy}*I*and

_{x}= dI/dx*I*

_{xy}= d

^{2}*I/dxdy,*respectively.

Edges are defined as the locations where the voxel values change rapidly in one direction and are detected because they are often observed at the boundaries of organs. The rapid changes of voxel values can be detected by finding the locations where the second derivatives of images are equal to zero as the magnitudes of the first derivatives are maximal. Roughly, there are two approaches for finding such locations. In one approach, the Laplacian of a given image is computed, and its zero-crossings, at which the following equation holds, are detected as edges:

In the other approach, the local maxima of the gradient magnitudes in directions of the gradients are detected as edges. Let a unit vector parallel to the gradient be denoted by ? (x, *y, z),* where

Then, at the local maxima, the second derivatives along the gradient direction, ?, should be zero:

where V(||V*I(x, y,* z)||) denotes the gradient of the gradient magnitude. Computing its inner product with ? results in the directional second derivative of the gradient magnitude. The Eq. (2.155) can be rewritten as follows:

The edge locations detected by (2.153) and by (2.156) are identical only when the constant-level surface of *I(x, y, z)* is flat. One difficulty of the edge detection is that the values of the spatial derivatives generated by these two equations are susceptible to image noise because spatial derivative operations enhance high- frequency components of signals as described in Sect. 2.2.1.5, and many false edges are detected on noisy images. Therefore, given images are smoothed to suppress noise, usually using a Gaussian filter, g(x|t). Once again, letting *L(x ) = I(x) ** g(x|t) and replacing I* and I** in (2.153) and in (2.156) with *L** and L**, results in increased resistance to noise in the edge detectors. One drawback of this Gaussian smoothing is that the locations of the detected edges become inaccurate at the locations where the constant-level surfaces have high curvatures. Nonlinear image smoothing or edge-preserving algorithms [58, 76, 77] are often employed to remedy this.

Ridges (or “bright tubes”) are defined as locations where the voxel values are constant in one direction, u, and are maximum along planes perpendicular to u. Ridges are detected on medical images because they are often associated with curvilinear structures such as vessels and bronchi. A Hessian matrix can be used to detect ridges:

Letting the eigenvalues of *H(x)* be denoted by A_{1} > A_{2} *>* A_{3} and letting the corresponding eigenvectors be denoted by *e _{1}, e_{2},* and

*e*

*(it should be noted that these eigenvectors are orthogonal to each other because*

_{3}*H(x)*is symmetric), the Taylor expansion of

*L(x)*is

The last term on the right side can be rewritten as

where *a, b,* and *c* denote the small disturbances along e_{1}, e_{2}, and e_{3}, respectively, such that *a = e*T1, *b = eT* 1, and *c = ? _{ъ} 1.* In other words, the eigenvalues A

_{1}, A

_{2}, and A

_{3}are the second derivatives in the directions of e

_{1}, e

_{2}, and e

_{3}, respectively. At ridge points, the largest eigenvalue is equal to zero, A

_{1}= 0, and the corresponding eigenvector,

*e*

_{1}, is parallel to the tangential direction along which the voxel values are constant. The other two eigenvalues, A2 and A3, are negative and are locally minimum along

*e*2 and

*e*3 because, at ridge points, the voxel values are maximum along the plane spanned by

*e*

*and e*

_{2}_{3}. Hence, the conditions ridges should satisfy are

The last two conditions reveal the locations of ridges. The scale, *t,* of the Gaussian applied to smooth the input images should be determined based on the radii of the local curvilinear structures. Assuming that a radius of a curvilinear structure is equal to r, the scale should be equal to *t ' r*^{2}*,* and some multiscale methods can determine an appropriate scale for each curvilinear structure in a given image [73, 78].