Skip to content

line_descriptor_LSDParam

line_descriptorclassOpenCV 5.0.0
import { line_descriptor_LSDParam } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSline_descriptor_LSDParam
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

Lines extraction methodology

The lines extraction methodology described in the following is mainly based on [EDL] . The extraction starts with a Gaussian pyramid generated from an original image, downsampled N-1 times, blurred N times, to obtain N layers (one for each octave), with layer 0 corresponding to input image. Then, from each layer (octave) in the pyramid, lines are extracted using LSD algorithm.

Differently from EDLine lines extractor used in original article, LSD furnishes information only about lines extremes; thus, additional information regarding slope and equation of line are computed via analytic methods. The number of pixels is obtained using LineIterator. Extracted lines are returned in the form of KeyLine objects, but since extraction is based on a method different from the one used in BinaryDescriptor class, data associated to a line's extremes in original image and in octave it was extracted from, coincide. KeyLine's field class_id is used as an index to indicate the order of extraction of a line inside a single octave.

Constructors and members

static new

Create an owned line_descriptor_LSDParam object. Release native handles with using or delete().

new(): line_descriptor_LSDParam;
Returns

The line_descriptor_LSDParam result.

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;
Returns

The this result.

scale

scale value for line_descriptor_LSDParam.

scale: number;

sigma_scale

sigma scale value for line_descriptor_LSDParam.

sigma_scale: number;

quant

quant value for line_descriptor_LSDParam.

quant: number;

ang_th

ang th value for line_descriptor_LSDParam.

ang_th: number;

log_eps

log eps value for line_descriptor_LSDParam.

log_eps: number;

density_th

density th value for line_descriptor_LSDParam.

density_th: number;

n_bins

n bins value for line_descriptor_LSDParam.

n_bins: number;

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.