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



