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 }
ColorOcTree.h
main
int main(int, char **argv)
Definition: color_tree_histogram.cpp:8
octomap::ColorOcTree
Definition: ColorOcTree.h:108
octomap::OcTreeBaseImpl::readData
std::istream & readData(std::istream &s)
octomap.h
octomap::ColorOcTree::writeColorHistogram
void writeColorHistogram(std::string filename)
Definition: ColorOcTree.cpp:208
octomap


octomap
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Tue Dec 12 2023 03:39:40