Back to Aurora Vision Studio website
You are here: Start » Filter Reference » Computer Vision » Line Finder » ExtendSegment
ExtendSegment
| Module: | MetrologyPro |
|---|
Extends a segment at both endpoints by walking 1 pixel at a time along the segment direction, stopping when the in-place Sobel gradient magnitude at the next position drops below threshold or the image boundary is reached.
Applications
Refining a segment detected by a line finding tool to its full length within the image.
| Name | Type | Range | Description | |
|---|---|---|---|---|
![]() |
inImage | Image | Input image (gradient is computed in-place) | |
![]() |
inSegment | Segment2D | Segment to extend | |
![]() |
inEdgeThreshold | Real | 0.0 - ![]() |
Minimum Sobel gradient magnitude required to continue extending |
![]() |
inInterpolation | InterpolationMethod | NearestNeighbour snaps the walking position to the integer grid; Bilinear samples all Sobel neighbours at real-valued coordinates | |
![]() |
outSegment | Segment2D | Extended segment | |
Description
The operation extends inSegment at both endpoints by walking one pixel at a time along the segment direction. At each step the Sobel gradient magnitude is sampled at the new position. Extension stops when the magnitude falls below inEdgeThreshold or the image boundary is reached.
Hints
- Apply after a segment detector (e.g. FindSingleEdge) to recover the full length of an edge when the initial detection stops short of the true endpoint.
- Use inInterpolation = Bilinear for sub-pixel sampling accuracy at oblique orientations. NearestNeighbour snaps the walking position to the integer grid and is faster but less accurate.
- Set inEdgeThreshold to the minimum acceptable gradient magnitude at the extended endpoints. Lower values allow extension further into faint edge regions; higher values stop earlier.
Complexity Level
This filter is available on Advanced Complexity Level.
See Also
- 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.
- FindSingleEdge

Advanced

