Esempio n. 1
0
        public void AlignFace()
        {
            this.faceMatcher = new FaceMatcher();


            PointCloud faceCut  = PointCloud.FromJsonFile(this.pathModels + "\\FaceMatching\\CutFace2.json");
            PointCloud facenNew = PointCloud.FromObjFile(this.pathModels + "\\FaceMatching", "EdFace1.obj");

            facenNew.RotateDegrees(0, 180, 0);



            //this.faceMatcher.SaveCutFace(this.pathModels + "\\FaceMatching\\CutFace2.json");
            //this.faceMatcher.Humanoid.SaveVectors(this.pathModels + "\\FaceMatching\\ModelWithNewFace2.json");


            this.pointCloudSource = faceCut;
            this.pointCloudTarget = facenNew;

            //icp.ICPSettings.ShuffleEffect = true;
            icp.ICPSettings.MaximumNumberOfIterations  = 10;
            icp.ICPSettings.SingleSourceTargetMatching = true;

            icp.ICPSettings.ICPVersion = ICP_VersionUsed.NoScaling;
            icp.TakenAlgorithm         = true;
            pointCloudResult           = IterativeClosestPointTransform.Instance.PerformICP(pointCloudSource, pointCloudTarget);



            Show3PointCloudsInWindow(false);
        }