Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor

las2pcd How to convert?

csdyang opened this issue · 2 comments

las2pcd How to convert?

same question

This method cannot work in this project

https://www.danielgm.net/cc/
install cloudcompare
open cloudcompare
load las file
save as pcd file

So i hope you will use this instread,

Make Converting Python Script

  1. make requirements.txt
laspy==1.7.1
numpy==1.19.5
pclpy==0.11.0
  1. install packages
$ pip install -r requirements.txt
  1. write code in las2pcd.py
import numpy as np

from pclpy import pcl
import pclpy

src_path = "src.las"
desc_path = "dest.pcd"

def las2pcd():
    pc = pclpy.io.las.read(src_path, "PointXYZ")
    writer = pcl.io.PCDWriter()
    writer.writeBinary(desc_path, pc)
las2pcd()
  1. convert
$ python las2pcd.py