首先把代码附上:
// cancatenatepcd.cpp : 定义控制台应用程序的入口点。
//#include "stdafx.h"
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
int
main(int argc,char** argv)
{
if(argc!=2)
{
std::cerr<<"please specify command line arg '-f' or '-p'"<<std::endl;
exit(0);
}
pcl::PointCloud<pcl::PointXYZ> cloud_a,cloud_b,cloud_c;
pcl::PointCloud<pcl::Normal> n_cloud_b;
pcl::PointCloud<pcl::PointNormal> p_n_cloud_c;
// 创建点云
cloud_a.width=5;
cloud_a.height=cloud_b.height=n_cloud_b.height=1;
cloud_a.points.resize(cloud_a.width*cloud_a.height);
if(strcmp(argv[1],"-p")==0)
{