summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/oconfig.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/oconfig.cc')
-rw-r--r--2005/i/robert/src/ovision/see/oconfig.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/2005/i/robert/src/ovision/see/oconfig.cc b/2005/i/robert/src/ovision/see/oconfig.cc
index 6830081..3d4d746 100644
--- a/2005/i/robert/src/ovision/see/oconfig.cc
+++ b/2005/i/robert/src/ovision/see/oconfig.cc
@@ -11,6 +11,7 @@
#include <sstream>
#include "oconfig.hh"
+#include "group.hh"
OConfig *OConfig::instance = 0;
@@ -143,6 +144,13 @@ OConfig::loadNNFile (const char *filePath)
std::istringstream iss (buf);
ObjectColor tmp;
iss >> tmp.label >> tmp.color;
+ if (tmp.label == "redSktittle") tmp.type = Group::redSkittle;
+ else if (tmp.label == "greenSkittle") tmp.type = Group::greenSkittle;
+ else if (tmp.label == "border") tmp.type = Group::border;
+ else if (tmp.label == "base") tmp.type = Group::base;
+ else if (tmp.label == "gap") tmp.type = Group::gap;
+ else if (tmp.label == "reflectBand") tmp.type = Group::reflectBand;
+ else tmp.type = Group::undefined;
groupColor.push_back (tmp);
}
// Chargement des poids
@@ -192,7 +200,9 @@ OConfig::createNNFile (const char *filename, const int nbOutput) const
std::ofstream file (filename);
// Couleurs
for (std::vector<ObjectColor>::const_iterator i = groupColor.begin (); i < groupColor.end (); ++i)
+ {
file << i->label << " " << i->color << "\n";
+ }
// Poids
file << "#index\t#x1\tx2\tx3\n";
for (int i=0; i<nbOutput; i++)