depthTo3d
import { depthTo3d } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Converts a depth image to 3d points. If the mask is empty then the resulting array has the same dimensions as depth,
otherwise it is 1d vector containing mask-enabled values only.
The coordinate system is x pointing left, y down and z away from the camera
depthTo3d(depth: Mat, K: Mat, points3d: Mat, mask: Mat): void;2 available overloads
depthTo3d(depth: Mat, K: Mat, points3d: Mat): void;depthTo3d(depth: Mat, K: Mat, points3d: Mat, mask: Mat): void;depththe depth image (if given as short int CV_U, it is assumed to be the depth in millimeters (as done with the Microsoft Kinect), otherwise, if given as CV_32F or CV_64F, it is assumed in meters)
KThe calibration matrix
points3dOutput destination, filled by the native operation. the resulting 3d points (point is represented by 4 channels value [x, y, z, 0]). They are of the same depth as
depthif it is CV_32F or CV_64F, and the depth ofKifdepthis of depth CV_16U or CV_16Smaskthe mask of the points to consider (can be empty)
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.