Back to Adaptive Vision Library website

You are here: Start » Function Reference » Geometry 2D Fitting » FitCircleToPoints

FitCircleToPoints


Approximates points with a circle using selected outliers suppression method.

Header:AVL.h

Syntax

C++
C#
 
void avl::FitCircleToPoints
(
	const atl::Array<avl::Point2D>& inPoints,
	avl::CircleFittingMethod::Type inFittingMethod,
	atl::Optional<avl::MEstimator::Type> inOutlierSuppression,
	atl::Conditional<avl::Circle2D>& outCircle
)

Parameters

Name Type Default Description
inPoints const Array<Point2D>&
inFittingMethod CircleFittingMethod::Type
inOutlierSuppression Optional<MEstimator::Type> NIL
outCircle Conditional<Circle2D>& Fitted circle or nothing if method failed to converge

Description

The operation computes a circle which approximates the input points best. Several methods are available, AlgebraicKasa being the fastest one. It is also the most inaccurate when the input points are sampled along small arc only.

Examples

The resulting outCircle drawn with the input points, inFittingMethod = AlgebraicKasa and inOutlierSuppression = Auto.

See Also

  • FitArcToPoints – Approximates points with an arc using the selected outliers suppression method.
  • FitLineToPoints – Approximates points with a line using the Least Squares method.