Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » Line Finder » FindMultipleLines

FindMultipleLines


Header: AVL.h
Namespace: avl
Module: MetrologyPro

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
 
void avl::FindMultipleLines
(
	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::Optional<int> inMaxCount,
	atl::Array<avl::Segment2D>& outLines,
	atl::Array<float>& outLineStrengths,
	atl::Array<avl::Profile>& outResponseProfiles,
	atl::Optional<avl::SegmentScanField&> outAlignedScanField,
	atl::Array<atl::Array<avl::Point2D>>& outSelectedPoints,
	atl::Array<avl::Segment2D>& diagScanLines,
	atl::Array<avl::Point2D>& diagCandidatePoints
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inScanField const SegmentScanField& Region where the scans are performed
Input value inScanFieldAlignment Optional<const CoordinateSystem2D&> NIL
Input value inScanWidth int 1 - 5 How many pixels are sampled perpendicularly at each scan line's positions
Input value inScanStep int 1 - 10 Pixel distance between the centers of consecutive scan lines
Input value inScanLimit int 1 - 50 Maximum number of scan lines
Input value inEdgeScanParams const EdgeScanParams& EdgeScanParams ( ProfileInterpolation: Quadratic4 SmoothingStdDev: 0.6f MinMagnitude: 5.0f EdgeTransition: Any ) Parameters of 1D edge detection along a single scan line
Input value 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
Input value inMaxSlant float 0.0 - 45.0 30.0f Maximum angle deviation of the resulting line from 90 degrees to the scan axis
Input value inMinLength float 0.0 - 10.0f Minimum length of the resulting line
Input value inMaxGap float 0.0 - 50.0f Maximum gap within a resulting line
Input value inMinPointCount int 2 - 3 Minimum number of edge points that a resulting line must contain (otherwise it is rejected)
Input value inLineSelection LineSelection::Type Fittest Selection criteria for edge lines
Input value 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
Input value inEdgeMeasure EdgeMeasure::Type LogMagnitude Several options for measuring a single edge point
Input value inLineFinderMethod LineFinderMethod::Type Hough Several alternative algorithms for finding lines within the detected cloud of edge points
Input value inMaxPointDeviation float 0.0 - 2.5f Maximum pixel distance between a detected line and its supporting edge points
Input value inMaxTurnAngle float 0.0 - 90.0 10.0f Maximum turn angle at any interior vertex of the line path
Input value inOutlierSuppression Optional<LineMEstimator::Type> TheilSen A method for removing outlying points
Input value inRefineEndpoints bool True Turns on a method for refining the length of the detected line
Input value inMaxCount Optional<int> 1 - 100 Maximum number of lines to return
Output value outLines Array<Segment2D>&
Output value outLineStrengths Array<float>&
Output value outResponseProfiles Array<Profile>& Edge response profiles, one per scan line
Output value outAlignedScanField Optional<SegmentScanField&>
Output value outSelectedPoints Array<Array<Point2D>>& Lists of points associated with each returned line
Diagnostic input diagScanLines Array<Segment2D>&
Diagnostic input diagCandidatePoints Array<Point2D>&

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outAlignedScanField.

Read more about Optional Outputs.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.