You are here: Start » AVL.NET » Function Reference » Computer Vision » Hough Transform » AVL.DetectLines

AVL.DetectLines

Finds lines in an image using Hough Transform.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void DetectLines
(
	AvlNet.Image inImage,
	NullableRef<AvlNet.Region> inRoi,
	float inAngleResolution,
	float inMinAngleDelta,
	float inMinDistance,
	float inMinScore,
	float inEdgeThreshold,
	IList<AvlNet.Line2D> outLines,
	IList<float> outScores
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRoiAvlNet.NullableRef<AvlNet.Region>Input region of interest. Default value: atl::NIL.
inAngleResolutionfloat<0.1f, 180.0f>1.0fResolution of lines' orientation. Default value: 1.0f.
inMinAngleDeltafloat<0.0f, INF>20.0fMinimum angle between two lines. Default value: 20.0f.
inMinDistancefloat<0.0f, INF>20.0fMinimum distance between two lines. Default value: 20.0f.
inMinScorefloat<0.0f, INF>20.0fMinimum matching score. Default value: 20.0f.
inEdgeThresholdfloat10.0fMinimum accepted edge magnitude. Default value: 10.0f.
outLinesSystem.Collections.Generic.IList<AvlNet.Line2D>Output lines.
outScoresSystem.Collections.Generic.IList<float>Output scores.

Description

The operation detects straight edges in the inImage using the Hough Transform approach and treats them as infinite lines. The output array is ordered from best matching to worst matching results.

The parameter inAngleResolution specifies the precision of detected lines' orientations. Value of n means the filter will be able to reliably distinguish lines in n-degree increments.

Parameters inMinAngleDelta and inMinDistance are used for neighbouring results suppression. inMinAngleDelta specifies the minimum angle between two lines while inMinDistance specifies the minimum distance between two parallel lines.

Examples

DetectLines performed on the sample image with inMinScore = 0.3.

Remarks

Low values of inAngleResolution (under 0.5) may cause high memory consumption and decrease in performance.

Function Overrides

See also