IT

Laser scanning, SLAM and LiDAR · 26 March 2018

How to simplify and lighten a point cloud

Too many points for your PC? Subsample a photogrammetric or laser scanning point cloud in CloudCompare with the random, space or octree methods.

Clicking loads the video from YouTube: Google will receive your IP address and may store data on your device. Privacy · Watch it on YouTube

If you’ve received a point cloud from an aerial photogrammetric or laser scanning survey and want to simplify it, in this article I’ll explain how to do it with the open source software CloudCompare.

Point clouds

A point cloud is a set of points in space that reproduces an object or a landscape in three dimensions.
A point cloud is the result of a photogrammetric survey processed with Structure from Motion software.
A laser scanning survey also outputs a point cloud.

A thought on point clouds

Before tackling the subject of this post, here’s a thought on point clouds I published a few weeks ago on LinkedIn.

The point cloud is the real result of an aerial photogrammetric or laser scanning survey!

The plan and elevation drawing placed on the regional map is important.
The textured 3D model you can rotate is nice.
The online 3D model you can explore with measuring tools is handy.
Aerial photos are useful for an unusual view.

But the real value lies in the point cloud!

It’s lots of points (often coloured), georeferenced (or at least they should be!) in 3D space.
All the outputs above come from here (almost all, not the aerial photos…), and here is all the topographic information about the surveyed site.

I believe the point cloud should be delivered to the client of a survey.
I do it.
You can import it into CAD, now into some GIS, or work on it with various programs to derive DSMs, DTMs, contour lines, sections and profiles.

Delivering a point cloud is a “win-win” deal for surveyor and client.
The surveyor no longer has to help the client extract data (“make me this section”, “draw me a profile”, …).
The client has access to all the data and processes them with their own unique judgement, extracting the information needed for their specific purposes.

CloudCompare

CloudCompare is open source software born to compare point clouds from laser scanning surveys.
Over time it has been extended with advanced and interesting tools and plugins.

It’s excellent software that I personally use a lot to handle the results of drone aerial photogrammetric surveys.

I’d written two articles on using it to get sections from point clouds.
You’ll find them here: a cross-section from a point cloud, cross-sections with CloudCompare.
And an article on how to extract contour lines from a point cloud.

Simplifying a point cloud

A point cloud to simplify in CloudCompare

It isn’t unusual to receive a point cloud from a photogrammetric survey with five, ten or twenty million points!
The points are very close together, they’re coloured and the reconstructed 3D model is really beautiful!
Your computer, though, doesn’t see it that way.
If you don’t have tonnes of RAM, racing processors and graphics cards packed with dedicated memory, you may struggle to handle files with so much information.
If you don’t do photogrammetry and laser scanning but use the results of these surveys, your computer probably has excellent specs for CAD, GIS or Office work but struggles a bit with 3D, even unrendered.

That’s why you might want to simplify a point cloud, lightening it by removing some of the points.

CloudCompare lets you do it and choose how.

Import and select the point cloud

First you need to import the point cloud into CloudCompare.

Then you need to select it to activate the processing functions.
You do this by clicking the “Cloud” object in the “DB Tree” panel, on the left of the workspace.

Once selected, in the “Properties” window you can read all the cloud’s characteristics, including the total number of points.

Number of points of a point cloud to simplify in CloudCompare

The Subsample function

To simplify a point cloud you choose the Subsample function.
You’ll find it in the “Edit – Subsample” menu or by clicking the toolbar button you see in the image below.

Simplifying a point cloud with the subsample command in CloudCompare

A window will open where you choose how to simplify the point cloud, between three options: random, space and octree.

Random subsampling mode

In Random mode you can set the final number of points of the lightened cloud with a slider (move it left or right) or by typing the number of points in the dedicated field.
CloudCompare will simplify the cloud randomly to reach the number of points set.
Actually the algorithm doesn’t work completely at random but takes some account of the spatial distribution of the points to give a sensible result.
If the procedure were entirely random, you’d theoretically risk unsimplified portions and more obvious holes where the algorithm went to town…

What happens, though, is that portions of the cloud where the concentration of points is higher because of the nature of the surveyed object aren’t taken into account: a rock spur has a higher concentration of points than a concrete slab, just as the roof of a building has more points than a football pitch…

Simplifying a point cloud in random mode in CloudCompare

Space subsampling mode

A rather interesting algorithm for simplifying a point cloud is space mode.
Selecting “Space” in the drop-down menu, you can set the minimum distance you want to keep between the points of the simplified cloud.

The simplification algorithm removes points from the cloud so that no remaining point is closer to its neighbours than the chosen minimum distance.
The larger the spatial value selected, the fewer points are kept.

You should know that CloudCompare uses implicit units!
The unit depends on how the survey was done.
If you surveyed in millimetres, 1 corresponds to a millimetre.
If you surveyed in metres, 10 is ten metres.

It’s important to know this, so you can choose knowingly the minimum distance to keep between the points of the simplified cloud.
0.01 in a survey done in metres corresponds to 1 cm.

Simplifying a point cloud in space mode in CloudCompare

Octree subsampling mode

Octree mode lets you choose an octree subdivision level at which the cloud will be simplified.

The octree is a particularly important structure used in CloudCompare: it partitions the volume occupied by the 3D object into cubic cells, smaller and smaller.
You start from one cube enclosing everything, then divide each cube into eight smaller ones.
And so on down to the detail…

The concept of an octree isn’t simple or intuitive.
I often get confused.
I’d rather not go further, because it wouldn’t be very useful to you.

It’s enough to know that the higher the level, the smaller the cells and the more points will be kept in the lightening process.

Personally, I never use this subsampling option.

Simplifying a point cloud in octree mode in CloudCompare

The simplified point cloud

At the end of the simplification procedure, CloudCompare adds a simplified point cloud to the “DB Tree” panel.

A simplified point cloud in the open source software CloudCompare

By switching the original and simplified clouds on and off, you can see how the algorithm worked and, if needed, repeat the procedure to remove more points.

Exporting the point cloud

Once you’re happy with the simplification, you can export the point cloud in the format you prefer.

Select the cloud in the DB Tree panel and then, with the Save as command, choose among the available formats: dxf, las, laz, ply, shp, e57, ascii, …

I hope this article helps you simplify a point cloud so you can handle it as well as possible in the software you use every day for your work and projects.

If you have doubts or need specific clarification, don’t hesitate to contact me however you prefer.

See you soon!

Paolo Corradeghini

I published a video on the YouTube channel about this very procedure. The video is in Italian.

← All articles