RidgeFilter
✖
RidgeFilter
Details and Options

- RidgeFilter is commonly used to find ridges in images by computing estimates of the main principal curvature at each sample point using Gaussian derivatives.
- The main principal curvature orthogonal to a ridge is given by the main negative eigenvalue of the Hessian matrix.
- The data can be any of the following:
-
list 2D or 3D numerical array image arbitrary Image or Image3D object - In RidgeFilter[data,σ], σ is the scale of the Gaussian derivatives in the Hessian matrix. By default,
is used.
- RidgeFilter[image,…] returns a real image of the same dimensions as image.
- RidgeFilter takes the following options used in the computation of the Hessian matrix:
-
InterpolationOrder Automatic interpolation 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.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (4)Survey of the scope of standard use cases
Data (3)
Ridge filtering of a numeric matrix:

https://wolfram.com/xid/0fq7p8g33pd7e-dq7on4

RidgeFilter of a grayscale image:

https://wolfram.com/xid/0fq7p8g33pd7e-op3qwr


https://wolfram.com/xid/0fq7p8g33pd7e-8ol86

RidgeFilter of a 3D image:

https://wolfram.com/xid/0fq7p8g33pd7e-3n7xkb

Options (2)Common values & functionality for each option
InterpolationOrder (1)
Filtering an array using different InterpolationOrder values:

https://wolfram.com/xid/0fq7p8g33pd7e-3dj0x9

Applications (5)Sample problems that can be solved with this function
Ridges in a two-dimensional array:

https://wolfram.com/xid/0fq7p8g33pd7e-ih984t

Enhance the strokes of handwritten characters:

https://wolfram.com/xid/0fq7p8g33pd7e-t5hdpt

Detect lines of a given width in a noisy image with uneven brightness:

https://wolfram.com/xid/0fq7p8g33pd7e-34ed8c

Find the red ridges in a microscopic photo of a Yucca leaf:

https://wolfram.com/xid/0fq7p8g33pd7e-w28fuv


https://wolfram.com/xid/0fq7p8g33pd7e-esqj84

Enhance trabecular bone structure:

https://wolfram.com/xid/0fq7p8g33pd7e-mbtgdp

Change the transfer function and background to further highlight the structure:

https://wolfram.com/xid/0fq7p8g33pd7e-np3lvk

Properties & Relations (2)Properties of the function, and connections to other functions
Ridge detection at scale σ=2 using DerivativeFilter:

https://wolfram.com/xid/0fq7p8g33pd7e-bixkja

Compare to the result of RidgeFilter:

https://wolfram.com/xid/0fq7p8g33pd7e-h80sh7

Ridge filtering of an image gives a real-valued image:

https://wolfram.com/xid/0fq7p8g33pd7e-hznxi1


https://wolfram.com/xid/0fq7p8g33pd7e-cfnht8

Wolfram Research (2010), RidgeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/RidgeFilter.html (updated 2014).
Text
Wolfram Research (2010), RidgeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/RidgeFilter.html (updated 2014).
Wolfram Research (2010), RidgeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/RidgeFilter.html (updated 2014).
CMS
Wolfram Language. 2010. "RidgeFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/RidgeFilter.html.
Wolfram Language. 2010. "RidgeFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/RidgeFilter.html.
APA
Wolfram Language. (2010). RidgeFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RidgeFilter.html
Wolfram Language. (2010). RidgeFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RidgeFilter.html
BibTeX
@misc{reference.wolfram_2025_ridgefilter, author="Wolfram Research", title="{RidgeFilter}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/RidgeFilter.html}", note=[Accessed: 27-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_ridgefilter, organization={Wolfram Research}, title={RidgeFilter}, year={2014}, url={https://reference.wolfram.com/language/ref/RidgeFilter.html}, note=[Accessed: 27-March-2025
]}