estimateAffine3D1
import { estimateAffine3D1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Computes an optimal affine transformation between two 3D point sets.
It computes R,s,t minimizing \sum{i} dst_i - c \cdot R \cdot src_i
where R is a 3x3 rotation matrix, t is a 3x1 translation vector and s is a
scalar size value. This is an implementation of the algorithm by Umeyama [umeyama1991least] .
The estimated affine transform has a homogeneous scale which is a subclass of affine
transformations with 7 degrees of freedom. The paired point sets need to comprise at least 3
points each.
estimateAffine3D1(src: Mat, dst: Mat, force_rotation: boolean): estimateAffine3D1Result;2 available overloads
estimateAffine3D1(src: Mat, dst: Mat): estimateAffine3D1Result;estimateAffine3D1(src: Mat, dst: Mat, force_rotation: boolean): estimateAffine3D1Result;srcFirst input 3D point set.
dstSecond input 3D point set.
force_rotationIf true, the returned rotation will never be a reflection. This might be unwanted, e.g. when optimizing a transform between a right- and a left-handed coordinate system.
3D affine transformation matrix 3 \times 4 of the form
T =
\begin{bmatrix}
R & t\\
\end{bmatrix}
``` Scalar output parameters are returned as named fields in this object. Release returned native handles with using or delete(), including handles nested in results.
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.