FitCircleToRidges3D_Direct


Performs a series of 1D ridge detections in 3D and finds a circle that best matches the detected points.

Applications:Precise detection of a circular object or hole, whose rough location is known beforehand.

Syntax

C++
C#
Python
 
def FitCircleToRidges3D_Direct(
	inSurface: Surface,
	inFittingField: CircleFittingField,
	/,
	*,
	inFittingFieldAlignment: CoordinateSystem2D | None = None,
	inScanCount: int = 10,
	inSamplingStep: float | None = None,
	inScanWidth: int = 5,
	inSurfaceInterpolation: InterpolationMethod = InterpolationMethod.Bilinear,
	inRidgeScanParams: RidgeScanParams3D = RidgeScanParams3D(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, 2.0, RidgeOperator.Minimum, 5.0, SurfaceRidgePolarity.Low),
	inRidgeSelection: Selection = Selection.Best,
	inLocalBlindness: LocalBlindness | None = None,
	inMaxProfileGapWidth: int | None = 1,
	inMaxIncompleteness: float = 0.1,
	inFittingMethod: CircleFittingMethod = CircleFittingMethod.AlgebraicTaubin,
	inOutlierSuppression: MEstimator | None = None,
	outAlignedFittingField: CircleFittingField | None = None
)
-> (
	outCircle: Circle3D | None,
	outRidges: list[SurfaceRidge1D | None],
	outDeviationProfile: Profile | None,
	outInliers: list[Point3D],
	outHeightProfiles: list[Profile],
	outResponseProfiles: list[Profile],
	diagScanSegments: list[Segment2D],
	diagSamplingAreas: list[Rectangle2D]
)

Parameters

Name Type Range Default Description
Input value inSurface Surface Surface to fit the circle to
Input value inFittingField CircleFittingField Circle fitting field
Input value inFittingFieldAlignment CoordinateSystem2D | None None Adjusts the fitting field to the position of the inspected object
Input value inScanCount int 3 - 10 The number of points that will be searched to estimate the position of the circle
Input value inSamplingStep float | None 0.0 - None Desired distance between consecutive sampling points on the scan segments; if Nil, the bigger of surface X and Y scales is chosen
Input value inScanWidth int 1 - 5 The width of each scan field (in pixels)
Input value inSurfaceInterpolation InterpolationMethod InterpolationMethod.Bilinear Interpolation method used for extraction of surface points
Input value inRidgeScanParams RidgeScanParams3D RidgeScanParams3D(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, 2.0, RidgeOperator.Minimum, 5.0, SurfaceRidgePolarity.Low) Parameters controlling the ridge extraction process
Input value inRidgeSelection Selection Selection.Best Selection mode of ridges
Input value inLocalBlindness LocalBlindness | None None Defines conditions in which weaker ridges can be detected in the vicinity of stronger ridges
Input value inMaxProfileGapWidth int | None 0 - 1 Maximal number of consecutive not existing profile points
Input value inMaxIncompleteness float 0.0 - 0.999 0.1 Maximal fraction of ridge points not found
Input value inFittingMethod CircleFittingMethod CircleFittingMethod.AlgebraicTaubin Method used to fit a circle
Input value inOutlierSuppression MEstimator | None None Selects a method for ignoring incorrectly detected points
Output value outCircle Circle3D | None Fitted circle or nothing if the fitting fails
Output value outRidges list[SurfaceRidge1D | None] Found ridges
Output value outDeviationProfile Profile | None Profile of distances between the actual circle points and the corresponding reference circle points
Output value outAlignedFittingField CircleFittingField | None None Fitting field used; in the image coordinate system
Output value outInliers list[Point3D] Points matching the fitting Circle
Output value outHeightProfiles list[Profile] Extracted surface height profiles
Output value outResponseProfiles list[Profile] Profiles of the ridge operator response
Diagnostic input diagScanSegments list[Segment2D] Segments along which the scans were run
Diagnostic input diagSamplingAreas list[Rectangle2D] Areas from which the input image is sampled

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.