Skip to content

Octree_createWithDepth

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

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

ARGUMENTSmaxDepth, pointCloud, colors, size
FUNCTIONOctree_createWithDepth
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 maxDepth

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

Max depth of the octree

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.