Computes an optimal affine transformation between two 3D point sets
M = cv.estimateAffine3D(src, dst)
[M, inliers] = cv.estimateAffine3D(...)
[...] = cv.estimateAffine3D(..., 'OptionName', optionValue, ...)
Input
- src First input 3D point set containing
(X,Y,Z)
. Cell array of
3-element vectors {[x,y,z],...}
or Nx3/Nx1x3/1xNx3 numeric array.
- dst Second input 3D point set containing
(x,y,z)
. Same size and type
as src
.
Output
- M Output 3D affine transformation matrix 3x4 of the form
[a11 a12 a13 b1; a21 a22 a23 b2; a31 a32 a33 b3]
- inliers Output vector of same length as number of points, indicating
which points are inliers (1-inlier, 0-outlier).
- result success flag.
Options
- RansacThreshold Maximum reprojection error in the RANSAC algorithm to
consider a point as an inlier. default 3.0.
- 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.
default 0.99.
It computes:
[x; y; z] = [a11 a12 a13; a21 a22 a23; a31 a32 a33] * [X; Y; Z] + [b1; b2; b3]
The function estimates an optimal 3D affine transformation between two 3D
point sets using the RANSAC algorithm.