Link Search Menu Expand Document

Workshoptrees - Cockroach on trees


Authors: damien.gilliard@epfl.ch, joseph.tannous@epfl.ch, andrea.settimi@epfl.ch

This tutorial was made for a workshop held at IBois, EPFL for the studio Weinand (directed by Prof. Yves Weinand, under the supervision of Dr. Agathe Mignon ). The goal of the workshop is to introduce students to point cloud processing of a forest parcel in order to extract trees’ polysurfaces. Students will use these irregular geometries to design structures.

The tutorial uses open-source 3D point clouds from The Center of Excellence in Laser Scanning Research. For more information: International benchmarking of terrestrial laser scanning approaches for forest inventories (Liang et al 2018).. The cropped data converted to .e57 can be accessed here


We propose to start from a point cloud section of your choice from the highlighted link above. First, import the point cloud in Rhino. The simplest is to drag and drop in the Rhino workspace, or on the Rhino icon if Rhino is not open.



0 Remove Ground

We recommend removing the ground manually (For this workshop, fiddling with ransac may not be the most suitable option).To remove some points from a point cloud in Rhino, hold ctrl + shift and select with the mouse the region you want to select, then press delete.

1 Downsample

For further computation, it might be better to downsample the point cloud. For this, use the Cockroach_Downsample(n_points) command. This command takes as argument the number of points you want in the result point cloud.

img_2

Original point cloud with 10 000 000 points on the left, downsampled point cloud with 200 000 points on the right

We recommend using:

Cockroach_Downsample(200000)



Once the point cloud is downsampled, we can start the processing:

2 Remove statistical outliers

The next step we propose is to remove the “statistical outliers”, that is, points that probably are errors or unimportant points because they are too isolated to be significant.

Cockroach_RemoveStatisticalOutliers(Neighbours, ratio)

Of course, the limit between significant and insignificant is quite vague, depending on the point cloud, and we encourage you to test some variation of the parameters we propose. Nevertheless, on our test point cloud, those parameters yielded good results.

Run the following commands:

Cockroach_RemoveStatisticalOutliers(1000 0.4)
Cockroach_RemoveStatisticalOutliers(1000 0.4)
Cockroach_RemoveStatisticalOutliers(800 0.5)
Cockroach_RemoveStatisticalOutliers(800 0.5)
Cockroach_RemoveStatisticalOutliers(800 0.5)

Those parameters (especially the 0.4 and 0.5) are quite aggressive. It states that the points must be at least by a group of 1000 and that we are quite strict when accepting a point as part of a group.

img_5

From left to right: original PC, then after 1,2,3,4,5 statistical removals

img_6

The result after the successive stastistical removals

The result should be different groups of points, some easily identifiable as trunks (and possibly entire small trees)

3 Euclidian clustering

The last step we propose is the Euclidian clustering, called with the command:

Cockroach_ClusterEuclidianKSearch( Neighbours , DistanceThreshold , MinClusterSize, Color)

Try:

Cockroach_ClusterEuclidianKSearch( 30 , 0.005 , 3000, True)

Euclidian clustering means that we create groups of points purely based on distance. We set the minimum number of points in a group and the distance threshold. Based thereon, the pointcloud is subdivided into smaller pointclouds. By ungrouping, you can select them individually.

img_7

Result of Cockroach_ClusterEuclidianKSearch( 30 , 0.005 , 3000, True)



4 Cleanup and sections

We then recommand to clean up the trunk, as it still inludes small branches.

img_8

Hand selection of the points to delete

We then generate the point cloud cross section with the rhino command PointCloudContour()

You will need to generate closed sections:

The parameters for PointCloudContour()

img_9

The result of the PointCloudContour()



5 Creating a closed Brep

To create a closed brep, we propose to execute a short python code donloadable here. To do so, type RunPythonScript in the command line of Rhino. In the opened the window, select the .py code you just downloaded.

You should be presented with this prompt:

Admitted ratio for contour Bounding rectangle <1.6>:

Press Enter, then select the curves.

The result will be a closed Brep: img_10

The intended result of this tutorial: Closed breps approximating the segmented and cleaned point clouds