我会使用 PCL 1.6 将 GreedyProjectionTriangulation 生成的网格可视化。
我发现我必须使用
pcl::visualization::PCLVisualizer.addPolygonMesh()
但我的问题是如何使用 PCLVisualizer 而不是
pcl::visualization::CloudViewer
还可以获取流媒体。
我试过这个:
http://www.pcl-users.org/Simple-Kinect-viewer-that-writes-a-PCD-tp3883792p3940787.html
还有解决的建议
http://www.pcl-users.org/Simple-Kinect-viewer-that-writes-a-PCD-tp3883792p3954525.html
那是给函数 openNIGrabber 添加参数。 无论如何,编译器没问题,但是当我运行它时它会中止。我正在使用 VS2010 64 位
有人可以建议我另一种解决方案吗?
最佳答案
这适用于 pcl 1.8 和 PCL 1.7.2:
pcl::PolygonMesh mesh;
pcl::io::loadPolygonFileOBJ("table.obj",mesh);
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
viewer->setBackgroundColor (0, 0, 0);
viewer->addPolygonMesh(mesh,"meshes",0);
viewer->addCoordinateSystem (1.0);
viewer->initCameraParameters ();
while (!viewer->wasStopped ()){
viewer->spinOnce (100);
boost::this_thread::sleep (boost::posix_time::microseconds (100000));
}
关于c++ - 使用 PCLVisualizer 可视化 PCL 1.6 的网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20958844/