FindMultipleLines
Finds multiple straight lines within a rectangular scan field, ordered from highest-scoring to lowest.
Applications:Detection of multiple lines within a single scan field.
Syntax
C++
C#
Python
def FindMultipleLines( inImage: Image, inScanField: SegmentScanField, /, *, inScanFieldAlignment: CoordinateSystem2D | None = None, inScanWidth: int = 5, inScanStep: int = 10, inScanLimit: int = 50, inEdgeScanParams: EdgeScanParams = EdgeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, EdgeTransition.Any), inPointBlindness: float = 0.3, inMaxSlant: float = 30.0, inMinLength: float = 10.0, inMaxGap: float = 50.0, inMinPointCount: int = 3, inLineSelection: LineSelection = LineSelection.Fittest, inLineBlindness: float = 0.4, inEdgeMeasure: EdgeMeasure = EdgeMeasure.LogMagnitude, inLineFinderMethod: LineFinderMethod = LineFinderMethod.Hough, inMaxPointDeviation: float = 2.5, inMaxTurnAngle: float = 10.0, inOutlierSuppression: LineMEstimator | None = LineMEstimator.TheilSen, inRefineEndpoints: bool = True, inMaxCount: int | None = 100, outAlignedScanField: SegmentScanField | None = None ) -> ( outLines: list[Segment2D], outLineStrengths: list[float], outResponseProfiles: list[Profile], outSelectedPoints: list[ list[Point2D] ], diagScanLines: list[Segment2D], diagCandidatePoints: list[Point2D] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inScanField | SegmentScanField | Region where the scans are performed | ||
![]() |
inScanFieldAlignment | CoordinateSystem2D | None | None | ||
![]() |
inScanWidth | int | 1 - ![]() |
5 | How many pixels are sampled perpendicularly at each scan line's positions |
![]() |
inScanStep | int | 1 - ![]() |
10 | Pixel distance between the centers of consecutive scan lines |
![]() |
inScanLimit | int | 1 - ![]() |
50 | Maximum number of scan lines |
![]() |
inEdgeScanParams | EdgeScanParams | EdgeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, EdgeTransition.Any) | Parameters of 1D edge detection along a single scan line | |
![]() |
inPointBlindness | float | 0.0 - 1.0 | 0.3 | Defines a threshold for rejecting edge points that are weaker than a certain portion of the strongest edge point |
![]() |
inMaxSlant | float | 0.0 - 45.0 | 30.0 | Maximum angle deviation of the resulting line from 90 degrees to the scan axis |
![]() |
inMinLength | float | 0.0 - ![]() |
10.0 | Minimum length of the resulting line |
![]() |
inMaxGap | float | 0.0 - ![]() |
50.0 | Maximum gap within a resulting line |
![]() |
inMinPointCount | int | 2 - ![]() |
3 | Minimum number of edge points that a resulting line must contain (otherwise it is rejected) |
![]() |
inLineSelection | LineSelection | LineSelection.Fittest | Selection criteria for edge lines | |
![]() |
inLineBlindness | float | 0.0 - 1.0 | 0.4 | Defines a threshold for rejecting entire lines that are weaker than a certain portion of the strongest line |
![]() |
inEdgeMeasure | EdgeMeasure | EdgeMeasure.LogMagnitude | Several options for measuring a single edge point | |
![]() |
inLineFinderMethod | LineFinderMethod | LineFinderMethod.Hough | Several alternative algorithms for finding lines within the detected cloud of edge points | |
![]() |
inMaxPointDeviation | float | 0.0 - ![]() |
2.5 | Maximum pixel distance between a detected line and its supporting edge points |
![]() |
inMaxTurnAngle | float | 0.0 - 90.0 | 10.0 | Maximum turn angle at any interior vertex of the line path |
![]() |
inOutlierSuppression | LineMEstimator | None | LineMEstimator.TheilSen | A method for removing outlying points | |
![]() |
inRefineEndpoints | bool | True | Turns on a method for refining the length of the detected line | |
![]() |
inMaxCount | int | None | 1 - ![]() |
100 | Maximum number of lines to return |
![]() |
outLines | list[Segment2D] | |||
![]() |
outLineStrengths | list[float] | |||
![]() |
outResponseProfiles | list[Profile] | Edge response profiles, one per scan line | ||
![]() |
outAlignedScanField | SegmentScanField | None | None | ||
![]() |
outSelectedPoints | list[ list[Point2D] ] | Lists of points associated with each returned line | ||
![]() |
diagScanLines | list[Segment2D] | |||
![]() |
diagCandidatePoints | list[Point2D] |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




