FitCircleToStripe_Direct


Performs a series 1D stripe detections and finds a circle that best matches the detected points.

Applications:Precise detection of ring-shaped objects, whose rough location is known beforehand.

Syntax

C++
C#
Python
 
def FitCircleToStripe_Direct(
	inImage: Image,
	inFittingField: CircleFittingField,
	/,
	*,
	inFittingFieldAlignment: CoordinateSystem2D | None = None,
	inScanCount: int = 10,
	inScanWidth: int = 5,
	inSamplingParams: SamplingParams = SamplingParams(InterpolationMethod.Bilinear, 1.0, None),
	inStripeScanParams: StripeScanParams = StripeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, None, Polarity.Dark, 0.0, None),
	inStripeSelection: Selection = Selection.Best,
	inLocalBlindness: LocalBlindness | None = None,
	inMaxIncompleteness: float = 0.1,
	inFittingMethod: CircleFittingMethod = CircleFittingMethod.AlgebraicTaubin,
	inOutlierSuppression: MEstimator | None = None,
	outAlignedFittingField: CircleFittingField | None = None
)
-> (
	outCircle: Circle2D | None,
	outInnerCircle: Circle2D | None,
	outOuterCircle: Circle2D | None,
	outStripes: list[Stripe1D | None],
	outStripePoints: list[Point2D],
	outDeviationProfile: Profile | None,
	outBrightnessProfiles: list[Profile],
	outResponseProfiles: list[Profile],
	diagScanSegments: list[Segment2D],
	diagSamplingAreas: list[Rectangle2D]
)

Parameters

Name Type Range Default Description
Input value inImage Image Image 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 inScanWidth int 1 - 5 The width of each scan field (in pixels)
Input value inSamplingParams SamplingParams SamplingParams(InterpolationMethod.Bilinear, 1.0, None) Parameters controlling the sampling process
Input value inStripeScanParams StripeScanParams StripeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, None, Polarity.Dark, 0.0, None) Parameters controlling the stripe extraction process
Input value inStripeSelection Selection Selection.Best Selection mode of stripe
Input value inLocalBlindness LocalBlindness | None None Defines conditions in which weaker edges can be detected in the vicinity of stronger edges
Input value inMaxIncompleteness float 0.0 - 0.999 0.1 Maximal fraction of stripe 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 Circle2D | None Fitted circle in the middle of found stripe
Output value outInnerCircle Circle2D | None Fitted inner circle
Output value outOuterCircle Circle2D | None Fitted outer circle
Output value outStripes list[Stripe1D | None] Found stripes
Output value outStripePoints list[Point2D] Extracted points of middle circle of an image stripe
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 outBrightnessProfiles list[Profile] Extracted image profiles
Output value outResponseProfiles list[Profile] Profiles of the edge (derivative) 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.