Crop Point Cloud with CloudCompare

Intro

In some cases you might want to only use a certain part of the LiDAR scan. Therefore you need to crop it, which can be done with CloudCompare (free, open-source, multi-platform).

ℹ️ If you are using CloudCompare on a regular basis and/or commercially, then we encourage you to support the open-source project with a donation.

Workflow

ℹ️ The workflow is described for LiDAR Point Clouds, but also works with LiDAR textured meshes.

1. Open Point Cloud

Open CloudCompare and then choose File > Open



Pick the [FaceID]_pointcloud.csv file that you would like to crop. You'll then see the Open Ascii File window. CloudCompare automatically detects the right columns for X/Y/Z and RGB (colour). 

Just make sure to set Skip Lines to so that the first line with column headers is excluded. Additionally, Ignore the HEX_COLOUR column (because colour information is already coming from the RGB columns). FYI. By default CloudCompare will import the HEX_COLOUR column as type label which can lead to issues (CloudCompare might freeze). 

Then press Apply or Apply all.




Depending on the length of XYZ coordinates that are used in the Point Cloud, CloudCompare might ask to perform a shift. This allows CloudCompare to work more efficiently with large datasets but without loosing any data. Simply say Yes without changing any values.




The point cloud will then be shown in CloudCompare's 3D Viewer. 




2. Crop/segment Point Cloud

Select Point Cloud in the DB tree on the left and rotate until it's favourably oriented for segmenting/cropping. You can also use the predefined View icons (top view, side view, etc) in the toolbar on the left. 



Choose segment/crop tool (scissors icon)



Now digitise around the region of the point cloud that you would like to remove. To finish digitising right click.



Now click the segment out button



You'll then see a preview of the crop. 



If you want to keep the segmented/cropped part of the point cloud as a separate point cloud then press the green tick mark. If you only want to keep what is shown in the preview and discard the other part of the point cloud then click the bin icon



🎉 Congrats. You have successfully cropped the point cloud.


You can now export the new point cloud in CSV format by going to File > Save. Make sure that you have the point cloud selected in the DB tree on the left before saving/exporting. 


ℹ️ If your 3D modelling package can handle LAS or LAZ files, then you can save the point cloud in these formats too. LAS/LAZ files are much smaller compared to CSV files.