PCL中不正确的点云可视化

时间:2018-11-20 05:57:28

标签: point-cloud-library point-clouds

我正在通过PCL Visualizer可视化点云。

pcl::PCDReader reader;
pcl::PointCloud<pcl::PointXYZRGB>::Ptr inputCloud(new pcl::PointCloud<pcl::PointXYZRGB>);
reader.read<pcl::PointXYZRGB>("test.pcd", *inputCloud);

boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer(new pcl::visualization::PCLVisualizer("3D Viewer"));
viewer->setBackgroundColor(0, 0, 0);
viewer->addPointCloud<pcl::PointXYZRGB>(inputCloud, "SourceCloud");
while (!viewer->wasStopped())
 {
     viewer->spinOnce(100);
     boost::this_thread::sleep(boost::posix_time::microseconds(100000));
 }

结果,显示了云,但是错误。点沿一些线绘制: Wrong result screenshot

以下是在另一个程序(Bentley Microstation)中显示此云的示例: Right result screenshot

我在哪里弄错了?

此云可以从链接下载: PCD File XYZ File

0 个答案:

没有答案