Back to Adaptive Vision Library website
You are here: Start » Function Reference » Path Metrics » PathToLineDistance
PathToLineDistance
Computes the smallest distance between a path and a line.
Syntax
C++
C#
void avl::PathToLineDistance ( const avl::Path& inPath, const avl::Line2D& inLine, atl::real inResolution, atl::real& outDistance, atl::Optional<avl::Segment2D&> outConnectingSegment = atl::NIL )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPath | const Path& | Input path | ||
![]() |
inLine | const Line2D& | Input line | ||
![]() |
inResolution | real | 0.0 - ![]() |
1.0f | Number of real-world units per one pixel |
![]() |
outDistance | real& | Minimal distance between input path and input line | ||
![]() |
outConnectingSegment | Optional<Segment2D&> | NIL | Segment connecting input path and input line having minimal length |
Errors
| Error type | Description |
|---|---|
| DomainError | Empty path on input in PathToLineDistance. |
| DomainError | Indefinite line on input in PathToLineDistance. |



