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.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/2005/i/robert/src/ovision/see/oconfig.cc b/2005/i/robert/src/ovision/see/oconfig.cc
index 784d031..663337a 100644
--- a/2005/i/robert/src/ovision/see/oconfig.cc
+++ b/2005/i/robert/src/ovision/see/oconfig.cc
@@ -51,7 +51,6 @@ OConfig::parse(const char *var, const char *arg)
if (varName == "NN_step_learning") nnSl = atof(arg);
else if (varName == "NN_neighborhood_learning") nnNl = atof(arg);
else if (varName == "NN_number_of_iteration_learning") nnNil = atol(arg);
- else if (varName == "NN_number_of_color_to_segment") nnNbColor = atoi(arg);
else if (varName == "NN_threshold_output") nnThresholdOutput = atoi(arg);
else if (varName == "NN_lum_inosity_influence") nnInfluLum = atof(arg);
else if (varName == "UI_img_path ") strcpy(imgPath, arg);
@@ -118,6 +117,7 @@ OConfig::loadNNFile (const char *filePath)
}
// Chargement des couleurs
char buf [maxChar];
+ groupColor.clear ();
while (!file.eof ())
{
file.getline (buf, maxChar);
@@ -159,6 +159,7 @@ OConfig::loadNNFile (const char *filePath)
for (unsigned int i=0; i<tmpIndex.size (); ++i)
index[i] = (unsigned char)tmpIndex[i];
nnNbNodeMax = tmpIndex.size ();
+ nnNbColor = nnNbNodeMax;
}
/// Creation d'un fichier de poids pour le reseau de neurones
@@ -184,7 +185,7 @@ OConfig::createNNFile (const char *filename, const int nbOutput_) const
{
file << index[i] << "\t";
for (int j=0; j<3; j++)
- file << node[i*3+j] << "\t";
+ file << (int)node[i*3+j] << "\t";
file << "\n";
}
file.close ();