Skip to content

Odometry

ptcloudclassOpenCV 5.0.0
import { Odometry } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSOdometry
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

odometry value in the OpenCV API.

Constructors and members

static new

Create an owned Odometry object. Release native handles with using or delete().

new(otype: OdometryType, settings: OdometrySettings, algtype: OdometryAlgoType): Odometry;
3 available overloads
new(): Odometry;
new(otype: OdometryType): Odometry;
new(otype: OdometryType, settings: OdometrySettings, algtype: OdometryAlgoType): Odometry;
otype

otype argument (OdometryType).

settings

settings argument (OdometrySettings).

algtype

algtype argument (OdometryAlgoType).

Returns

The Odometry 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;
Returns

The this result.

compute1

Compute Rigid Transformation between two frames so that Rt * src = dst

compute1(srcDepth: Mat, dstDepth: Mat, Rt: Mat): boolean;
srcDepth

source depth ("original" image)

dstDepth

destination depth ("rotated" image)

Rt

Output destination, filled by the native operation. Rigid transformation, which will be calculated, in form: { R_11 R_12 R_13 t_1 R_21 R_22 R_23 t_2 R_31 R_32 R_33 t_3 0 0 0 1 }

Returns

true on success, false if failed to find the transformation

compute2

Compute Rigid Transformation between two frames so that Rt * src = dst

compute2(srcDepth: Mat, srcRGB: Mat, dstDepth: Mat, dstRGB: Mat, Rt: Mat): boolean;
srcDepth

source depth ("original" image)

srcRGB

source RGB

dstDepth

destination depth ("rotated" image)

dstRGB

destination RGB

Rt

Output destination, filled by the native operation. Rigid transformation, which will be calculated, in form: { R_11 R_12 R_13 t_1 R_21 R_22 R_23 t_2 R_31 R_32 R_33 t_3 0 0 0 1 }

Returns

true on success, false if failed to find the transformation

getNormalsComputer

Get the normals computer object used for normals calculation (if presented). The normals computer is generated at first need during prepareFrame when normals are required for the ICP algorithm but not presented by a user. Re-generated each time the related settings change or a new frame arrives with the different size.

getNormalsComputer(): RgbdNormals | null;
Returns

The RgbdNormals | null result.

prepareFrame

Prepare frame for odometry calculation

prepareFrame(frame: OdometryFrame): void;
frame

odometry prepare this frame as src frame and dst frame simultaneously

prepareFrames

Prepare frame for odometry calculation

prepareFrames(srcFrame: OdometryFrame, dstFrame: OdometryFrame): void;
srcFrame

frame will be prepared as src frame ("original" image)

dstFrame

frame will be prepared as dsr frame ("rotated" image)

compute

Compute Rigid Transformation between two frames so that Rt * src = dst Both frames, source and destination, should have been prepared by calling prepareFrame() first

compute(srcFrame: OdometryFrame, dstFrame: OdometryFrame, Rt: Mat): boolean;
srcFrame

src frame ("original" image)

dstFrame

dst frame ("rotated" image)

Rt

Output destination, filled by the native operation. Rigid transformation, which will be calculated, in form: { R_11 R_12 R_13 t_1 R_21 R_22 R_23 t_2 R_31 R_32 R_33 t_3 0 0 0 1 }

Returns

true on success, false if failed to find the transformation

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.