Table of Contents

Class FastLineDetector

Namespace
Emgu.CV.XImgproc
Assembly
Emgu.CV.dll

Class implementing the FLD (Fast Line Detector) algorithm

public class FastLineDetector : SharedPtrObject, IDisposable
Inheritance
FastLineDetector
Implements
Inherited Members

Constructors

FastLineDetector(int, float, double, double, int, bool)

Initializes a new instance of the FastLineDetector object.

public FastLineDetector(int lengthThreshold = 10, float distanceThreshold = 1.4142135, double cannyThreshold1 = 50, double cannyThreshold2 = 50, int cannyApertureSize = 3, bool doMerge = false)

Parameters

lengthThreshold int

Segment shorter than this will be discarded.

distanceThreshold float

A point placed from a hypothesis line segment farther than this will be regarded as an outlier.

cannyThreshold1 double

First threshold for hysteresis procedure in Canny().

cannyThreshold2 double

Second threshold for hysteresis procedure in Canny().

cannyApertureSize int

Aperture size for the Sobel operator in Canny().

doMerge bool

If true, incremental merging of segments will be performed

Methods

Detect(IInputArray)

Finds lines in the input image.

public LineSegment2DF[] Detect(IInputArray image)

Parameters

image IInputArray

Image to detect lines in.

Returns

LineSegment2DF[]

The detected line segments

DisposeObject()

protected override void DisposeObject()

DrawSegments(IInputOutputArray, LineSegment2DF[], bool)

Draws the line segments on a given image.

public void DrawSegments(IInputOutputArray image, LineSegment2DF[] lines, bool drawArrows = false)

Parameters

image IInputOutputArray

The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.

lines LineSegment2DF[]

A vector of the lines that needed to be drawn.

drawArrows bool

If true, arrow heads will be drawn.