Concatenate point clouds
Introduction
We give an easy and straightforward approach to concatenate several pcd files by using PCL but without any optimizations.
Folder Structure
Con_PL -- con_pl.cpp
-- pcd (folder)
-- 000000.pcd
-- 000001.pcd
-- 000002.pcd
-- ...
Source Code
#include <iostream> //standard input output
#include <pcl/io/pcd_io.h> //PCD headfile in PCL
#include <pcl/point_types.h> // PCL对各种格式的点的支持头文件
using namespace std;
using namespace pcl;
int main (int argc, char** argv)
{
int count,i ;
char format[512]={
0};
char namelist_in[1024][1024]={
0};
cout <<"Input the number of PCDs to concatenate: \n";
cin >> count;
sprintf(format,"./pcd/%%%d%dd.%s"

这篇博客介绍了如何使用PCL库不进行优化地简单拼接多个pcd文件。虽然这种方法不适合处理大量点云文件,因为可能引发内存溢出问题,但可以考虑每拼接50次就将结果保存到硬盘,然后重新读取以避免内存问题。
最低0.47元/天 解锁文章
911

被折叠的 条评论
为什么被折叠?



