简体   繁体   English

将 csv 文件转换为 pointCloud 类型

[英]convert a csv file into pointCloud type

I have a csv file for lidar data which contains the x, y, and z coordinates and the intensity like below:_我有一个用于激光雷达数据的 csv 文件,其中包含 x、y 和 z 坐标以及如下所示的强度:_

XCoord,YCoord,ZCoord,Intensity
-5436.108,-284.450,-13.281,33.0
-5436.786,-275.718,-15.141,33.0
-5302.184,-197.274,-0.927,34.0
-5308.833,-183.659,-2.696,33.0
-5309.803,-182.008,-4.463,34.0
-5320.611,-159.565,-5.858,34.0
-5323.79052,-153.348,-7.403,33.0
...............................................................

How is it possilbe to convert it to point of cloud type object?如何将其转换为云类型对象的点?

Since the question is tagged with MATLAB, I explain it in that platform: First, you need to load your input data matrix:由于问题是用 MATLAB 标记的,我在该平台上进行了解释:首先,您需要加载输入数据矩阵:

load('YourPointCloud.mat');

Then, use pcwrite function to save as *.pcd format:然后,使用pcwrite函数保存为*.pcd格式:

pcwrite(ptCloud,'object3d.pcd','Encoding','ascii');

To try your result, you can load the saved file with:要尝试您的结果,您可以使用以下命令加载保存的文件:

pc = pcread('object3d.pcd');

Finally, visualise it with:最后,将其可视化:

pcshow(pc);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM