structured_light_StructuredLightPattern
import { structured_light_StructuredLightPattern } 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.
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;The this result.
generate
Generates the structured light pattern to project.
generate(patternImages: MatVector): boolean;patternImagesOutput 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.
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;patternImagesThe acquired pattern images to decode (vector<vector<Mat>>), loaded as grayscale and previously rectified.
disparityMapOutput destination, filled by the native operation. The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.
blackImagesThe all-black images needed for shadowMasks computation.
whiteImagesThe all-white images needed for shadowMasks computation.
flagsFlags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD.
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.