FitArcToRidges_Direct
Performs a series of 1D ridge detections and finds an arc that best matches the detected points.
Applications:Precise detection of a thin arciform line, whose rough location is known beforehand.
Syntax
C++
C#
Python
def FitArcToRidges_Direct( inImage: Image, inFittingField: ArcFittingField, /, *, inFittingFieldAlignment: CoordinateSystem2D | None = None, inScanCount: int = 10, inScanWidth: int = 5, inSamplingParams: SamplingParams = SamplingParams(InterpolationMethod.Bilinear, 1.0, None), inRidgeScanParams: RidgeScanParams = RidgeScanParams(ProfileInterpolationMethod.Quadratic4, 1.0, 5, 2, RidgeOperator.Minimum, 5.0, Polarity.Dark), inRidgeSelection: Selection = Selection.Best, inLocalBlindness: LocalBlindness | None = None, inMaxIncompleteness: float = 0.1, inFittingMethod: CircleFittingMethod = CircleFittingMethod.AlgebraicTaubin, inOutlierSuppression: MEstimator | None = None, outAlignedFittingField: ArcFittingField | None = None ) -> ( outArc: Arc2D | None, outRidges: list[Ridge1D | None], outDeviationProfile: Profile | None, outInliers: list[Point2D], outBrightnessProfiles: list[Profile], outResponseProfiles: list[Profile], diagScanSegments: list[Segment2D], diagSamplingAreas: list[Rectangle2D] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image to fit arc to | ||
![]() |
inFittingField | ArcFittingField | Arc fitting field | ||
![]() |
inFittingFieldAlignment | CoordinateSystem2D | None | None | Adjusts the fitting field to the position of the inspected object | |
![]() |
inScanCount | int | 3 - ![]() |
10 | The number of points that will be searched to estimate the position of the arc |
![]() |
inScanWidth | int | 1 - ![]() |
5 | The width of each scan field (in pixels) |
![]() |
inSamplingParams | SamplingParams | SamplingParams(InterpolationMethod.Bilinear, 1.0, None) | Parameters controlling the sampling process | |
![]() |
inRidgeScanParams | RidgeScanParams | RidgeScanParams(ProfileInterpolationMethod.Quadratic4, 1.0, 5, 2, RidgeOperator.Minimum, 5.0, Polarity.Dark) | Parameters controlling the ridge extraction process | |
![]() |
inRidgeSelection | Selection | Selection.Best | Selection mode of ridges | |
![]() |
inLocalBlindness | LocalBlindness | None | None | Defines conditions in which weaker ridges can be detected in the vicinity of stronger ridges | |
![]() |
inMaxIncompleteness | float | 0.0 - 0.999 | 0.1 | Maximal fraction of ridge points not found |
![]() |
inFittingMethod | CircleFittingMethod | CircleFittingMethod.AlgebraicTaubin | Method used to fit an arc | |
![]() |
inOutlierSuppression | MEstimator | None | None | Selects a method for ignoring incorrectly detected points | |
![]() |
outArc | Arc2D | None | Fitted arc or nothing if the fitting fails | ||
![]() |
outRidges | list[Ridge1D | None] | Found ridges | ||
![]() |
outDeviationProfile | Profile | None | Profile of distances between the actual arc points and the corresponding reference arc points | ||
![]() |
outAlignedFittingField | ArcFittingField | None | None | Fitting field used; in the image coordinate system | |
![]() |
outInliers | list[Point2D] | Points matching the fitting Arc | ||
![]() |
outBrightnessProfiles | list[Profile] | Extracted image profiles | ||
![]() |
outResponseProfiles | list[Profile] | Profiles of the ridge operator response | ||
![]() |
diagScanSegments | list[Segment2D] | Segments along which the scans were run | ||
![]() |
diagSamplingAreas | list[Rectangle2D] | Areas from which the input image is sampled |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




