FitSegmentToEdges3D
Performs a series of 1D edge detections and finds a segment that best matches the detected points.
Applications:Precise detection of a straight edge, whose rough location is known beforehand.
Syntax
C++
C#
Python
def FitSegmentToEdges3D( inSurface: Surface, inFittingMap: SegmentFittingMap, inEdgeScanParams: EdgeScanParams3D, inEdgeSelection: Selection, inMaxIncompleteness: float, /, *, inLocalBlindness: LocalBlindness | None = None, inMaxProfileGapWidth: int | None = 1, inOutlierSuppression: MEstimator | None = None ) -> ( outSegment: Segment3D | None, outEdges: list[SurfaceEdge1D | None], outDeviationProfile: Profile | None, outInliers: list[Point3D], outHeightProfiles: list[Profile], outResponseProfiles: list[Profile] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inSurface | Surface | Surface to fit segment to | ||
![]() |
inFittingMap | SegmentFittingMap | Input fitting map | ||
![]() |
inEdgeScanParams | EdgeScanParams3D | Parameters controlling the edge extraction process | ||
![]() |
inEdgeSelection | Selection | Selection mode of edges | ||
![]() |
inLocalBlindness | LocalBlindness | None | None | Defines conditions in which weaker edges can be detected in the vicinity of stronger edges | |
![]() |
inMaxProfileGapWidth | int | None | 0 - ![]() |
1 | Maximal number of consecutive not existing profile points |
![]() |
inMaxIncompleteness | float | 0.0 - 0.999 | Maximal fraction of edge points not found | |
![]() |
inOutlierSuppression | MEstimator | None | None | Selects a method for ignoring incorrectly detected points | |
![]() |
outSegment | Segment3D | None | Fitted segment or nothing if the fitting fails | ||
![]() |
outEdges | list[SurfaceEdge1D | None] | Found edges | ||
![]() |
outDeviationProfile | Profile | None | Profile of distances between the actual segment points and the corresponding reference segment points | ||
![]() |
outInliers | list[Point3D] | Points matching the fitting segment | ||
![]() |
outHeightProfiles | list[Profile] | Extracted surface height profiles | ||
![]() |
outResponseProfiles | list[Profile] | Profiles of the edge (derivative) operator response |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.



