large_kinfu_LargeKinfu
import { large_kinfu_LargeKinfu } 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.
Large Scale Dense Depth Fusion implementation
This class implements a 3d reconstruction algorithm for larger environments using Spatially hashed TSDF volume "Submaps". It also runs a periodic posegraph optimization to minimize drift in tracking over long sequences. Currently the algorithm does not implement a relocalization or loop closure module. Potentially a Bag of words implementation or RGBD relocalization as described in Glocker et al. ISMAR 2013 will be implemented
It takes a sequence of depth images taken from depth sensor (or any depth images source such as stereo camera matching algorithm or even raymarching renderer). The output can be obtained as a vector of points and their normals or can be Phong-rendered from given camera pose.
An internal representation of a model is a spatially hashed voxel cube that stores TSDF values which represent the distance to the closest surface (for details read the [kinectfusion] article about TSDF). There is no interface to that representation yet.
For posegraph optimization, a Submap abstraction over the Volume class is created. New submaps are added to the model when there is low visibility overlap between current viewing frustrum and the existing volume/model. Multiple submaps are simultaneously tracked and a posegraph is created and optimized periodically.
LargeKinfu does not use any OpenCL acceleration yet. To enable or disable it explicitly use cv::setUseOptimized() or cv::ocl::setUseOpenCL().
This implementation is inspired from Kintinuous, InfiniTAM and other SOTA algorithms
You need to set the OPENCV_ENABLE_NONFREE option in CMake to use KinectFusion.
Constructors and members
static create
Create an owned large_kinfu_LargeKinfu instance with the supplied configuration.
Large Scale Dense Depth Fusion implementation
create(_params: large_kinfu_Params | null): large_kinfu_LargeKinfu | null;_paramsparams argument (large_kinfu_Params | null).
The large_kinfu_LargeKinfu | 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
Raycast the reconstructed scene into the supplied output image, optionally from a specified camera pose.
render(image: Mat): void;imageOutput destination, filled by the native operation. image argument (Mat).
render1
Raycast the reconstructed scene into the output image from the supplied camera pose.
render1(image: Mat, cameraPose: Matx44f): void;imageOutput destination, filled by the native operation. image argument (Mat).
cameraPosecamera pose argument (Matx44f).
getCloud
Return the cloud configured on this large_kinfu_LargeKinfu object.
getCloud(points: Mat, normals: Mat): void;pointsOutput destination, filled by the native operation. points argument (Mat).
normalsOutput destination, filled by the native operation. normals argument (Mat).
getPoints
Return the points configured on this large_kinfu_LargeKinfu object.
getPoints(points: Mat): void;pointsOutput destination, filled by the native operation. points argument (Mat).
getNormals
Return the normals configured on this large_kinfu_LargeKinfu object.
getNormals(points: Mat, normals: Mat): void;pointspoints argument (Mat).
normalsOutput destination, filled by the native operation. normals argument (Mat).
reset
Clear the reconstruction volume and reset camera tracking to its initial state.
reset(): void;update
Integrate a depth frame into the reconstruction and update the camera pose. Return whether tracking and integration succeeded.
update(depth: Mat): boolean;depthdepth argument (Mat).
The boolean result.
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.