The CloudViewer is a straight forward,simple piont cloud visualization,meant to get you up and viewing clouds in as little code as possible.
1 #include <pcl/visualization/cloud_viewer.h> 2 #include <iostream> 3 #include <pcl/io/io.h> 4 #include <pcl/io/pcd_io.h> 5 6 int 7 main() 8 { 9 pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>); 10 pcl::io::loadPCDFile("D:\\pcd\\rabbit.pcd", *cloud); 11 pcl::visualization::CloudViewer viewer("Cloud-Viewer"); 12 viewer.showCloud(cloud); 13 while (!viewer.wasStopped(100)) 14 { 15 } 16 return 0; 17 }
原文:https://www.cnblogs.com/larry-xia/p/11049288.html