将模型结果保存到一个点云里,然后将其突出显示
//显示结果
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();
}