Exemplo n.º 1
0
        private void Clouds_ICP()
        {
            if (!GetFirstTwoCloudsFromOpenGLControl())
            {
                return;
            }



            //------------------
            //ICP
            ICPLib.IterativeClosestPointTransform icpInstance = new ICPLib.IterativeClosestPointTransform();
            icpInstance.Settings_Reset_RealData();

            icpInstance.ICPSettings.ICPVersion = ICP_VersionUsed.Scaling_Zinsser;
            icpInstance.ICPSettings.MaximumNumberOfIterations = 50;
            //icpInstance.ICPSettings.KDTreeMode = KDTreeMode.Rednaxela_ExcludePoints;
            icpInstance.ICPSettings.KDTreeMode = KDTreeMode.Rednaxela;


            PointCloudVertices pointCloudResult = icpInstance.PerformICP(this.pSource.ToPointCloudVertices(), this.pTarget.ToPointCloudVertices());

            pointCloudResult.AddPointCloud(this.pTarget.ToPointCloudVertices());
            SaveResultCloudAndShow(pointCloudResult);
            this.registrationMatrix = icpInstance.Matrix;
            registrationMatrix.Save(GLSettings.PathModels, "registrationMatrix.txt");
        }
Exemplo n.º 2
0
 private void toolStripCalculateRegistrationLoaded_Moved_Click(object sender, EventArgs e)
 {
     if (pointCloudFirstAfterLoad != null)
     {
         registrationMatrix = this.OGLControl.CalculateRegistrationMatrix(this.pointCloudFirstAfterLoad);
         registrationMatrix.Save(GLSettings.PathModels, "registrationMatrix.txt");
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("No Point cloud available");
     }
 }
Exemplo n.º 3
0
        private void Clouds_PCA()
        {
            if (!GetFirstTwoCloudsFromOpenGLControl())
            {
                return;
            }


            PCA pca = new PCA();

            pca.MaxmimumIterations = 1;
            PointCloudVertices pointCloudResult = pca.AlignPointClouds_SVD(this.pSource.ToPointCloudVertices(), this.pTarget.ToPointCloudVertices());

            pointCloudResult.AddPointCloud(this.pTarget.ToPointCloudVertices());

            SaveResultCloudAndShow(pointCloudResult);
            this.registrationMatrix = pca.Matrix;
            registrationMatrix.Save(GLSettings.PathModels, "registrationMatrix.txt");
        }
Exemplo n.º 4
0
 private void toolStripCalculateRegistration1_2_Click(object sender, EventArgs e)
 {
     registrationMatrix = this.OGLControl.CalculateRegistrationMatrix1_2();
     registrationMatrix.Save(GLSettings.PathModels, "registrationMatrix.txt");
 }