Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D Fitting » FitSegmentToPoints

FitSegmentToPoints
Header: | FIL.h |
---|---|
Namespace: | fil |
Approximates points with a segment using selected outliers suppression method.
Syntax
C++
C#
void fil::FitSegmentToPoints ( const ftl::Array<fil::Point2D>& inPoints, ftl::Optional<fil::MEstimator::Type> inOutlierSuppression, fil::Segment2D& outSegment )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPoints | const Array<Point2D>& | ||
![]() |
inOutlierSuppression | Optional<MEstimator::Type> | NIL | |
![]() |
outSegment | Segment2D& |
Description
The orientation of the resulting outSegment is always between 0 and 180 degrees.
Examples
![]() |
The resulting outSegment drawn with the input points, inOutlierSuppression = Auto.