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
Input value inRegion const Region& Input region
Input value inMethod const RegionSegmentFittingMethod::Type
Output value 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.