显示两个点云,突出显示其中一个点云

将模型结果保存到一个点云里,然后将其突出显示

//显示结果
pcl::visualization::PCLVisualizer viewer("Point Cloud Viewer");
// Set point size for cloud1
viewer.setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud1");
// Set point size for cloud2
viewer.setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 10, "Model");
viewer.addPointCloud(std::make_shared<pcl::PointCloud<pcl::PointXYZ>>(*cloud),"cloud1",0);
viewer.addPointCloud<pcl::PointXYZ>(std::make_shared<pcl::PointCloud<pcl::PointXYZ>>(*Model), "Model");
while (!viewer.wasStopped())
{
    
    
	viewer.spinOnce();
}

猜你喜欢

转载自blog.csdn.net/weixin_42295969/article/details/131766788
今日推荐