Skip to content

warpFrame

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

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

ARGUMENTSdepth, image, mask, Rt
FUNCTIONwarpFrame
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane. This function can be used to visualize the results of the Odometry algorithm.

warpFrame(depth: Mat, image: Mat, mask: Mat, Rt: Mat, cameraMatrix: Mat, warpedDepth: Mat, warpedImage: Mat, warpedMask: Mat): void;
4 available overloads
warpFrame(depth: Mat, image: Mat, mask: Mat, Rt: Mat, cameraMatrix: Mat): void;
warpFrame(depth: Mat, image: Mat, mask: Mat, Rt: Mat, cameraMatrix: Mat, warpedDepth: Mat): void;
warpFrame(depth: Mat, image: Mat, mask: Mat, Rt: Mat, cameraMatrix: Mat, warpedDepth: Mat, warpedImage: Mat): void;
warpFrame(depth: Mat, image: Mat, mask: Mat, Rt: Mat, cameraMatrix: Mat, warpedDepth: Mat, warpedImage: Mat, warpedMask: Mat): void;
depth

Depth data, should be 1-channel CV_16U, CV_16S, CV_32F or CV_64F

image

RGB image (optional), should be 1-, 3- or 4-channel CV_8U

mask

Mask of used pixels (optional), should be CV_8UC1, CV_8SC1 or CV_BoolC1

Rt

Rotation+translation matrix (3x4 or 4x4) to be applied to depth points

cameraMatrix

Camera intrinsics matrix (3x3)

warpedDepth

Output destination, filled by the native operation. The warped depth data (optional)

warpedImage

Output destination, filled by the native operation. The warped RGB image (optional)

warpedMask

Output destination, filled by the native operation. The mask of valid pixels in warped image (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.