Skip to content

estimateTranslation3D

geometryfunctionOpenCV 5.0.0
import { estimateTranslation3D } from '@banou/opencv-wasm'

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

ARGUMENTSsrc, dst, out_, inliers
FUNCTIONestimateTranslation3D
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Computes an optimal translation between two 3D point sets.

It computes


\begin{bmatrix}
x\\
y\\
z\\
\end{bmatrix}
=
\begin{bmatrix}
X\\
Y\\
Z\\
\end{bmatrix}
+
\begin{bmatrix}
b_1\\
b_2\\
b_3\\
\end{bmatrix}
estimateTranslation3D(src: Mat, dst: Mat, out_: Mat, inliers: Mat, ransacThreshold: number, confidence: number): boolean;
3 available overloads
estimateTranslation3D(src: Mat, dst: Mat, out_: Mat, inliers: Mat): boolean;
estimateTranslation3D(src: Mat, dst: Mat, out_: Mat, inliers: Mat, ransacThreshold: number): boolean;
estimateTranslation3D(src: Mat, dst: Mat, out_: Mat, inliers: Mat, ransacThreshold: number, confidence: number): boolean;
src

First input 3D point set containing (X,Y,Z).

dst

Second input 3D point set containing (x,y,z).

out_

Output destination, filled by the native operation. Output 3D translation vector 3 \times 1 of the form


\begin{bmatrix}
b_1 \\
b_2 \\
b_3 \\
\end{bmatrix}
inliers

Output destination, filled by the native operation. Output vector indicating which points are inliers (1-inlier, 0-outlier).

ransacThreshold

Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier.

confidence

Confidence level, between 0 and 1, for the estimated transformation. Anything between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.

Returns

Whether a translation was found.

The function estimates an optimal 3D translation between two 3D point sets using the RANSAC algorithm.

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.