FitPathToRidges3D_Direct
Performs a series of 1D ridge detections in 3D and creates a path from the detected points.
Applications:Tracing of a thin line, whose rough location and shape is known beforehand.
Syntax
C++
C#
Python
def FitPathToRidges3D_Direct( inSurface: Surface, inFittingField: PathFittingField, /, *, inFittingFieldAlignment: CoordinateSystem2D | None = None, inScanStep: float | None = 5.0, 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, inMaxPathInterpolationLength: int | None = 1, inMaxDeviationDelta: float | None = None, inMaxIncompleteness: float = 0.1, outAlignedFittingField: PathFittingField | None = None ) -> ( outPath: list[Point3D] | None, outRidges: list[SurfaceRidge1D | None], outDeviationProfile: Profile | None, outHeightProfiles: list[Profile], outResponseProfiles: list[Profile], outPathSegments: list[Segment3D] | None, diagScanSegments: list[Segment2D], diagSamplingAreas: list[Rectangle2D] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inSurface | Surface | Surface to fit the path to | ||
![]() |
inFittingField | PathFittingField | Path fitting field | ||
![]() |
inFittingFieldAlignment | CoordinateSystem2D | None | None | Adjusts the fitting field to the position of the inspected object | |
![]() |
inScanStep | float | None | 0.0 - ![]() |
5.0 | Optional implicit conversion of the input path to an equidistant one |
![]() |
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 |
![]() |
inScanWidth | int | 1 - ![]() |
5 | The width of each scan field (in pixels) |
![]() |
inSurfaceInterpolation | InterpolationMethod | InterpolationMethod.Bilinear | Interpolation method used for extraction of surface points | |
![]() |
inRidgeScanParams | RidgeScanParams3D | RidgeScanParams3D(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, 2.0, RidgeOperator.Minimum, 5.0, SurfaceRidgePolarity.Low) | 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 | |
![]() |
inMaxProfileGapWidth | int | None | 0 - ![]() |
1 | Maximal number of consecutive not existing profile points |
![]() |
inMaxPathInterpolationLength | int | None | 0 - ![]() |
1 | Maximal number of consecutive points not found |
![]() |
inMaxDeviationDelta | float | None | 0.0 - ![]() |
None | Maximal difference between deviations of consecutive path points |
![]() |
inMaxIncompleteness | float | 0.0 - 0.999 | 0.1 | Maximal fraction of ridge points not found |
![]() |
outPath | list[Point3D] | None | Fitted path or nothing if the fitting failed | ||
![]() |
outRidges | list[SurfaceRidge1D | None] | Found ridges | ||
![]() |
outDeviationProfile | Profile | None | Profile of distances between the actual path points and the corresponding reference path points | ||
![]() |
outAlignedFittingField | PathFittingField | None | None | Fitting field used; in the image coordinate system | |
![]() |
outHeightProfiles | list[Profile] | Extracted surface height profiles | ||
![]() |
outResponseProfiles | list[Profile] | Profiles of the ridge operator response | ||
![]() |
outPathSegments | list[Segment3D] | None | Segments of the fitted path or nothing if the fitting failed | ||
![]() |
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.




