dynafu_DynaFu
import { dynafu_DynaFu } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;_paramsparams argument (kinfu_Params | null).
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;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;imageOutput destination, filled by the native operation. resulting image
cameraPosepose 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;pointsOutput destination, filled by the native operation. vector of points which are 4-float vectors
normalsOutput 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;pointsOutput 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;pointsinput vector of points which are 4-float vectors
normalsOutput 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;depthone-channel image which size and depth scale is described in algorithm's parameters
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.