DetectEdges_AsPaths
Extracts subpixel-precise paths that represent continuous edges.
Applications:Consistent detection of contours of variable or unpredictable shape, e.g. screw thread outline or a custom piece of textile.
Syntax
C++
C#
Python
def DetectEdges_AsPaths( inImage: Image, /, *, inRoi: Region | None = None, inEdgeFilter: EdgeFilter = EdgeFilter.Canny, inStdDevX: float = 2.0, inStdDevY: float | None = None, inEdgeThreshold: float = 15.0, inEdgeHysteresis: float = 5.0, inMaxJoiningDistance: float | None = None, inMaxJoiningAngle: float = 30.0, inJoiningDistanceBalance: float = 0.0, inJoiningEndingLength: float | None = None, inMinEdgeLength: float = 0.0, diagGradientMagnitudeImage: Image | None = None, diagEdgeRegion: Region | None = None ) -> outEdges: list[Path]
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Image from which edges will be extracted | ||
![]() |
inRoi | Region | None | None | Region of the image from which edges will be extracted | |
![]() |
inEdgeFilter | EdgeFilter | EdgeFilter.Canny | Type of edge filter used for computing gradients | |
![]() |
inStdDevX | float | 0.0 - ![]() |
2.0 | Amount of horizontal smoothing used by the edge filter |
![]() |
inStdDevY | float | None | 0.0 - ![]() |
None | Amount of vertical smoothing used by the edge filter (Auto = inStdDevX) |
![]() |
inEdgeThreshold | float | 0.0 - ![]() |
15.0 | Sufficient edge strength; edges of that strength will always be detected |
![]() |
inEdgeHysteresis | float | 0.0 - ![]() |
5.0 | Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges |
![]() |
inMaxJoiningDistance | float | None | 0.0 - ![]() |
None | Maximal distance between edges that can be joined |
![]() |
inMaxJoiningAngle | float | 0.0 - 180.0 | 30.0 | Maximal allowed angle between edges being joined |
![]() |
inJoiningDistanceBalance | float | 0.0 - 1.0 | 0.0 | Determines how important distance between edges is according to their angle difference |
![]() |
inJoiningEndingLength | float | None | 1.0 - ![]() |
None | Determines the length of the edge end used for edge angle computing |
![]() |
inMinEdgeLength | float | 0.0 - ![]() |
0.0 | Minimal length of an edge |
![]() |
outEdges | list[Path] | Paths representing found edges | ||
![]() |
diagGradientMagnitudeImage | Image | None | None | Visualization of the gradient magnitude | |
![]() |
diagEdgeRegion | Region | None | None | Region representing found edges |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




