estimateTranslation3D
import { estimateTranslation3D } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;srcFirst input 3D point set containing
(X,Y,Z).dstSecond input 3D point set containing
(x,y,z).out_Output destination, filled by the native operation. Output 3D translation vector
3 \times 1of the form\begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix}inliersOutput destination, filled by the native operation. Output vector indicating which points are inliers (1-inlier, 0-outlier).
ransacThresholdMaximum reprojection error in the RANSAC algorithm to consider a point as an inlier.
confidenceConfidence 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.
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.