ExtendSegmentFromPoint


Builds a segment from a single point on a line by walking in both directions along the locally estimated line direction, one pixel at a time.

Applications:Growing a detected edge point into a full segment when only a point (not a segment) is available from a prior detection step.

Syntax

C++
C#
Python
 
def ExtendSegmentFromPoint(
	inImage: Image,
	inPoint: Point2D,
	inEdgeThreshold: float,
	inRelativeThreshold: float,
	/,
	*,
	inRoi: Rectangle2D | None = None
)
-> (
	outSegment: Segment2D,
	outTrackedPoints: list[Point2D]
)

Parameters

Name Type Range Default Description
Input value inImage Image Input image (gradient is computed in-place)
Input value inPoint Point2D Starting point, expected to lie on or near the line
Input value inEdgeThreshold float 0.0 - Minimum Sobel gradient magnitude required to continue extending
Input value inRelativeThreshold float 0.0 - 1.0 Candidate magnitude must be at least this fraction of the running average magnitude
Input value inRoi Rectangle2D | None None Optional rectangle that limits pixel tracking to a specific area
Output value outSegment Segment2D Resulting segment spanning the detected line through inPoint
Output value outTrackedPoints list[Point2D] Pixel centres visited during tracking, in processing order