Start » Filter Reference » Computer Vision » Hough Transform » DetectLines

DetectLines


Module: FoundationBasic

Finds lines in an image using Hough Transform.

Name Type Range Description
Input value
inImage Image Input image
Input value
inRoi Region* Input region of interest
Input value
inAngleResolution Real 0.1 - 180.0 Resolution of lines' orientation
Input value
inMinAngleDelta Real 0.0 - Minimum angle between two lines
Input value
inMinDistance Real 0.0 - Minimum distance between two lines
Input value
inMinScore Real 0.0 - Minimum matching score
Input value
inEdgeThreshold Real Minimum accepted edge magnitude
Output value
outLines Line2DArray Output lines
Output value
outScores RealArray Output scores
Diagnostic input
diagGradientMagnitudeImage Image Visualized gradients magnitude of an input image
Diagnostic input
diagScoreImage 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.

Complexity Level

This filter is available on Expert Complexity Level.

See Also

  • DetectPaths – Finds a specified shape in an image using Hough Transform.
  • DetectSegments – Finds segments in an image using Hough Transform.