You are here: Start » AVL.NET » AVL.DetectLines(AvlNet.Image, AvlNet.Region, float, float, float, float, float, AvlNet.Line2D[], float[], AvlNet.Image, AvlNet.Image)
AVL.DetectLines(AvlNet.Image, AvlNet.Region, float, float, float, float, float, AvlNet.Line2D[], float[], AvlNet.Image, AvlNet.Image)
Finds lines in an image.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void DetectLines( AvlNet.Image inImage, AvlNet.Region inRoi, float inAngleResolution, float inMinAngleDelta, float inMinDistance, float inMinScore, float inEdgeThreshold, out AvlNet.Line2D[] outLines, out float[] outScores, out AvlNet.Image diagGradientMagnitudeImage, out AvlNet.Image diagScoreImage )
Parameters
- inImage
- Type: AvlNet.Image
Input image - inRoi
- Type: AvlNet.Region
Input region of interest, or null. - inAngleResolution
- Type: System.Single
Resolution of lines' orientation - inMinAngleDelta
- Type: System.Single
Minimum angle between two lines - inMinDistance
- Type: System.Single
Minimum distance between two lines - inMinScore
- Type: System.Single
Minimum matching score - inEdgeThreshold
- Type: System.Single
Minimum accepted edge magnitude - outLines
- Type: AvlNet.Line2D
Output lines - outScores
- Type: System.Single
Output scores - diagGradientMagnitudeImage
- Type: AvlNet.Image
Visualized gradients magnitude of an input image - diagScoreImage
- Type: AvlNet.Image
Calculated score for each pixel of an input image
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.


