registerDepth
import { registerDepth } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera.
uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir
Currently does not check for negative depth values.
registerDepth(unregisteredCameraMatrix: Mat, registeredCameraMatrix: Mat, registeredDistCoeffs: Mat, Rt: Mat, unregisteredDepth: Mat, outputImagePlaneSize: Size, registeredDepth: Mat, depthDilation: boolean): void;2 available overloads
registerDepth(unregisteredCameraMatrix: Mat, registeredCameraMatrix: Mat, registeredDistCoeffs: Mat, Rt: Mat, unregisteredDepth: Mat, outputImagePlaneSize: Size, registeredDepth: Mat): void;registerDepth(unregisteredCameraMatrix: Mat, registeredCameraMatrix: Mat, registeredDistCoeffs: Mat, Rt: Mat, unregisteredDepth: Mat, outputImagePlaneSize: Size, registeredDepth: Mat, depthDilation: boolean): void;unregisteredCameraMatrixthe camera matrix of the depth camera
registeredCameraMatrixthe camera matrix of the external camera
registeredDistCoeffsthe distortion coefficients of the external camera
Rtthe rigid body transform between the cameras. Transforms points from depth camera frame to external camera frame.
unregisteredDepththe input depth data
outputImagePlaneSizethe image plane dimensions of the external camera (width, height)
registeredDepthOutput destination, filled by the native operation. the result of transforming the depth into the external camera
depthDilationwhether or not the depth is dilated to avoid holes and occlusion errors (optional)
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.