Performing Plane Leveling on Point Clouds
////////////////////////////////////////////////// // The code shows how to perform plane leveling // // on point clouds // ////////////////////////////////////////////////// // find the reference plane on the point cloud E3DPlane ref_plane; EPointCloud point_cloud; // define the ground plane as the plane Z=0 E3DPlane ground_plane(E3DPlane::ZPlane()); // get the transformation that moves // the reference plane to the ground plane E3DTransformMatrix transformation; transformation = ref_plane.GetTransformationTo(ground_plane); // apply the transformation to the point cloud EAffineTransformer transformer; transformer.ApplyMatrix(transformation, point_cloud);
////////////////////////////////////////////////// // The code shows how to perform plane leveling // // on point clouds // ////////////////////////////////////////////////// // find the reference plane on the point cloud E3DPlane ref_plane = new E3DPlane(); EPointCloud point_cloud = new EPointCloud(); // define the ground plane as the plane Z=0 E3DPlane ground_plane = E3DPlane.ZPlane(); // get the transformation that moves // the reference plane to the ground plane E3DTransformMatrix transformation; transformation = ref_plane.GetTransformationTo(ground_plane); // apply the transformation to the point cloud EAffineTransformer.ApplyMatrix(transformation, point_cloud);