Skip to content

loadPointCloud

ptcloudfunctionOpenCV 5.0.0
import { loadPointCloud } from '@banou/opencv-wasm'

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

ARGUMENTSfilename, vertices, normals, rgb
FUNCTIONloadPointCloud
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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

Name of the file

vertices

Output destination, filled by the native operation. vertex coordinates, each value contains 3 floats

normals

Output destination, filled by the native operation. per-vertex normals, each value contains 3 floats

rgb

Output 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.