Back to Adaptive Vision Library website
You are here: Start » Function Reference » Hough Transform » DetectPaths
DetectPaths
Finds paths in an image.
Syntax
C++
C#
void avl::DetectPaths ( const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, const avl::Path& inPath, atl::real inMinScore, atl::real inEdgeThreshold, atl::Array<avl::Path>& outPaths, atl::Array<atl::real>& outScores, avl::Image& diagGradientMagnitudeImage, avl::Image& diagScoreImage )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inRoi | Optional<const Region&> | NIL | Input region of interest | |
![]() |
inPath | const Path& | Input path | ||
![]() |
inMinScore | real | 0.0 - ![]() |
20.0f | Minimum matching score |
![]() |
inEdgeThreshold | real | 10.0f | Minimum accepted edge magnitude | |
![]() |
outPaths | Array<Path>& | Output paths | ||
![]() |
outScores | Array<real>& | Output scores | ||
![]() |
diagGradientMagnitudeImage | Image& | Visualized gradients magnitude of an input image | ||
![]() |
diagScoreImage | Image& | Calculated score for each pixel of an input image |
Description
The operation detects paths in the inImage using the Generalized Hough Transform approach. The output array is ordered from best matching to worst matching results.
Examples
![]() A sample path (scaled for convenience). |
![]() |
![]() |
DetectPaths performed on the sample images with inMinScore = 0.7.
Remarks
DetectPaths is not scale- or rotation-invariant (slightly scaled or rotated paths are, however, detected properly).
Long inPaths cause long computation time.
Errors
| Error type | Description |
|---|---|
| DomainError | Degenerate path in DetectPaths. |







