public static Matrix4d TryoutPointsSA(List <Vertex> pointsTarget, List <Vertex> pointsSource, ICPSolution res, LandmarkTransform myLandmarkTransform)
        {
            //transform:
            MatrixUtilsNew.FindTransformationMatrix(Vertices.ConvertToVector3dList(res.PointsSource), Vertices.ConvertToVector3dList(res.PointsTarget), myLandmarkTransform);//, accumulate);

            res.Matrix = myLandmarkTransform.Matrix;

            return(res.Matrix);
        }
Example #2
0
        private Matrix4d Helper_FindTransformationMatrix(List <Vertex> pointsTarget, List <Vertex> pointsSource)
        {
            Matrix4d myMatrix;

            if (ICPVersion == ICP_VersionUsed.Horn)
            {
                MatrixUtilsNew.FindTransformationMatrix(Vertices.ConvertToVector3dList(pointsSource), Vertices.ConvertToVector3dList(pointsTarget), this.LandmarkTransform);
                myMatrix = LandmarkTransform.Matrix;
            }
            else
            {
                myMatrix = SVD.FindTransformationMatrix(Vertices.ConvertToVector3dList(pointsTarget), Vertices.ConvertToVector3dList(pointsSource), ICPVersion);
            }
            return(myMatrix);
        }
        private static Matrix4d TryoutNewPoint(int iPoint, List <Vertex> pointsTarget, List <Vertex> pointsSource, List <Vertex> pointsTargetTrial, List <Vertex> pointsSourceTrial, LandmarkTransform myLandmarkTransform)
        {
            Vertex p1 = pointsTarget[iPoint];
            Vertex p2 = pointsSource[iPoint];

            pointsTargetTrial.Add(p1);
            pointsSourceTrial.Add(p2);



            MatrixUtilsNew.FindTransformationMatrix(Vertices.ConvertToVector3dList(pointsSourceTrial), Vertices.ConvertToVector3dList(pointsTargetTrial), myLandmarkTransform);//, accumulate);

            Matrix4d myMatrix = myLandmarkTransform.Matrix;


            return(myMatrix);
        }