computes a measure for the presence of a ridge for each pixel in image.


uses the specified ridge scale σ.


computes the ridge filter of two- or three-dimensional array.

Details and Options

  • RidgeFilter computes the main principal curvature at each pixel.
  • The main principal curvature orthogonal to a ridge is given by the main negative eigenvalue of the Hessian matrix.
  • In RidgeFilter[image,σ], σ is the scale of the ridges that is used to compute the derivatives in the Hessian. By default, σ=1 is used.
  • RidgeFilter works with arbitrary grayscale or multichannel 2D and 3D images, operating separately on each channel.
  • RidgeFilter[image,] returns a real image of the same dimensions as image.
  • RidgeFilter supports the following options to compute the Hessian matrix and the main principal curvature:
  • InterpolationOrderAutomaticinterpolation order
    Padding"Fixed"padding method
  • Possible settings for the InterpolationOrder option are 3, 4, 5, , 9.
  • The Padding option accepts the settings "Fixed", "Periodic", "Reversed", "Reflected", or a numeric value. A list of two settings can specify different paddings for each dimension.


open allclose all

Basic Examples  (2)

Find the mountain ridges in a terrain elevation raster:

Click for copyable input

Sketch the thin parts in an engine block:

Click for copyable input
Click for copyable input

Scope  (2)

Applications  (4)

See Also

DerivativeFilter  LaplacianFilter  LaplacianGaussianFilter  GaussianFilter  WatershedComponents  PeakDetect  MaxDetect

Introduced in 2010
| Updated in 2014