Open3D
Open3D copied to clipboard
Add support for IO for e57 and las files
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
mainbranch).
Proposed new feature or change
Add support for IO for e57 and las files
References
e57:
- https://github.com/asmaloney/libE57Format
- http://libe57.org/
- https://www.ri.cmu.edu/pub_files/2011/1/2011-huber-e57-v3.pdf
las and laz:
- https://github.com/ASPRSorg/LAS
- https://laspy.readthedocs.io/en/latest/intro.html
- https://github.com/LASzip/LASzip
- https://github.com/LAStools/LAStools [license?]
Additional information
No response
As a workaround with the python library pye57 (pip install pye57) you can do this:
import numpy as np, open3d as o3d # cannot use numpy 2.0 or greater with open3d 18.0 or lower
import pye57
pc = pye57.E57(r"bunnyFloat.e57") # put your e57 file here
np_arrays = pc.read_scan(0, ignore_missing_fields = True) # repeat for multiple scans
xyz = np.zeros((np.size(np_arrays["cartesianX"]), 3))
xyz[:, 0] = np.reshape(np_arrays["cartesianX"], -1)
xyz[:, 1] = np.reshape(np_arrays["cartesianY"], -1)
xyz[:, 2] = np.reshape(np_arrays["cartesianZ"], -1)
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(xyz)
# Visualise the pointcloud
pcd.paint_uniform_color([0.5, 0.5, 0.5])
pcd.estimate_normals()
pcd.orient_normals_consistent_tangent_plane(1)
o3d.visualization.draw([pcd])