## Class FastLineDetector

• public class FastLineDetector
extends Algorithm
Class implementing the FLD (Fast Line Detector) algorithm described in CITE: Lee14 .

• ### Fields inherited from class org.opencv.core.Algorithm

nativeObj
• ### Constructor Summary

Constructors
Modifier Constructor Description
protected  FastLineDetector​(long addr)
• ### Method Summary

All Methods
Modifier and Type Method Description
static FastLineDetector __fromPtr__​(long addr)
void detect​(Mat image, Mat lines)
Finds lines in the input image.
void drawSegments​(Mat image, Mat lines)
Draws the line segments on a given image.
void drawSegments​(Mat image, Mat lines, boolean draw_arrow)
Draws the line segments on a given image.
void drawSegments​(Mat image, Mat lines, boolean draw_arrow, Scalar linecolor)
Draws the line segments on a given image.
void drawSegments​(Mat image, Mat lines, boolean draw_arrow, Scalar linecolor, int linethickness)
Draws the line segments on a given image.
protected void finalize()
• ### Methods inherited from class org.opencv.core.Algorithm

clear, empty, getDefaultName, getNativeObjAddr, save
• ### Methods inherited from class java.lang.Object

clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### FastLineDetector

protected FastLineDetector​(long addr)
• ### Method Detail

• #### __fromPtr__

public static FastLineDetector __fromPtr__​(long addr)
• #### detect

public void detect​(Mat image,
Mat lines)
Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image. ![image](pics/corridor_fld.jpg)
Parameters:
image - A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: fld_ptr->detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);
lines - A vector of Vec4f elements specifying the beginning and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are directed so that the brighter side is on their left.
• #### drawSegments

public void drawSegments​(Mat image,
Mat lines,
boolean draw_arrow,
Scalar linecolor,
int linethickness)
Draws the line segments on a given image.
Parameters:
image - The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
lines - A vector of the lines that needed to be drawn.
draw_arrow - If true, arrow heads will be drawn.
linecolor - Line color.
linethickness - Line thickness.
• #### drawSegments

public void drawSegments​(Mat image,
Mat lines,
boolean draw_arrow,
Scalar linecolor)
Draws the line segments on a given image.
Parameters:
image - The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
lines - A vector of the lines that needed to be drawn.
draw_arrow - If true, arrow heads will be drawn.
linecolor - Line color.
• #### drawSegments

public void drawSegments​(Mat image,
Mat lines,
boolean draw_arrow)
Draws the line segments on a given image.
Parameters:
image - The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
lines - A vector of the lines that needed to be drawn.
draw_arrow - If true, arrow heads will be drawn.
• #### drawSegments

public void drawSegments​(Mat image,
Mat lines)
Draws the line segments on a given image.
Parameters:
image - The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
lines - A vector of the lines that needed to be drawn.
• #### finalize

protected void finalize()
throws java.lang.Throwable
Overrides:
finalize in class Algorithm
Throws:
java.lang.Throwable