Gethmini Senevirathna
Gethmini Senevirathna

Reputation: 73

How to convert las file to ply file?

I want to open my 3D point cloud in MATLAB. But they are in .las files. How can I display them in MATLAB???

I heard about .ply file can open 3D point data on MATLAB. So I want to know how to convert las files to ply files.

Upvotes: 4

Views: 15643

Answers (3)

Gabriel Devillers
Gabriel Devillers

Reputation: 4002

You can use the free and open-source CloudCompare software.

On the command line:

CloudCompare -O file_to_convert.las -C_EXPORT_FMT PLY -SAVE_CLOUDS

Take care to the order of the options: it seems that -SAVE_CLOUDS must be at the end.

That will result in a binary-format PLY file in the same directory as the file to convert, named using the original filename and the date of export, like: file_to_convert_2019-07-18_13h32_06_751.ply

I found no way to specify the output file name (should you find one please comment below).

Should you want a more predictable name, add option -NO_TIMESTAMP before the option -SAVE_CLOUDS (but then you risk overwriting files so be careful).

More help (such as how to export in ASCII-format) in the documentation.

I timed this on powerful PC, it took 170s to convert a 2.7GB LAS file with 102M points (XYZ,intensity,time).

Upvotes: 5

vonDoomhammer
vonDoomhammer

Reputation: 31

if you have LAStools installed, you can use las2txt to convert your *.las/*.laz files into *.xyz format which MeshLab can import natively as a point cloud, which may then be converted into a Mesh.

There are a multitude of caveats to that depending on the source of your data-set.

Upvotes: 3

David de la Iglesia
David de la Iglesia

Reputation: 2534

There is a .las file reader for matlab here:

https://es.mathworks.com/matlabcentral/fileexchange/48073-lasdata

Once you have the data in matlab you can use these point cloud tools, which are part of the computer vision toolbox:

https://es.mathworks.com/help/vision/3-d-point-cloud-processing.html

If you want to embrace the open source force, I'm writing a Python (easy transition from matlab) library for point cloud processing:

https://github.com/daavoo/pyntcloud

Upvotes: 4

Related Questions