public void Person_PCA_V_TwoClouds_XYZ() { this.pointCloudTarget = new PointCloud(pathUnitTests + "\\2.obj"); pointCloudTarget = PCA.RotateToOriginAxes(pointCloudTarget); this.pointCloudSource = new PointCloud(pathUnitTests + "\\1.obj"); pointCloudSource = PCA.RotateToOriginAxes(pointCloudSource); PCA pca = new PCA(); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudSource, this.pointCloudTarget, 0, 0); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 1, 1); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 2, 2); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 0, 0); Show3PointCloudsInWindow(true); //ShowPointCloudsInWindow_PCAVectors(true); Assert.IsTrue(this.threshold > meanDistance); }
public void Person_PCA() { this.pointCloudTarget = new PointCloud(pathUnitTests + "\\2.obj"); this.pointCloudSource = PointCloud.CloneAll(pointCloudTarget); PointCloud.RotateDegrees(pointCloudSource, 25, 10, 25); PCA pca = new PCA(); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudSource, this.pointCloudTarget, 0, 0); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 1, 1); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 2, 2); this.pointCloudResult = pca.AlignPointClouds_OneVector(this.pointCloudResult, this.pointCloudTarget, 0, 0); Show3PointCloudsInWindow(true); //ShowPointCloudsInWindow_PCAVectors(true); Assert.IsTrue(4e-3f < PointCloud.MeanDistance(pointCloudTarget, pointCloudResult)); }