FitPlaneToSurface_M


Approximates points of the input surface with a plane using selected M-estimator for outlier suppression.

Applications:Finding a locally optimal plane. Good enough when the number of outliers is small.

Syntax

C++
C#
Python
 
def FitPlaneToSurface_M(
	inSurface: Surface,
	inIterationCount: int,
	/,
	*,
	inRoi: Region | None = None,
	inOutlierSuppression: MEstimator = MEstimator.Huber,
	inClippingFactor: float = 2.5,
	inInitialPlane: Plane3D | None = None
)
-> (
	outPlane: Plane3D,
	outInliers: list[Point3D],
	outDistances: list[float],
	outSignedDistanceSum: float,
	outDistanceSum: float,
	outSquaredDistances: list[float],
	outSquaredDistanceSum: float
)

Parameters

Name Type Range Default Description
Input value inSurface Surface Input surface
Input value inRoi Region | None None Region of interest
Input value inOutlierSuppression MEstimator MEstimator.Huber Selects a method for ignoring points being much different from the rest
Input value inClippingFactor float 0.675 - 6.0 2.5 Multitude of standard deviation within which points are considered inliers
Input value inIterationCount int 0 - Number of iterations of outlier suppressing algorithm
Input value inInitialPlane Plane3D | None None Initial approximation (if available)
Output value outPlane Plane3D Fitted plane
Output value outInliers list[Point3D] Points matching the computed plane
Output value outDistances list[float] Distances of the input points to a resulting plane
Output value outSignedDistanceSum float Sum of signed distances of the input points to a resulting plane
Output value outDistanceSum float Sum of distances of the input points to a resulting plane
Output value outSquaredDistances list[float] Squared distances of the input points to a resulting plane
Output value outSquaredDistanceSum float Sum of squared distances of the input points to a resulting plane