Skip to content

registerDepth

ptcloudfunctionOpenCV 5.0.0
import { registerDepth } from '@banou/opencv-wasm'

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

ARGUMENTSunregisteredCameraMatrix, registeredCameraMatrix, registeredDistCoeffs, Rt
FUNCTIONregisterDepth
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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

the camera matrix of the depth camera

registeredCameraMatrix

the camera matrix of the external camera

registeredDistCoeffs

the distortion coefficients of the external camera

Rt

the rigid body transform between the cameras. Transforms points from depth camera frame to external camera frame.

unregisteredDepth

the input depth data

outputImagePlaneSize

the image plane dimensions of the external camera (width, height)

registeredDepth

Output destination, filled by the native operation. the result of transforming the depth into the external camera

depthDilation

whether 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.