Beispiel #1
0
        public static double Test8_CubeOutliers_Translate(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(20);
            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);
            PointCloudVertices.Translate(myPCLSource, 0, -300, 0);
            PointCloudVertices.CreateOutliers(myPCLSource, 5);


            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Beispiel #2
0
        public static double Test8_CubeOutliers_Rotate(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            //myPCLTarget = Vertices.CreateCube_Corners(50);
            Model myModel = Example3DModels.Cuboid("Cuboid", 20f, 40f, 100, System.Drawing.Color.White, null);

            myPCLTarget = myModel.PointCloudVertices;

            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);
            Matrix3d R = new Matrix3d();

            R = R.RotationXYZDegrees(30, 30, 30);
            PointCloudVertices.Rotate(myPCLSource, R);

            PointCloudVertices.CreateOutliers(myPCLSource, 5);


            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }