Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » 2D Edge Detection » DetectRidges_AsPaths


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Extracts subpixel-precise paths that represent bright or dark thin lines.

Applications: Consistent detection of thin structures like scratches, cracks or lines.


void avl::DetectRidges_AsPaths
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	float inStdDevX,
	atl::Optional<float> inStdDevY,
	float inRidgeThreshold,
	float inRidgeHysteresis,
	avl::Polarity::Type inPolarity,
	atl::Array<avl::Path>& outRidges


Name Type Range Default Description
Input value inImage const Image& Input image
Input value inRoi Optional<const Region&> NIL Region of interest
Input value inStdDevX float 0.0 - 3.0f Smoothing standard deviation (horizontal)
Input value inStdDevY Optional<float> 0.0 - NIL Smoothing standard deviation (vertical, or Auto = horizontal)
Input value inRidgeThreshold float 0.0 - 5.0f Sufficient ridge strength; ridges of that strength will always be detected
Input value inRidgeHysteresis float 0.0 - 4.0f Value by which the ridge threshold is decreased for ridge points neighboring with sufficiently strong edges
Input value inPolarity Polarity::Type
Output value outRidges Array<Path>&


  • Connect an input image to the inImage input.
  • Set inPolarity in accordance to which type of thin lines you want to detect.
  • Start with inRidgeHysteresis = 0 and set inRidgeThreshold so that each important edge is at least partially detected. Then keep increasing inRidgeHysteresis until the edges are detected completely.
  • If the edges are rugged or there are too many false edges, then try increasing inStdDevX.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.