loadPointCloud
import { loadPointCloud } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Loads a point cloud from a file.
The function loads point cloud from the specified file and returns it. If the cloud cannot be read, throws an error. Vertex coordinates, normals and colors are returned as they are saved in the file even if these arrays have different sizes and their elements do not correspond to each other (which is typical for OBJ files for example)
Currently, the following file formats are supported:
loadPointCloud(filename: EmbindString, vertices: Mat, normals: Mat, rgb: Mat): void;3 available overloads
loadPointCloud(filename: EmbindString, vertices: Mat): void;loadPointCloud(filename: EmbindString, vertices: Mat, normals: Mat): void;loadPointCloud(filename: EmbindString, vertices: Mat, normals: Mat, rgb: Mat): void;filenameName of the file
verticesOutput destination, filled by the native operation. vertex coordinates, each value contains 3 floats
normalsOutput destination, filled by the native operation. per-vertex normals, each value contains 3 floats
rgbOutput destination, filled by the native operation. per-vertex colors, each value contains 3 floats
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.