color_tree_histogram.cpp
Go to the documentation of this file.
1 #include <octomap/octomap.h>
2 #include <octomap/ColorOcTree.h>
3 
4 using namespace std;
5 using namespace octomap;
6 
7 
8 int main(int argc, char** argv) {
9 
10  std::string filename(argv[1]);
11 
12  std::ifstream infile(filename.c_str(), std::ios_base::in |std::ios_base::binary);
13  if (!infile.is_open()) {
14  cout << "file "<< filename << " could not be opened for reading.\n";
15  return -1;
16  }
17 
18  ColorOcTree tree (0.1);
19  tree.readData(infile);
20  infile.close();
21  cout << "color tree read from "<< filename <<"\n";
22 
23  tree.writeColorHistogram("histogram.eps");
24 
25  return 0;
26 }
void writeColorHistogram(std::string filename)
std::istream & readData(std::istream &s)
int main(int argc, char **argv)


octomap
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Fri Jun 7 2019 21:17:32