DetectSegments


Finds segments in an image using Hough Transform.

Syntax

C++
C#
Python
 
def DetectSegments(
	inImage: Image,
	/,
	*,
	inRoi: Region | None = None,
	inAngleResolution: float = 1.0,
	inMinAngleDelta: float = 20.0,
	inMinDistance: float = 20.0,
	inMinLength: float = 20.0,
	inMinScore: float = 20.0,
	inEdgeThreshold: float = 10.0,
	diagGradientMagnitudeImage: Image | None = None,
	diagScoreImage: Image | None = None
)
-> outSegments: list[Segment2D]

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Input region of interest
Input value inAngleResolution float 0.1 - 180.0 1.0 Resolution of segments' orientation
Input value inMinAngleDelta float 0.0 - 20.0 Minimum angle between two segments
Input value inMinDistance float 0.0 - 20.0 Minimum distance between two segments
Input value inMinLength float 0.0 - 20.0 Minimum segment length
Input value inMinScore float 0.0 - 20.0 Minimum matching score
Input value inEdgeThreshold float 10.0 Minimum accepted edge magnitude
Output value outSegments list[Segment2D] Output segments
Diagnostic input diagGradientMagnitudeImage Image | None None Visualized gradients magnitude of an input image
Diagnostic input diagScoreImage Image | None None Calculated score for each pixel of an input image