Skip to content

dynafu_DynaFu

rgbdclassOpenCV 5.0.0
import { dynafu_DynaFu } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSdynafu_DynaFu
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

Backwards compatibility for old versions

Constructors and members

static create

Create an owned dynafu_DynaFu instance with the supplied configuration.

Backwards compatibility for old versions

create(_params: kinfu_Params | null): dynafu_DynaFu | null;
_params

params argument (kinfu_Params | null).

Returns

The dynafu_DynaFu | null result.

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

The this result.

render

Renders a volume into an image

  Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat.
  Light pose is fixed in DynaFu params.
render(image: Mat, cameraPose: Matx44f): void;
2 available overloads
render(image: Mat): void;
render(image: Mat, cameraPose: Matx44f): void;
image

Output destination, filled by the native operation. resulting image

cameraPose

pose of camera to render from. If empty then render from current pose which is a last frame camera pose.

getCloud

Gets points and normals of current 3d mesh

  The order of normals corresponds to order of points.
  The order of points is undefined.
getCloud(points: Mat, normals: Mat): void;
points

Output destination, filled by the native operation. vector of points which are 4-float vectors

normals

Output destination, filled by the native operation. vector of normals which are 4-float vectors

getPoints

Gets points of current 3d mesh

 The order of points is undefined.
getPoints(points: Mat): void;
points

Output destination, filled by the native operation. vector of points which are 4-float vectors

getNormals

Calculates normals for given points

getNormals(points: Mat, normals: Mat): void;
points

input vector of points which are 4-float vectors

normals

Output destination, filled by the native operation. output vector of corresponding normals which are 4-float vectors

reset

Resets the algorithm

Clears current model and resets a pose.
reset(): void;

update

Process next depth frame

  Integrates depth into voxel space with respect to its ICP-calculated pose.
  Input image is converted to CV_32F internally if has another type.
update(depth: Mat): boolean;
depth

one-channel image which size and depth scale is described in algorithm's parameters

Returns

true if succeeded to align new frame with current scene, false if opposite

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.