public static float Test8_CubeOutliers_Translate(ref PointCloud mypointCloudTarget, ref PointCloud mypointCloudSource, ref PointCloud mypointCloudResult) { mypointCloudTarget = PointCloud.CreateCube_Corners_CenteredAt0(20); mypointCloudSource = PointCloud.CloneAll(mypointCloudTarget); PointCloud.Translate(mypointCloudSource, 0, -300, 0); PointCloud.CreateOutliers(mypointCloudSource, 5); mypointCloudResult = IterativeClosestPointTransform.Instance.PerformICP(mypointCloudSource, mypointCloudTarget); return(IterativeClosestPointTransform.Instance.MeanDistance); }
public static float Test8_CubeOutliers_Rotate(ref PointCloud mypointCloudTarget, ref PointCloud mypointCloudSource, ref PointCloud mypointCloudResult) { //mypointCloudTarget = Vertices.CreateCube_Corners(50); PointCloud myPointCloud = ExamplePointClouds.Cuboid("Cuboid", 20f, 40f, 100, System.Drawing.Color.White, null); mypointCloudSource = PointCloud.CloneAll(mypointCloudTarget); Matrix3 R = new Matrix3(); R = R.RotationXYZDegrees(30, 30, 30); PointCloud.Rotate(mypointCloudSource, R); PointCloud.CreateOutliers(mypointCloudSource, 5); mypointCloudResult = IterativeClosestPointTransform.Instance.PerformICP(mypointCloudSource, mypointCloudTarget); return(IterativeClosestPointTransform.Instance.MeanDistance); }