ximgproc_FastLineDetector
import { ximgproc_FastLineDetector } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.
Class implementing the FLD (Fast Line Detector) algorithm described in [Lee14] .
Constructors and members
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
detect
example: fld_lines.cpp An example using the FastLineDetector Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

detect(image: Mat, lines: Mat): void;imageA 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);linesOutput destination, filled by the native operation. 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
Draws the line segments on a given image.
drawSegments(image: Mat, lines: Mat, draw_arrow: boolean, linecolor: Scalar, linethickness: number): void;4 available overloads
drawSegments(image: Mat, lines: Mat): void;drawSegments(image: Mat, lines: Mat, draw_arrow: boolean): void;drawSegments(image: Mat, lines: Mat, draw_arrow: boolean, linecolor: Scalar): void;drawSegments(image: Mat, lines: Mat, draw_arrow: boolean, linecolor: Scalar, linethickness: number): void;imageInput/output value, modified by the native operation. The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
linesA vector of the lines that needed to be drawn.
draw_arrowIf true, arrow heads will be drawn.
linecolorLine color.
linethicknessLine thickness.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.