Class FastLineDetector
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
intSegment shorter than this will be discarded.
distanceThreshold
floatA point placed from a hypothesis line segment farther than this will be regarded as an outlier.
cannyThreshold1
doubleFirst threshold for hysteresis procedure in Canny().
cannyThreshold2
doubleSecond threshold for hysteresis procedure in Canny().
cannyApertureSize
intAperture size for the Sobel operator in Canny().
doMerge
boolIf true, incremental merging of segments will be performed
Methods
Detect(IInputArray)
Finds lines in the input image.
public LineSegment2DF[] Detect(IInputArray image)
Parameters
image
IInputArrayImage 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
IInputOutputArrayThe 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
boolIf true, arrow heads will be drawn.