color_tree_histogram.cpp
Go to the documentation of this file.
00001 #include <octomap/octomap.h>
00002 #include <octomap/ColorOcTree.h>
00003 
00004 using namespace std;
00005 using namespace octomap;
00006 
00007 
00008 int main(int argc, char** argv) {
00009 
00010   std::string filename(argv[1]);
00011 
00012   std::ifstream infile(filename.c_str(), std::ios_base::in |std::ios_base::binary);
00013   if (!infile.is_open()) {
00014     cout << "file "<< filename << " could not be opened for reading.\n";
00015     return -1;
00016   }
00017 
00018   ColorOcTree tree (0.1);
00019   tree.readData(infile);
00020   infile.close();
00021   cout << "color tree read from "<< filename <<"\n"; 
00022 
00023   tree.writeColorHistogram("histogram.eps");
00024 
00025   return 0;
00026 }


octomap
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Thu Feb 11 2016 23:50:59