Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Fitting » FitSegmentToRegion
FitSegmentToRegion
Header: | FIL.h |
---|---|
Namespace: | fil |
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 fil::FitSegmentToRegion ( const fil::Region& inRegion, const fil::RegionSegmentFittingMethod::Type inMethod, fil::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. |