Back to Aurora Vision Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Fitting » FitSegmentToRegion
FitSegmentToRegion
| Header: | AVL.h |
|---|---|
| Namespace: | avl |
| Module: | FoundationBasic |
Approximates a region with a segment using selected outliers suppression method.
Applications: Finding a locally optimal segment. Good enough when the number of outliers is small.
Syntax
C++
C#
void avl::FitSegmentToRegion ( const avl::Region& inRegion, const avl::RegionSegmentFittingMethod::Type inMethod, avl::Segment2D& outSegment )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
![]() |
inRegion | const Region& | Input region | |
![]() |
inMethod | const RegionSegmentFittingMethod::Type | ||
![]() |
outSegment | Segment2D& |
Errors
List of possible exceptions:
| Error type | Description |
|---|---|
| DomainError | Degenerate convex hull on input in FitSegmentToRegion. |
| DomainError | Empty region on input in FitSegmentToRegion. |


