OpenCvSharp.Cv2.EstimateAffine3D C# (CSharp) Method

EstimateAffine3D() public static method

Computes an optimal affine transformation between two 3D point sets.
public static EstimateAffine3D ( InputArray src, InputArray dst, OutputArray outVal, OutputArray inliers, double ransacThreshold = 3, double confidence = 0.99 ) : int
src InputArray First input 3D point set.
dst InputArray Second input 3D point set.
outVal OutputArray Output 3D affine transformation matrix 3 x 4 .
inliers OutputArray Output vector indicating which points are inliers.
ransacThreshold double Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier.
confidence double 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.
return int
        public static int EstimateAffine3D(InputArray src, InputArray dst,
            OutputArray outVal, OutputArray inliers,
            double ransacThreshold = 3, double confidence = 0.99)
        {
            if (src == null)
                throw new ArgumentNullException(nameof(src));
            if (dst == null)
                throw new ArgumentNullException(nameof(dst));
            if (outVal == null)
                throw new ArgumentNullException(nameof(outVal));
            if (inliers == null)
                throw new ArgumentNullException(nameof(inliers));
            src.ThrowIfDisposed();
            dst.ThrowIfDisposed();
            outVal.ThrowIfNotReady();
            inliers.ThrowIfNotReady();

            int ret = NativeMethods.calib3d_estimateAffine3D(
                src.CvPtr, dst.CvPtr, outVal.CvPtr, inliers.CvPtr, ransacThreshold, confidence);

            outVal.Fix();
            inliers.Fix();
            return ret;
        }
    }
Cv2