1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include <iostream> #include <string> #include <pcl/point_types.h> #include <pcl/io/ply_io.h> #include <pcl/io/pcd_io.h> #include <pcl/PCLPointCloud2.h> #include <pcl/visualization/cloud_viewer.h> using namespace pcl; using namespace pcl::io; using namespace std; int main() {<!-- --> pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>); if (pcl::io::loadPLYFile<pcl::PointXYZ>("test.ply", *cloud) == -1) {<!-- --> PCL_ERROR("Couldnot read file.\n"); system("pause"); return(-1); } pcl::visualization::CloudViewer viewer("Cloud Viewer"); viewer.showCloud(cloud); system("pause"); return(0); } |