Back to Aurora Vision Library website
You are here: Start » Function Reference » Computer Vision » Line Finder » FindSingleLine
FindSingleLine
| Header: | AVL.h |
|---|---|
| Namespace: | avl |
| Module: | MetrologyPro |
Finds a single straight line within a rectangular scan field.
Applications: Detection of a single straight line in the presence of multiple competing lines or noisy backgrounds.
Syntax
C++
C#
Python
void avl::FindSingleLine ( const avl::Image& inImage, const avl::SegmentScanField& inScanField, atl::Optional<const avl::CoordinateSystem2D&> inScanFieldAlignment, int inScanWidth, int inScanStep, int inScanLimit, const avl::EdgeScanParams& inEdgeScanParams, float inPointBlindness, float inMaxSlant, float inMinLength, float inMaxGap, int inMinPointCount, avl::LineSelection::Type inLineSelection, float inLineBlindness, avl::EdgeMeasure::Type inEdgeMeasure, avl::LineFinderMethod::Type inLineFinderMethod, float inMaxPointDeviation, float inMaxTurnAngle, atl::Optional<avl::LineMEstimator::Type> inOutlierSuppression, bool inRefineEndpoints, atl::Conditional<avl::Segment2D>& outLine, atl::Optional<float&> outLineStrength, atl::Array<avl::Profile>& outResponseProfiles, atl::Optional<avl::SegmentScanField&> outAlignedScanField, atl::Array<avl::Point2D>& outSelectedPoints, atl::Array<avl::Segment2D>& diagScanLines, atl::Array<avl::Point2D>& diagCandidatePoints )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inScanField | const SegmentScanField& | Region where the scans are performed | ||
![]() |
inScanFieldAlignment | Optional<const CoordinateSystem2D&> | NIL | ||
![]() |
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 | const EdgeScanParams& | EdgeScanParams ( ProfileInterpolation: Quadratic4 SmoothingStdDev: 0.6f MinMagnitude: 5.0f EdgeTransition: Any ) | Parameters of 1D edge detection along a single scan line | |
![]() |
inPointBlindness | float | 0.0 - 1.0 | 0.3f | 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.0f | Maximum angle deviation of the resulting line from 90 degrees to the scan axis |
![]() |
inMinLength | float | 0.0 - ![]() |
10.0f | Minimum length of the resulting line |
![]() |
inMaxGap | float | 0.0 - ![]() |
50.0f | 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::Type | Fittest | Selection criteria for edge lines | |
![]() |
inLineBlindness | float | 0.0 - 1.0 | 0.4f | Defines a threshold for rejecting entire lines that are weaker than a certain portion of the strongest line |
![]() |
inEdgeMeasure | EdgeMeasure::Type | LogMagnitude | Several options for measuring a single edge point | |
![]() |
inLineFinderMethod | LineFinderMethod::Type | Hough | Several alternative algorithms for finding lines within the detected cloud of edge points | |
![]() |
inMaxPointDeviation | float | 0.0 - ![]() |
2.5f | Maximum pixel distance between a detected line and its supporting edge points |
![]() |
inMaxTurnAngle | float | 0.0 - 90.0 | 10.0f | Maximum turn angle at any interior vertex of the line path |
![]() |
inOutlierSuppression | Optional<LineMEstimator::Type> | TheilSen | A method for removing outlying points | |
![]() |
inRefineEndpoints | bool | True | Turns on a method for refining the length of the detected line | |
![]() |
outLine | Conditional<Segment2D>& | |||
![]() |
outLineStrength | Optional<float&> | |||
![]() |
outResponseProfiles | Array<Profile>& | Edge response profiles, one per scan line | ||
![]() |
outAlignedScanField | Optional<SegmentScanField&> | |||
![]() |
outSelectedPoints | Array<Point2D>& | List of points associated with the returned line | ||
![]() |
diagScanLines | Array<Segment2D>& | |||
![]() |
diagCandidatePoints | Array<Point2D>& |
Optional Outputs
The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outLineStrength, outAlignedScanField.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




