Skip to content

structured_light_StructuredLightPattern

structured_lightclassOpenCV 5.0.0
import { structured_light_StructuredLightPattern } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSstructured_light_StructuredLightPattern
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.

Abstract base class for generating and decoding structured light patterns.

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

The this result.

generate

Generates the structured light pattern to project.

generate(patternImages: MatVector): boolean;
patternImages

Output destination, filled by the native operation. The generated pattern: a vector<Mat>, in which each image is a CV_8U Mat at projector's resolution.

Returns

The boolean result.

decode

Decodes the structured light pattern, generating a disparity map

Note: All the images must be at the same resolution.

decode(patternImages: std__vector_cv__MatVector, disparityMap: Mat, blackImages: MatVector, whiteImages: MatVector, flags: number): boolean;
4 available overloads
decode(patternImages: std__vector_cv__MatVector, disparityMap: Mat): boolean;
decode(patternImages: std__vector_cv__MatVector, disparityMap: Mat, blackImages: MatVector): boolean;
decode(patternImages: std__vector_cv__MatVector, disparityMap: Mat, blackImages: MatVector, whiteImages: MatVector): boolean;
decode(patternImages: std__vector_cv__MatVector, disparityMap: Mat, blackImages: MatVector, whiteImages: MatVector, flags: number): boolean;
patternImages

The acquired pattern images to decode (vector<vector<Mat>>), loaded as grayscale and previously rectified.

disparityMap

Output destination, filled by the native operation. The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

blackImages

The all-black images needed for shadowMasks computation.

whiteImages

The all-white images needed for shadowMasks computation.

flags

Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD.

Returns

The boolean result.

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.