Example #1
0
        public static double Test5_CubeScale_Inhomogenous(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(50);

            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);
            PointCloudVertices.ScaleByVertex(myPCLSource, new Vertex(1, 2, 3));

            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #2
0
        public static double Test2_Identity(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            //myPCLTarget = Vertices.CreateSomePoints();
            myPCLTarget = PointCloudVertices.CreateCube_Corners(50);
            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);


            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #3
0
        public static double Test5_CubeScale_Uniform(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(50);

            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);
            PointCloudVertices.ScaleByFactor(myPCLSource, 0.2f);

            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #4
0
        public static double Test5_Cube8Shuffle(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult, float cubeSize)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(cubeSize);
            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);

            PointCloudVertices.ShuffleTest(myPCLSource);

            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #5
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);
        }
Example #6
0
        public static double Test2_RotationX30Degrees(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            //myPCLTarget = Vertices.CreateSomePoints();
            myPCLTarget = PointCloudVertices.CreateCube_Corners(50);
            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);

            Matrix3d R = Matrix3d.CreateRotationX(30);

            PointCloudVertices.Rotate(myPCLSource, R);


            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #7
0
        public static double Test5_CubeRotate(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(50);

            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);

            Matrix3d R = new Matrix3d();

            R = R.RotationXYZDegrees(90, 124, -274);
            PointCloudVertices.Rotate(myPCLSource, R);

            myPCLResult = IterativeClosestPointTransform.Instance.PerformICP(myPCLSource, myPCLTarget);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #8
0
        public static double Test5_Cube8TranslateRotateShuffleNew(ref PointCloudVertices myPCLTarget, ref PointCloudVertices myPCLSource, ref PointCloudVertices myPCLResult, float cubeSize)
        {
            myPCLTarget = PointCloudVertices.CreateCube_Corners(cubeSize);

            myPCLSource = PointCloudVertices.CloneVertices(myPCLTarget);
            //Model3D myModel = Example3DModels.Cuboid("Cuboid", 20f, 40f, 100, System.Drawing.Color.White, null);

            Matrix3d R = CreateAndPrintMatrix(65, -123, 35);

            PointCloudVertices.Rotate(myPCLSource, R);
            PointCloudVertices.Translate(myPCLSource, cubeSize * 1.2f, -cubeSize * 2.5f, cubeSize * 2);

            PointCloudVertices.ShuffleTest(myPCLSource);

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