Skip to content

Commit adc5dfa

Browse files
committed
add readme
1 parent 16f7c22 commit adc5dfa

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed

README.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Contents of this repository
2+
3+
This repo contains various command-line tools that were used during the writing
4+
of my master thesis on the subject of the potential application of the boxcounting
5+
dimension as a vitality measure for trees.
6+
7+
All of these use various parts of the excellent Point Cloud Library:
8+
9+
Rusu, R.B., & Cousins, S., 2011. 3D is here: Point Cloud Library (PCL), in: IEEE
10+
International Conference on Robotics and Automation (ICRA). Shanghai, China.
11+
12+
## Computing the boxcounting dimension from a point cloud
13+
14+
Usage:
15+
16+
```
17+
boxdim.exe minimum_edge_length algorithm point_cloud_file
18+
```
19+
20+
The `minimum_edge_length` corresponds to the cutoff point at which you want
21+
to stop the boxcounting based on the expected point cloud resolution
22+
(the unit of the edge length depens on your point cloud data).
23+
Usually somewhere between 5--10 cm.
24+
25+
Available algorithms:
26+
27+
- "seidel", which is based on:
28+
29+
Sarkar, N., & Chaudhuri, B., 1994. An efficient differential box-counting approach
30+
to compute fractal dimension of image. IEEE Transactions on Systems Man and
31+
Cybernetics 24, 115–120. https://doi.org/10.1109/21.259692
32+
33+
Seidel, D., 2018. A holistic approach to determine tree structural complexity based
34+
on laser scanning data and fractal analysis. Ecology and Evolution 8, 128–134.
35+
https://doi.org/10.1002/ece3.3661
36+
37+
- same algorithm, but using wide registers or the GPU:
38+
- "seidel\_sse" using SEE instructions (fastest in benchmarks, roughly 1 second for a point
39+
cloud with 3.7 million points)
40+
- "seidel\_avx" using AVX instructions
41+
- "seidel\_gpu" using OpenCL to use the GPU (copying the memory to the GPU is too costly
42+
to compete with SSE)
43+
- "cc", based on [CloudCompare's](https://www.cloudcompare.org/) `CCLib/CCMiscTools.cpp`
44+
- "pcl", using `pcl::octree::OctreePointCloudOccupancy`
45+
46+
Supports [PCD](https://pointclouds.org/documentation/tutorials/pcd_file_format.html)
47+
files as well as ASCII text files.
48+
Text files should not contain a header line and each point is represented by one line with
49+
the x, y and z coordinates separated by spaces. Trailing data on the line (up to 255 chars) is ignored.
50+
51+
## Computing the competition index KKL from a point cloud
52+
53+
Usage:
54+
55+
```
56+
compindex.exe voxelEdgeLength methodName coneTipHeight plotCloudFileName treeCloudFileName
57+
```
58+
59+
Arguments:
60+
61+
- voxelEdgeLength: minimum voxel edge length that is used for the voxel grid subsampling;
62+
usually 10 cm, so you would pass it as 0.1 if your point cloud has the unit meters
63+
- methodName: eiter "cone" or "cylinder"
64+
- coneTipHeight: height in relation to the total tree height, where the cone tip will
65+
be placed at, 0.2 for 20 % of the total tree height
66+
- plotCloudFileName: name of the PCD or ASCII file
67+
(see [above](#computing-the-boxcounting-dimension-from-a-point-cloud)) containing
68+
the whole plot or rather the trees sorrounding the subject in question
69+
- treeCloudFileName: name of the PCD or ASCII file
70+
(see [above](#computing-the-boxcounting-dimension-from-a-point-cloud)) containing
71+
**ONLY** the tree that the KKL should be computed for
72+
73+
References:
74+
75+
Metz, J., Seidel, D., Schall, P., Scheffer, D., Schulze, E.-D., & Ammer, C., 2013.
76+
Crown modeling by terrestrial laser scanning as an approach to assess the effect
77+
of aboveground intra- and interspecific competition on tree growth. Forest
78+
Ecology and Management 310, 275–288. https://doi.org/10.1016/j.foreco.2013.
79+
08.014
80+
81+
Seidel, D., Hoffmann, N., Ehbrecht, M., Juchheim, J., & Ammer, C., 2015. How
82+
neighborhood affects tree diameter increment – New insights from terrestrial
83+
laser scanning and some methodical considerations. Forest Ecology and
84+
Management 336, 119–128. https://doi.org/10.1016/j.foreco.2014.10.020
85+
86+
## Diffing point clouds
87+
88+
Usage:
89+
90+
```
91+
diff.exe pointCloudA pointCloudB
92+
```
93+
94+
Will write all the points that are only found in B into a "\_diff" file.
95+
Only supports PCD files.
96+
97+
## Show various stats about a point cloud
98+
99+
Usage:
100+
101+
```
102+
pcstats <input_point_cloud_path> <K nearest neighbours> <top % of tree crown>
103+
```
104+
105+
Arguments:
106+
107+
- K neares neighbours: How many neighbours should be searched for
108+
when calculating average/max nearest neighbour distance etc.
109+
- top % of tree crown: Which part in percent from the top of the tree
110+
should be used for calculating the same statistics as above
111+
112+
Prints out the average distance, average max distance and the overall maximum
113+
for each 2&nbsp;m (the point cloud is assumed to be in units of meters).
114+
The same stats are emitted for the passed top % of the tree crown.
115+
116+
## Euclidean clustering and region segmentation
117+
118+
Produces four point cloud files:
119+
120+
- downsampled
121+
- euclidean-clusters (downsampled)
122+
- \_ec\_region-based-seg (downsampled)
123+
- \_ec\_region-based-seg\_orig (regions transferred to original point cloud based on a
124+
nearest neighbour search)
125+
126+
Usage:
127+
128+
```
129+
region_seg.exe edgeLength pointCloudFile smoothness
130+
```
131+
132+
Arguments:
133+
134+
- edgeLength: edge lengths used for the voxel grid subsampling
135+
(each voxel with the passed in edge length is reduced to their centroid)
136+
- pointCloudFile: name of the PCD file
137+
- smoothness: smoothness used for the region growing
138+
139+
References:
140+
141+
Burt, A., Disney, M., & Calders, K., 2018. Extracting individual trees from lidar
142+
point clouds using treeseg. Methods in Ecology and Evolution. https://doi.org/
143+
10.1111/2041-210x.13121
144+

0 commit comments

Comments
 (0)