summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/test_colortable.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/test_colortable.cc')
-rw-r--r--2005/i/robert/src/ovision/see/test_colortable.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/2005/i/robert/src/ovision/see/test_colortable.cc b/2005/i/robert/src/ovision/see/test_colortable.cc
new file mode 100644
index 0000000..b803093
--- /dev/null
+++ b/2005/i/robert/src/ovision/see/test_colortable.cc
@@ -0,0 +1,49 @@
+// test_group.cc
+// robert - Programme du robot APBteam
+// Copyright (C) 2005 Olivier Gaillard
+
+#include <iostream>
+#include <vector>
+#include <string>
+
+#include "segmLearn.hh"
+#include "segmTable.hh"
+#include "colorTable.hh"
+#include "oconfig.hh"
+#include "imgInterface.hh"
+
+int
+main(int argc, char **argv)
+{
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // Usage
+ if (argc < 2)
+ {
+ std::cout << "Usage : test_colortable <filename>" << std::endl;
+ return 1;
+ }
+ /////////////////////////////////////////////////////////////////////////////////////////
+ /// Initialisation des classes
+ OConfig *oconfig_;
+ try
+ {
+ oconfig_ = new OConfig ("rc/vision.conf");
+ }
+ catch (std::string &e)
+ {
+ std::cerr << e << std::endl;
+ return 1;
+ }
+ ImgInterface img;
+ img.loadRaw (argv[1], Image::rgb, 360, 296);
+ ColorTable tab;
+ SegmTable segm (tab);
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // Création de l'image segmentée
+ segm.segmImg (&img);
+ img.doImg ();
+ img.writeRaw ("shots/segm.rgb");
+ return 0;
+}
+
+