test.cpp 840 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Beispielhafter Aufruf: BUILD_x86_64/progs/testSemanticSegmentation -config <CONFIGFILE>
  2. /**
  3. * @file test.cpp
  4. * @brief simple test program for everything
  5. * @author Björn Fröhlich
  6. * @date 03/10/2010
  7. */
  8. #ifdef NICE_USELIB_OPENMP
  9. #include <omp.h>
  10. #endif
  11. #include <iostream>
  12. #include <fstream>
  13. #include "objrec/segmentation/RSMeanShift.h"
  14. #include "objrec/segmentation/RSCache.h"
  15. #include "objrec/baselib/Globals.h"
  16. using namespace std;
  17. using namespace OBJREC;
  18. int main(int argc, char **argv)
  19. {
  20. Image tmp(101,195);
  21. tmp.set(0);
  22. string infile = "/home/froehlich/Desktop/wichtiges/coind/out.txt";
  23. ifstream in(infile.c_str());
  24. while(!in.eof())
  25. {
  26. int x,y,v;
  27. in >> x;
  28. in >> y;
  29. in >> v;
  30. if(v == 0)
  31. v = 1;
  32. tmp.setPixel(x,y,v);
  33. }
  34. tmp.write("/home/froehlich/Desktop/wichtiges/coind/out.pgm");
  35. return 0;
  36. }