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",