Back to Adaptive Vision Library website
You are here: Start » Function Reference » Path Metrics » PathToPointDistance
PathToPointDistance
Computes the smallest distance between a path and a point.
Syntax
C++
C#
void avl::PathToPointDistance ( const avl::Point2D& inPoint, const avl::Path& inPath, atl::real inResolution, atl::real& outDistance, atl::Optional<avl::Segment2D&> outConnectingSegment = atl::NIL )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPoint | const Point2D& | Input point | ||
![]() |
inPath | const Path& | Input path | ||
![]() |
inResolution | real | 0.0 - ![]() |
1.0f | |
![]() |
outDistance | real& | Minimal distance between input path and input point | ||
![]() |
outConnectingSegment | Optional<Segment2D&> | NIL | Segment connecting input path and input point having minimal length |
Description
The operation computes the minimal distance between the inPoint and inPath and, additionally, the outConnectingSegment segment corresponding to the result.
Examples
![]() |
The PathToPointDistance run on the sample data produces outDistance = 75.373.
Errors
| Error type | Description |
|---|---|
| DomainError | Empty path on input in PathToPointDistance. |




