example_get_max_min_coordinates.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <pcl/io/pcd_io.h>
00003 #include <pcl/point_types.h>
00004 #include <pcl/common/common.h>
00005 
00006 int 
00007 main (int, char**)
00008 {
00009   pcl::PointCloud<pcl::PointXYZ>::Ptr cloud;
00010   cloud = pcl::PointCloud<pcl::PointXYZ>::Ptr (new pcl::PointCloud<pcl::PointXYZ>);
00011   pcl::io::loadPCDFile<pcl::PointXYZ> ("your_pcd_file.pcd", *cloud);
00012   pcl::PointXYZ minPt, maxPt;
00013   pcl::getMinMax3D (*cloud, minPt, maxPt);
00014   std::cout << "Max x: " << maxPt.x << std::endl;
00015   std::cout << "Max y: " << maxPt.y << std::endl;
00016   std::cout << "Max z: " << maxPt.z << std::endl;
00017   std::cout << "Min x: " << minPt.x << std::endl;
00018   std::cout << "Min y: " << minPt.y << std::endl;
00019   std::cout << "Min z: " << minPt.z << std::endl;
00020   return (0);
00021 }


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:23:35