Back to FabImage Library website

You are here: Start » Function Reference » Surface » Surface Fitting » FitCircleToSurfaceHole

FitCircleToSurfaceHole


Header: FIL.h
Namespace: fil
Module: Vision3DStandard

Fits a circle to a hole in a surface plane.

Syntax

C++
C#
 
void fil::FitCircleToSurfaceHole
(
	const fil::Surface& inSurface,
	ftl::Optional<const fil::Region&> inRoi,
	fil::MEstimator::Type inPlaneOutlierSuppression,
	float inClippingFactor,
	int inIterationCount,
	ftl::Optional<const fil::Plane3D&> inInitialPlane,
	fil::CircleFittingMethod::Type inCircleFittingMethod,
	ftl::Optional<fil::MEstimator::Type> inCircleOutlierSuppression,
	ftl::Conditional<fil::Circle3D>& outCircle3D,
	fil::Plane3D& outPlane,
	ftl::Optional<ftl::Array<fil::Point3D>&> outInliers = ftl::NIL,
	ftl::Optional<ftl::Array<float>&> outDistances = ftl::NIL,
	ftl::Optional<float&> outSignedDistanceSum = ftl::NIL,
	ftl::Optional<float&> outDistanceSum = ftl::NIL,
	ftl::Optional<ftl::Array<float>&> outSquaredDistances = ftl::NIL,
	ftl::Optional<float&> outSquaredDistanceSum = ftl::NIL
)

Parameters

Name Type Range Default Description
Input value inSurface const Surface& Input surface
Input value inRoi Optional<const Region&> NIL Region of interest
Input value inPlaneOutlierSuppression MEstimator::Type Selects a method for ignoring points not lying on the fitted plane
Input value inClippingFactor float 0.675 - 6.0 2.5f Multitude of standard deviation within which points are considered inliers
Input value inIterationCount int 0 - 5 Number of iterations of outlier suppressing algorithm
Input value inInitialPlane Optional<const Plane3D&> NIL Initial approximation of a plane (if available)
Input value inCircleFittingMethod CircleFittingMethod::Type Select a method for fitting a circle to a set of points
Input value inCircleOutlierSuppression Optional<MEstimator::Type> NIL Selects a method for ignoring points not lying on the fitted circle
Output value outCircle3D Conditional<Circle3D>& Circle fitted to a surface hole
Output value outPlane Plane3D& Plane fitted to the surface points
Output value outInliers Optional<Array<Point3D>&> NIL Points matching the computed plane
Output value outDistances Optional<Array<float>&> NIL Distances of the input surface points to a resulting plane
Output value outSignedDistanceSum Optional<float&> NIL Sum of signed distances of the input surface points to a resulting plane
Output value outDistanceSum Optional<float&> NIL Sum of distances of the input surface points to a resulting plane
Output value outSquaredDistances Optional<Array<float>&> NIL Squared distances of the input surface points to a resulting plane
Output value outSquaredDistanceSum Optional<float&> NIL Sum of squared distances of the input surface points to a resulting plane

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::NIL to these parameters: outInliers, outDistances, outSignedDistanceSum, outDistanceSum, outSquaredDistances, outSquaredDistanceSum.

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Region of interest exceeds an input surface in FitCircleToSurfaceHole.