Emgu.CV.CameraCalibration.EstimateRigidTransform C# (CSharp) Метод

EstimateRigidTransform() публичный статический Метод

Estimate rigid transformation between 2 point sets.
public static EstimateRigidTransform ( PointF src, PointF dest, bool fullAffine ) : RotationMatrix2D
src System.Drawing.PointF The points from the source image
dest System.Drawing.PointF The corresponding points from the destination image
fullAffine bool Indicates if full affine should be performed
Результат RotationMatrix2D
        public static RotationMatrix2D<double> EstimateRigidTransform(PointF[] src, PointF[] dest, bool fullAffine)
        {
            RotationMatrix2D<double> result = new RotationMatrix2D<double>();
             GCHandle handleA = GCHandle.Alloc(src, GCHandleType.Pinned);
             GCHandle handleB = GCHandle.Alloc(dest, GCHandleType.Pinned);
             bool success;
             using (Matrix<float> a = new Matrix<float>(src.Length, 1, 2, handleA.AddrOfPinnedObject(), 2 * sizeof(float)))
             using (Matrix<float> b = new Matrix<float>(dest.Length, 1, 2, handleB.AddrOfPinnedObject(), 2 * sizeof(float)))
             {
            success = CvInvoke.cvEstimateRigidTransform(a, b, result, fullAffine);
             }
             handleA.Free();
             handleB.Free();

             if (success)
             {
            return result;
             }
             else
             {
            result.Dispose();
            return null;
             }
        }