zoukankan      html  css  js  c++  java
  • PCL 编程多个点云合成

    博客转载自:https://blog.csdn.net/sunboyiris/article/details/72636809

    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloudadd(new pcl::PointCloud<pcl::PointXYZRGBA>);
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>);
    pcl::io::loadPLYFile("000.ply", *cloud);
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud1(new pcl::PointCloud<pcl::PointXYZRGBA>);
    pcl::io::loadPLYFile("001.ply", *cloud1);
    	
    *cloudadd = *cloud + *cloud1;
    pcl::io::savePLYFileBinary("test_pcd.ply", *cloudadd);
     
    cloud->clear();
    pcl::io::loadPLYFile("002.ply", *cloud);
    *cloudadd = *cloudadd + *cloud;
     
    	cloud->clear();
    	pcl::io::loadPLYFile("003.ply", *cloud);
    	*cloudadd = *cloudadd + *cloud;
     
    	cloud->clear();
    	pcl::io::loadPLYFile("004.ply", *cloud);
    	*cloudadd = *cloudadd + *cloud;
     
    	cloud->clear();
    	pcl::io::loadPLYFile("005.ply", *cloud);
    	*cloudadd = *cloudadd + *cloud;
     
    	cloud->clear();
    	pcl::io::loadPLYFile("006.ply", *cloud);
    	*cloudadd = *cloudadd + *cloud;
     
    	cloud->clear();
    	pcl::io::loadPLYFile("007.ply", *cloud);
    	*cloudadd = *cloudadd + *cloud;
     
    	pcl::io::savePLYFileBinary("last.ply", *cloudadd);
     
    	pcl::visualization::CloudViewer viewer("Cloud Viewer");
     
    	viewer.showCloud(cloud);
     
    	while (!viewer.wasStopped())
    	{
    		user_data++;
    	}
    

      

  • 相关阅读:
    什么是透视图?
    Eclipse 视图
    Eclipse 菜单
    Eclipse 窗口说明
    Eclipse 修改字符集
    Eclipse 安装(Oxygen版本)
    Eclipse 教程
    jQuery 教程
    就表单验证说用户体验
    需要配置执行path?no
  • 原文地址:https://www.cnblogs.com/flyinggod/p/9478012.html
Copyright © 2011-2022 走看看