I would visualize mesh resulting from GreedyProjectionTriangulation using PCL 1.6.
I found I have to use
pcl::visualization::PCLVisualizer.addPolygonMesh()
but my problem is how to use PCLVisualizer and not
pcl::visualization::CloudViewer
to get also the streaming.
I tried this:
http://www.pcl-users.org/Simple-Kinect-viewer-that-writes-a-PCD-tp3883792p3940787.html
and also the suggestion to solve
http://www.pcl-users.org/Simple-Kinect-viewer-that-writes-a-PCD-tp3883792p3954525.html
that is adding arguments to function openNIGrabber. Anyway, for the compiler is ok, but when I run it aborts. I'm using VS2010 64bit
Could someone suggest me another solution?
This works in pcl 1.8 and 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));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With