读取点云文件
string lane_cluster_path="demo.pcd";
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>());
if(pcl::io::loadPCDFile(lane_cluster_path, *cloud)==-1){
cout << "load lane_cluster pcd error!" << endl;
return -1;
}
保存点云文件
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>());
// XXX
std::string save_path = "demo.pcd";
pcl::io::savePCDFileBinary(save_path, *cloud);
标签:PCL,demo,基础,cluster,pcl,path,PointCloud,cloud
From: https://www.cnblogs.com/grdiv/p/17858471.html