UBUNTU读取一个LAS,转换为图片
时间: 2023-05-24 18:07:33 浏览: 63
1.首先安装las2img工具
```
sudo apt-get install libgdal-dev
sudo apt-get install libgflags-dev
sudo apt-get install libproj-dev
git clone https://github.com/LASzip/LASlib.git
git clone https://github.com/PDAL/PDAL.git
cd PDAL && mkdir build && cd build
cmake ..
make
make install
cd /usr/local/bin
ln -s /usr/local/bin/pdal-config /usr/bin/pdal-config
cd -
git clone https://github.com/PDAL/las2img.git
cd las2img
mkdir build && cd build
cmake ..
make
make install
```
2.使用las2img生成图片
```
las2img --input input.las --width 1024 --height 1024 --bands RGB --scale auto
```
其中:
--input: las文件路径
--width: 图片宽度
--height: 图片高度
--bands: 输出图片格式,可选BW、RGB、CIR
--scale: 选择颜色表,auto根据文件内容自动生成颜色表
结果为output.png。