Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        private Matrix4d Helper_FindTransformationMatrix(PointCloudVertices pointsSource, PointCloudVertices pointsTarget)
        {
            Matrix4d myMatrix;

            if (ICPSettings.ICPVersion == ICP_VersionUsed.Horn)
            {
                MathUtilsVTK.FindTransformationMatrix(PointCloudVertices.ToVectors(pointsSource), PointCloudVertices.ToVectors(pointsTarget), this.LandmarkTransform);
                myMatrix = LandmarkTransform.Matrix;
            }
            else
            {
                myMatrix = SVD.FindTransformationMatrix(PointCloudVertices.ToVectors(pointsSource), PointCloudVertices.ToVectors(pointsTarget), ICPSettings.ICPVersion);
            }
            return(myMatrix);
        }
Ejemplo n.º 3
0
        private Matrix4 Helper_FindTransformationMatrix(PointCloud resultKDTree)
        {
            Matrix4 myMatrix;

            if (ICPSettings.ICPVersion == ICP_VersionUsed.Horn)
            {
                MathUtilsVTK.FindTransformationMatrix(pointsSource, resultKDTree, this.LandmarkTransform);
                myMatrix = LandmarkTransform.Matrix;
            }
            else
            {
                if (ICPSettings.IgnoreFarPoints)
                {
                    myMatrix = SVD.FindTransformationMatrix_MinimumDistance(pointsSource, resultKDTree, ICPSettings.ICPVersion, this.MeanDistance).ToMatrix4();
                }
                else
                {
                    myMatrix = SVD.FindTransformationMatrix(pointsSource, resultKDTree, ICPSettings.ICPVersion).ToMatrix4();
                }
            }
            return(myMatrix);
        }