使用點雲給點雲賦值
- 方法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
)