From 9d894a3adfcb6cea19f159bfe3de58ae8bce77a1 Mon Sep 17 00:00:00 2001 From: gaillaro Date: Sat, 23 Apr 2005 19:59:25 +0000 Subject: programme pour generer la colortable --- 2005/i/robert/src/ovision/see/Makefile.defs | 4 +++- 2005/i/robert/src/ovision/see/genct.cc | 36 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 2005/i/robert/src/ovision/see/genct.cc (limited to '2005/i/robert/src/ovision') 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 +#include +#include + +#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; +} + + -- cgit v1.2.3