使用点云给点云赋值
- 方法1:
直接使用=
each_board_edge_pc_v[0] = each_board_edge_pc_v[1];
- 方法2:
使用swap()
函数
each_board_edge_pc_v[0].swap(each_board_edge_pcl_v[1]);
该方法可用于交换两个点云。
- 方法3
使用pcl::copyPointCloud()
PCL_EXPORTS void pcl::copyPointCloud ( const pcl::PCLPointCloud2 & cloud_in,
const std::vector< int > & indices,
pcl::PCLPointCloud2 & cloud_out
)
PCL_EXPORTS void pcl::copyPointCloud ( const pcl::PCLPointCloud2 & cloud_in,
pcl::PCLPointCloud2 & cloud_out
)
该方法可用于拷贝部分点云,拷贝全部点云等
- 拼接两个点云
使用pcl::concatenatePointCloud()
函数
bool pcl::concatenatePointCloud ( const pcl::PCLPointCloud2 & cloud1,
const pcl::PCLPointCloud2 & cloud2,
pcl::PCLPointCloud2 & cloud_out
)