Skip to content

line_descriptor_BinaryDescriptor

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

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

ARGUMENTSConstructor or factory
CLASSline_descriptor_BinaryDescriptor
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. Inherits Algorithm.

Class implements both functionalities for detection of lines and computation of their binary descriptor.

Class' interface is mainly based on the ones of classical detectors and extractors, such as Feature2d's features_main and features_match. Retrieved information about lines is stored in line_descriptor::KeyLine objects.

Constructors and members

static createBinaryDescriptor

Create a BinaryDescriptor object with default parameters (or with the ones provided) and return a smart pointer to it

createBinaryDescriptor(): line_descriptor_BinaryDescriptor | null;
Returns

The line_descriptor_BinaryDescriptor | null 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.

getNumOfOctaves

Get current number of octaves

getNumOfOctaves(): number;
Returns

The number result.

setNumOfOctaves

Set number of octaves

setNumOfOctaves(octaves: number): void;
octaves

number of octaves

getWidthOfBand

Get current width of bands

getWidthOfBand(): number;
Returns

The number result.

setWidthOfBand

Set width of bands

setWidthOfBand(width: number): void;
width

width of bands

getReductionRatio

Get current reduction ratio (used in Gaussian pyramids)

getReductionRatio(): number;
Returns

The number result.

setReductionRatio

Set reduction ratio (used in Gaussian pyramids)

setReductionRatio(rRatio: number): void;
rRatio

reduction ratio

detect

Requires line detection

detect(image: Mat, keypoints: line_descriptor__KeyLineVector, mask: Mat): void;
2 available overloads
detect(image: Mat, keypoints: line_descriptor__KeyLineVector): void;
detect(image: Mat, keypoints: line_descriptor__KeyLineVector, mask: Mat): void;
image

input image

keypoints

Output destination, filled by the native operation. vector that will store extracted lines for one or more images

mask

mask matrix to detect only KeyLines of interest

compute

Requires descriptors computation

compute(image: Mat, keylines: line_descriptor__KeyLineVector, descriptors: Mat, returnFloatDescr: boolean): void;
2 available overloads
compute(image: Mat, keylines: line_descriptor__KeyLineVector, descriptors: Mat): void;
compute(image: Mat, keylines: line_descriptor__KeyLineVector, descriptors: Mat, returnFloatDescr: boolean): void;
image

input image

keylines

Input/output value, modified by the native operation. vector containing lines for which descriptors must be computed

descriptors

Output destination, filled by the native operation. param: returnFloatDescr flag (when set to true, original non-binary descriptors are returned)

returnFloatDescr

return float descr argument (boolean).

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.