Skip to content

Commit 236d51c

Browse files
authored
Update README.md
1 parent 1a907ec commit 236d51c

File tree

1 file changed

+81
-30
lines changed

1 file changed

+81
-30
lines changed

README.md

+81-30
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,101 @@
11
# upsamplingCloudPCL
2-
Upsampling method for an input cloud using mls method of PCL 1.9.1
2+
Upsampling method for an input cloud using [MovingLeastSquares](https://pointclouds.org/documentation/classpcl_1_1_moving_least_squares.html) method of PCL
33

44
## Input file structure support
55

6-
* .pcd
7-
* .ply
8-
* .txt
9-
* .xyz
6+
| Format | Description |
7+
| ----------- | ----------- |
8+
| .pcd | Point Cloud Data file format |
9+
| .ply | Polygon file format |
10+
| .txt | Text file format |
11+
| .xyz | X Y Z Text file format |
1012

1113
## Output file structure (.pcd)
1214

1315
* unsampled_cloud.pcd
1416

1517
## Example
16-
<img src="./example/example.png" align="center" height="400" width="720"><br>
18+
<p align="center">
19+
<img src="./example/example.png"><br>
20+
</p>
21+
22+
<p align="center">
23+
<img src="https://user-images.githubusercontent.com/35694200/183946061-12df0269-fcc1-4fa3-a635-c2a86d5ba879.png"><br>
24+
</p>
25+
26+
<p align="center">
27+
<img src="https://user-images.githubusercontent.com/35694200/183946790-f34f6129-6e21-4d4c-bd1c-1066c630943b.png"><br>
28+
</p>
29+
30+
31+
## Command line
32+
```cpp
33+
Usage: ./upsampling_cloud [options]
34+
35+
Optional arguments:
36+
-h --help shows help message and exits [default: false]
37+
-v --version prints version information and exits [default: false]
38+
--cloudfile input cloud file [required]
39+
--search-radius epsilon value [default: 0.03]
40+
--sampling-radius epsilon value [default: 0.005]
41+
--step-size epsilon value [default: 0.005]
42+
-o --output-dir output dir to save clusters [default: "-"]
43+
-d --display display clusters in the pcl visualizer [default: false]
44+
```
45+
46+
## Dependencies
47+
This projects depends on the Point Cloud Library (it works with version `1.8...1.12.1`) and its dependencies.
48+
| Package | Version | Description |
49+
| ----------- | ----------- | ----------- |
50+
| VTK | 9.0.0 | Visualization toolkit |
51+
| PCL | 1.12.1 | The Point Cloud Library (PCL) |
52+
| Eigen | 3.7.7 | Eigen is a library of template headers for linear algebra |
53+
| Flann | 1.9.1 | Fast Library for Approximate Nearest Neighbors |
54+
| Boost | 1.77.0 | Provides support for linear algebra, pseudorandom number generation, multithreading |
55+
| OpenGL | 21.2.6 | Programming interface for rendering 2D and 3D vector graphics. |
56+
1757

18-
-------------------
1958
## Compilation
20-
* Set "YOUR OWN" PCL Build DIR in CMakeList.txt e.g: **/opt/pcl-1.9.1/build** and save it.
21-
* Create a "build" folder
59+
### Compile from source
60+
61+
1. Download source code
62+
63+
```bash
64+
git clone https://github.com/danielTobon43/upsamplingCloudPCL
65+
```
2266

23-
in the main folder:
67+
2. Create a "build" folder at the top level of the upsamplingCloudPCL
2468

25-
- cd build
26-
- cmake ../src/
27-
- make
28-
69+
```bash
70+
cd upsamplingCloudPCL/ && mkdir build
71+
```
72+
73+
3. Compile with CMake
74+
75+
```bash
76+
cd build/ && cmake ../ && make
77+
```
2978
3079
### Test
80+
```bash
81+
cd /build
82+
./upsampling_cloud --cloudfile <path/to/cloud-file>
83+
```
3184

32-
cd /build
33-
./upsampling_cloud <cloud file>
34-
3585
## Note
3686

37-
You can modify the parameters to obtain better results
38-
39-
mls.setComputeNormals(true);
40-
mls.setInputCloud(input_cloud);
41-
mls.setSearchMethod(kd_tree);
42-
mls.setSearchRadius(search_radius);
43-
mls.setUpsamplingMethod(pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>::UpsamplingMethod::SAMPLE_LOCAL_PLANE);
44-
mls.setUpsamplingRadius(sampling_radius);
45-
mls.setUpsamplingStepSize(step_size);
46-
mls.setPolynomialOrder(pol_order);
47-
mls.setSqrGaussParam(gauss_param);// (the square of the search radius works best in general)
48-
mls.setCacheMLSResults(true);//Set whether the mls results should be stored for each point in the input cloud.
49-
mls.setNumberOfThreads(num_threats);
87+
You can modify the parameters to obtain better results [here](https://github.com/danielTobon43/upsamplingCloudPCL/blob/master/src/main.cpp#:~:text=void%20upsampling(pcl,Ptr%26%20output_cloud)%20%7B)
5088

89+
```cpp
90+
mls.setComputeNormals(true);
91+
mls.setInputCloud(input_cloud);
92+
mls.setSearchMethod(kd_tree);
93+
mls.setSearchRadius(search_radius);
94+
mls.setUpsamplingMethod(pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>::UpsamplingMethod::SAMPLE_LOCAL_PLANE);
95+
mls.setUpsamplingRadius(sampling_radius);
96+
mls.setUpsamplingStepSize(step_size);
97+
mls.setPolynomialOrder(pol_order);
98+
mls.setSqrGaussParam(gauss_param);// (the square of the search radius works best in general)
99+
mls.setCacheMLSResults(true);//Set whether the mls results should be stored for each point in the input cloud.
100+
mls.setNumberOfThreads(num_threats);
101+
```

0 commit comments

Comments
 (0)