summaryrefslogtreecommitdiff
path: root/2005/i/robert/src
diff options
context:
space:
mode:
authorgaillaro2005-04-23 19:59:25 +0000
committergaillaro2005-04-23 19:59:25 +0000
commit9d894a3adfcb6cea19f159bfe3de58ae8bce77a1 (patch)
tree5efd81b50306ef42f4ad0baa3e3827be22bb7b35 /2005/i/robert/src
parentefcb9205cacf2f8ddf56bc2622bff1c5189ce5cd (diff)
programme pour generer la colortable
Diffstat (limited to '2005/i/robert/src')
-rw-r--r--2005/i/robert/src/ovision/see/Makefile.defs4
-rw-r--r--2005/i/robert/src/ovision/see/genct.cc36
2 files changed, 39 insertions, 1 deletions
diff --git a/2005/i/robert/src/ovision/see/Makefile.defs b/2005/i/robert/src/ovision/see/Makefile.defs
index eaeee03..1169670 100644
--- a/2005/i/robert/src/ovision/see/Makefile.defs
+++ b/2005/i/robert/src/ovision/see/Makefile.defs
@@ -1,9 +1,10 @@
-PROGRAMS += test_ovision test_img test_group test_map test_ovisiontracker test_cam test_segm test_magnifier test_ovision test_colortable test_space
+PROGRAMS += test_ovision test_img test_group test_map test_ovisiontracker test_cam test_segm test_magnifier test_ovision test_colortable test_space genct
LIBS += $(ovision_OBJECTS)
ovision_OBJECTS = convertImg.o img.o oconfig.o segmTable.o hotelling.o segm.o imgInterface.o colorTable.o segmTable.o segmLearn.o group.o magnifier.o skittle.o ovision.o -lz space.o # map.o
test_img_OBJECTS = test_img.o img.o imgInterface.o oconfig.o $(image_OBJECTS)
+genct_OBJECTS = genct.o oconfig.o segm.o segmLearn.o colorTable.o -lz
test_hotelling_OBJECTS = test_hotelling.o hotelling.o oconfig.o
test_cam_OBJECTS = test_cam.o img.o imgInterface.o oconfig.o $(video4linux_OBJECTS) $(image_OBJECTS) $(utils_OBJECTS)
test_segm_OBJECTS = test_segm.o img.o segm.o segmLearn.o oconfig.o imgInterface.o colorTable.o segmTable.o $(image_OBJECTS)
@@ -17,6 +18,7 @@ test_group_OBJECTS = test_group.o group.o img.o segm.o segmLearn.o oconfig.o img
test_magnifier_OBJECTS = test_magnifier.o hotelling.o magnifier.o group.o img.o segm.o segmLearn.o oconfig.o imgInterface.o skittle.o $(image_OBJECTS)
test_img: $(test_img_OBJECTS:%.o=%.o)
+genct: $(genct_OBJECTS:%.o=%.o)
test_hotelling: $(test_hotelling_OBJECTS:%.o=%.o)
test_cam: $(test_cam_OBJECTS:%.o=%.o)
test_segm: $(test_segm_OBJECTS:%.o=%.o)
diff --git a/2005/i/robert/src/ovision/see/genct.cc b/2005/i/robert/src/ovision/see/genct.cc
new file mode 100644
index 0000000..aae2530
--- /dev/null
+++ b/2005/i/robert/src/ovision/see/genct.cc
@@ -0,0 +1,36 @@
+// genct.cc
+// robert - Programme du robot APBteam
+// Copyright (C) 2005 Olivier Gaillard
+
+#include <iostream>
+#include <vector>
+#include <string>
+
+#include "segmLearn.hh"
+#include "colorTable.hh"
+#include "oconfig.hh"
+
+int
+main(int argc, char **argv)
+{
+ /////////////////////////////////////////////////////////////////////////////////////////
+ /// Initialisation des classes
+ OConfig *oconfig_;
+ try
+ {
+ oconfig_ = new OConfig;
+ }
+ catch (std::string &e)
+ {
+ std::cerr << e << std::endl;
+ return 1;
+ }
+ ColorTable tab;
+ /////////////////////////////////////////////////////////////////////////////////////////
+ /// Création de la table
+ tab.create (oconfig_->nnNbColor, true);
+ tab.save ();
+ return 0;
+}
+
+