简体   繁体   English

如何将多个.pcd 文件组合成一个包含点云数据(python)的单个.pcd 文件?

[英]How to combine multiple .pcd files into a single .pcd file which contains point cloud data (python)?

There are suggestions available in online to use "laser_scan_assembler", but i have no idea how to implement that.网上有使用“laser_scan_assembler”的建议,但我不知道如何实现。

You can simply concatenate the point clouds using the PCL library:您可以使用 PCL 库简单地连接点云:

typedef pcl::PointXYZ PointType;
typedef pcl::PointCloud<PointType> CloudType;

// Load the PCD files
CloudType::Ptr cloud1(new CloudType);
CloudType::Ptr cloud2(new CloudType);
pcl::io::loadPCDFile("cloud1.pcd", *cloud1);
pcl::io::loadPCDFile("cloud2.pcd", *cloud2);

// Put in one output cloud
CloudType::Ptr output(new CloudType);
*output += *cloud1;
*output += *cloud2;

// Save the output file
pcl::io::savePCDFileASCII("output.pcd", *output);

Note that this simply concats the points.请注意,这只是连接点。 The input clouds have to be in the same coordinate system, otherwise a registration is needed first.输入云必须在同一个坐标系中,否则首先需要注册。

You can also use the bash executable pcl_concatenate_points_pcd to concat multiple PCD files.您还可以使用 bash 可执行pcl_concatenate_points_pcd来连接多个 PCD 文件。

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

相关问题 如何在 Python 中使用 PDAL 包将 .las 文件转换为 .pcd 文件 - How to convert .las file to .pcd file using PDAL package in Python 如何将 open3d 几何 PointCloud 输出为 .pcd 文件? - How can I output the open3d geometry PointCloud as .pcd file? 读取 PCD 文件时出现无效起始字节错误 - invalid start byte error while reading PCD files 如何使用 python 从多个 excel 文件中读取和组合特定行到单个文件中? - How to read & combine specific rows from multiple excel files into a single file using python? .ply 格式到 .pcd 格式的转换 - Convertion of .ply format to .pcd format 从 .ply 转换为 .pcd 格式 - Converting from .ply to .pcd format 如何在文本文件中追加数据并使用 python 将多个文本文件合并为一个文本文件? - How do I append the data in text files and combine multiple text files into one text file using python? 如何从具有 python 文件列表的单个文件中打开多个文件以及如何对它们进行处理? - how to open multiple file from single file which is having list of files in python and how to do processing on them? 合并特定文件并将其放在单个文件python中 - Combine specific files and put it in a single file python 如何使用python将多个Excel文件中的数据合并到一个Excel文件中? - How can I use python to combine data from multiple excel files into one excel file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM