Skip to content

Octree_createWithResolution

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

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

ARGUMENTSresolution, pointCloud, colors, size
FUNCTIONOctree_createWithResolution
RETURN TYPEOctree | null
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Create an Octree from the PointCloud data with the specific resolution

Octree_createWithResolution(resolution: number, size: number, origin: Point3f, withColors: boolean): Octree | null;
3 available overloads
Octree_createWithResolution(resolution: number, pointCloud: number): Octree | null;
Octree_createWithResolution(resolution: number, pointCloud: number, colors: Point3f): Octree | null;
Octree_createWithResolution(resolution: number, size: number, origin: Point3f, withColors: boolean): Octree | null;
resolution

The size of the octree leaf node

pointCloud

point cloud data, should be 3-channel float array

colors

color attribute of point cloud in the same 3-channel float format

size

bounding box size for the Octree

origin

Initial center coordinate

withColors

Whether to keep per-point colors or not

Returns

resulting octree

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.