Upsampling method for an input cloud using MovingLeastSquares method of PCL
| Format | Description |
|---|---|
| .pcd | Point Cloud Data file format |
| .ply | Polygon file format |
| .txt | Text file format |
| .xyz | X Y Z Text file format |
- unsampled_cloud.pcd
Usage: ./upsampling_cloud [options] Optional arguments: -h --help shows help message and exits [default: false] -v --version prints version information and exits [default: false] --cloudfile input cloud file [required] --search-radius search radius value [default: 0.03] --sampling-radius sampling radius value [default: 0.005] --step-size step size [default: 0.005] -o --output-dir output dir to save upsampled cloud [default: "-"] (not configured) -d --display display upsampling in the pcl visualizer [default: false]This projects depends on the Point Cloud Library (it works with version 1.8...1.12.1) and its dependencies.
| Package | Version | Description |
|---|---|---|
| VTK | 9.0.0 | Visualization toolkit |
| PCL | 1.12.1 | The Point Cloud Library (PCL) |
| Eigen | 3.7.7 | Eigen is a library of template headers for linear algebra |
| Flann | 1.9.1 | Fast Library for Approximate Nearest Neighbors |
| Boost | 1.77.0 | Provides support for linear algebra, pseudorandom number generation, multithreading |
| OpenGL | 21.2.6 | Programming interface for rendering 2D and 3D vector graphics. |
- Download source code
git clone https://github.com/danielTobon43/upsamplingCloudPCL- Create a "build" folder at the top level of the upsamplingCloudPCL
cd upsamplingCloudPCL/ && mkdir build- Compile with CMake
cd build/ && cmake ../ && makecd /build ./upsampling_cloud --cloudfile <path/to/cloud-file>You can modify the parameters to obtain better results here
mls.setComputeNormals(true); mls.setInputCloud(input_cloud); mls.setSearchMethod(kd_tree); mls.setSearchRadius(search_radius); mls.setUpsamplingMethod(pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>::UpsamplingMethod::SAMPLE_LOCAL_PLANE); mls.setUpsamplingRadius(sampling_radius); mls.setUpsamplingStepSize(step_size); mls.setPolynomialOrder(pol_order); mls.setSqrGaussParam(gauss_param);// (the square of the search radius works best in general) mls.setCacheMLSResults(true);//Set whether the mls results should be stored for each point in the input cloud. mls.setNumberOfThreads(num_threats);

