summaryrefslogtreecommitdiff
path: root/2004
diff options
context:
space:
mode:
authorgaillaro2004-05-06 20:11:03 +0000
committergaillaro2004-05-06 20:11:03 +0000
commita3c3e7599df9a4748c30aab108ef414b1e12cba0 (patch)
tree0ad73fa5f213e6d2d695a435e56998fc59771fea /2004
parent99294453118e8d992716ab5a63b1bd1114bb74ec (diff)
ajout du fichier dist et des points dans adjust
Diffstat (limited to '2004')
-rw-r--r--2004/i/nono/src/ovision/adjust.cc53
-rw-r--r--2004/i/nono/src/ovision/adjust.h1
-rw-r--r--2004/i/nono/src/ovision/comm.cc30
-rw-r--r--2004/i/nono/src/ovision/group.cc20
-rw-r--r--2004/i/nono/src/ovision/group.h25
-rw-r--r--2004/i/nono/src/ovision/map.cc6
-rw-r--r--2004/i/nono/src/ovision/oconfig.cc43
-rw-r--r--2004/i/nono/src/ovision/oconfig.h9
-rw-r--r--2004/i/nono/src/ovision/space.cc55
-rw-r--r--2004/i/nono/src/ovision/space.h14
-rw-r--r--2004/i/nono/src/ovision/testmap.cc41
-rw-r--r--2004/i/nono/src/ovision/ui.cc14
12 files changed, 209 insertions, 102 deletions
diff --git a/2004/i/nono/src/ovision/adjust.cc b/2004/i/nono/src/ovision/adjust.cc
index 682a8d9..f4b7b06 100644
--- a/2004/i/nono/src/ovision/adjust.cc
+++ b/2004/i/nono/src/ovision/adjust.cc
@@ -15,6 +15,13 @@ using namespace std;
int window;
Comm *comm;
int point[3][2] = {{-1,-1},{-1,-1},{-1,-1}};
+int width=538; int height=395;
+
+int* GetPpoint()
+{
+ return (int*)point;
+}
+
/// Sortie du programme
void
@@ -122,25 +129,31 @@ InitGL(int width, int height)
// Plan de projection en 2D
glOrtho(0.0, WIDTH, 0.0, HEIGHT, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
+
+ glPointSize(4.0f);
}
/// Redimenssionement d'une fenetre
void
-ReSizeGLScene(int width, int height)
+ReSizeGLScene(int w, int h)
{
// Evite div par 0
- if (height==0) height=1;
+ if (height==0) h=1;
+
+ height = h;
+ width = w;
// Initialise le point de vue
- glViewport(0, 0, width, height);
+ glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
// Remise a zero et mode 2D
glLoadIdentity();
glOrtho(0.0, WIDTH, 0.0, HEIGHT, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
+
}
@@ -187,14 +200,19 @@ DrawGLScene()
for (int i=0; i<NBIMG; i++)
DrawImage(i);
+
+
+ glColor3ub(0,0,255);
+ glDisable(GL_TEXTURE_2D);
// Dessine points de calibration de la distance
for (int i=0; i<3; i++)
{
if (point[i][0] >= 0)
glBegin(GL_POINTS);
- glVertex3f(point[i][0], point[i][1], -0.7f);
+ glVertex3f(point[i][0], point[i][1], -0.9f);
glEnd();
}
+ glEnable(GL_TEXTURE_2D);
glFlush();
@@ -222,33 +240,49 @@ MouseFunc(int button, int state, int x, int y)
{
if (state == GLUT_UP)
{
- if ((x < 352+BORDER) && (y < 288+BORDER) && (x > BORDER) && (y > BORDER))
+ // On calcul les coordonnees de l'image
+ x = (int)((double)WIDTH/width * x);
+ y = height - y;
+ y = (int)((double)HEIGHT/height * y);
+ if ((x < 352+BORDER) && (y < HEIGHT-BORDER) && (x > BORDER) && (y > 2*BORDER+288))
{
int i=0;
+
+ // Ajout de point
if (button == GLUT_LEFT_BUTTON)
+ {
while(i < 3)
{
if (point[i][0] < 0)
{
point[i][0] = x;
point[i][1] = y;
- i=3;
+ i=5;
+ cout << "Point ajoute: " << x << ", " << y << endl;
}
i++;
}
+ if (i == 5) cout << "MouseFunc : 3 points sont deja selectionnes" << endl;
+ }
+
+ // Suppression de point
else if (button == GLUT_RIGHT_BUTTON)
+ {
while(i<3)
{
if ((abs(point[i][0] - x) < 5) && (abs(point[i][1] -y) < 5))
{
point[i][0] = -1;
point[i][1] = -1;
- i=3;
+ i=5;
}
i++;
}
+ if (i == 5) cout << "MouseFunc : 0 point selectionne" << endl;
+ }
}
- cout << "x : " << x << " " << y << endl;
+ DrawGLScene();
+
}
}
@@ -259,12 +293,13 @@ main(int argc, char **argv)
// Initialisation de l'OpenGL
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- glutInitWindowSize(538, 395);
+ glutInitWindowSize(width, height);
glutInitWindowPosition(0, 0);
window = glutCreateWindow("Adjust - Efrei Robotique");
glutDisplayFunc(&DrawGLScene);
glutReshapeFunc(&ReSizeGLScene);
glutKeyboardFunc(&KeyPressed);
+ glutMouseFunc(&MouseFunc);
InitGL(WIDTH, HEIGHT);
// Init de comm
diff --git a/2004/i/nono/src/ovision/adjust.h b/2004/i/nono/src/ovision/adjust.h
index 8cd53e8..204ea34 100644
--- a/2004/i/nono/src/ovision/adjust.h
+++ b/2004/i/nono/src/ovision/adjust.h
@@ -41,5 +41,6 @@ void DrawGLScene();
/// Chargement des textures a partir de donnees RGB
unsigned int LoadImage(int width, int height, unsigned char *data, unsigned int lastTex);
+int *GetPpoint();
#endif // adjust_h
diff --git a/2004/i/nono/src/ovision/comm.cc b/2004/i/nono/src/ovision/comm.cc
index 6c98771..47e09fb 100644
--- a/2004/i/nono/src/ovision/comm.cc
+++ b/2004/i/nono/src/ovision/comm.cc
@@ -34,6 +34,13 @@ Comm::Comm(char *filename)
// Creation de oconfig
oconfig = new OConfig("rc/vision.conf");
+
+ int *pPoint = GetPpoint();
+ for (int i=0; i<3; i++)
+ {
+ pPoint[i*2] = oconfig->tabPoint[i][0];
+ pPoint[i*2+1] = oconfig->tabPoint[i][1];
+ }
// Ouverture de l'image pilote et stockage
img.ReadRaw(filename);
@@ -344,6 +351,29 @@ Comm::ExecuteUiCmds(char *buffer)
break;
+ case 'v': // Envoie les points pour le calcul de la distance
+ int *pPoint;
+ pPoint = GetPpoint();
+
+ for (int i=0; i<3; i++)
+ if (pPoint[i*2] == -1)
+ {
+ cerr << "Comm::ExecuteUiCmds : Pas assez de points selectionnes\n";
+ return;
+ }
+
+ for (int i = 0; i<3; i++)
+ {
+ oconfig->tabPoint[i][0] = pPoint[i*2];
+ oconfig->tabPoint[i][1] = pPoint[i*2+1];
+ oconfig->tabPoint[i][2] = 0;
+ oconfig->tabPoint[i][3] = 0;
+ }
+
+ oconfig->CreateDistFile("rc/dist");
+ break;
+
+
case 'z':
group->ShowZones();
break;
diff --git a/2004/i/nono/src/ovision/group.cc b/2004/i/nono/src/ovision/group.cc
index 482bb93..9228d7b 100644
--- a/2004/i/nono/src/ovision/group.cc
+++ b/2004/i/nono/src/ovision/group.cc
@@ -62,10 +62,10 @@ Group::~Group() {
/// @param numColor numero de la couleur a chercher
/// @param x,y coordonnees de depart pour la recherche
void Group::Plague(int type, unsigned char numColor, int x, int y) {
- unsigned int xmax = x;
- unsigned int xmin = x;
- unsigned int ymax = y;
- unsigned int ymin = y;
+ int xmax = x;
+ int xmin = x;
+ int ymax = y;
+ int ymin = y;
// TODO ajouter une inertie ?
@@ -119,7 +119,7 @@ void Group::Plague(int type, unsigned char numColor, int x, int y) {
pLast = pCur;
pCur = pCur->next;
}
-
+
// Si il n'est pas presente on l'ajoute
if (!pCur) {
@@ -193,10 +193,12 @@ void Group::JumpPoints(unsigned char numColor) {
numColor = segm->index[numColor];
// Parcours d'une partie des pixels de l'image
- for (unsigned int x=0; x<width; x+=10) {
- for (unsigned int y=0; y<height; y+=10) {
+ for (int x=0; x<width; x+=10) {
+ for (int y=0; y<height; y+=10) {
if (tabSegm[y*width+x] == numColor)
+ {
Plague(BALL, numColor, x, y);
+ }
}
}
@@ -225,8 +227,8 @@ void Group::TabOut() {
// Parcours de la liste des zones trouvees
while (pCur) {
// Remplissage de la zone avec une couleur
- for(unsigned int i=pCur->xmin; i<pCur->xmax; i++)
- for (unsigned int j=pCur->ymin; j<pCur->ymax; j++)
+ for(int i=pCur->xmin; i<pCur->xmax; i++)
+ for (int j=pCur->ymin; j<pCur->ymax; j++)
tabOut[j*img->width+i] = pCur->idColor+1;
pCur = pCur->next;
diff --git a/2004/i/nono/src/ovision/group.h b/2004/i/nono/src/ovision/group.h
index f154bd0..d5a6420 100644
--- a/2004/i/nono/src/ovision/group.h
+++ b/2004/i/nono/src/ovision/group.h
@@ -6,7 +6,6 @@
#include "img.h"
#include "segmNN.h"
-#include "segmTh.h"
// TODO delta devrait diminuer avec la profondeur
#define DELTA 20 // taille du jumppoint
@@ -15,10 +14,10 @@
/// Liste chainee des zones trouvees par la classe group
struct ZONE {
/// bornes de la zone pour x
- unsigned int xmin, xmax;
+ int xmin, xmax;
/// bornes de la zone pour y
- unsigned int ymin, ymax;
+ int ymin, ymax;
/// centre de la zone trouvee
int centerx, centery;
@@ -37,29 +36,29 @@ struct ZONE {
/// Cree une liste chainee de zones correspondant aux balles
class Group {
- // classe segmentation
+ /// classe segmentation
SegmNN *segm;
- // classe image
+ /// classe image
Img *img;
- // largeur de l'image a analyser
- unsigned int width;
+ /// largeur de l'image a analyser
+ int width;
- // longueur de l'image a analyser
- unsigned int height;
+ /// longueur de l'image a analyser
+ int height;
public:
- // pointeur vers l'image segmentee
+ /// pointeur vers l'image segmentee
unsigned char *tabSegm;
- // pointeur vers l'image RGB pour affichage
+ /// pointeur vers l'image RGB pour affichage
unsigned char *tabOut;
- // liste chainee pour sauver les zones des balles
+ /// liste chainee pour sauver les zones des balles
ZONE *zoneListBall;
- // liste chainee pour sauver les zones des poteaux
+ /// liste chainee pour sauver les zones des poteaux
ZONE *zoneListGoal;
/// Constructeur
diff --git a/2004/i/nono/src/ovision/map.cc b/2004/i/nono/src/ovision/map.cc
index 7f087a0..832200d 100644
--- a/2004/i/nono/src/ovision/map.cc
+++ b/2004/i/nono/src/ovision/map.cc
@@ -113,13 +113,13 @@ Map::AddBallsToMap(Group *group)
ZONE *pCur = group->zoneListBall;
int pos[2];
-
while (pCur)
{
if (!IsLock())
{
- pos[0] = pCur->centerx-180;
- pos[1] = pCur->centery;
+ int posX, posY;
+ space->GetLoc(pCur->centerx, pCur->centery, posX, posY);
+ cout << "posX: " << posX << " posY: " << posY << endl;
SetLock(true);
}
/* // TODO passer par la classe space
diff --git a/2004/i/nono/src/ovision/oconfig.cc b/2004/i/nono/src/ovision/oconfig.cc
index bdc4c5a..d4799a5 100644
--- a/2004/i/nono/src/ovision/oconfig.cc
+++ b/2004/i/nono/src/ovision/oconfig.cc
@@ -104,6 +104,7 @@ OConfig::OConfig(char *filename) {
node = NULL;
index = NULL;
LoadNNFile("rc/poids");
+ LoadDistFile("rc/dist");
}
@@ -295,44 +296,52 @@ void OConfig::LoadThFile() {
-/// Chargement de la table des distances
-void OConfig::LoadDistFile(char *filename, int **tab, int &height, int &width) {
+/// Chargement de la tabPointle des distances
+void OConfig::LoadDistFile(char *filename) {
FILE *file;
+ char buf[50];
// Ouverture du fichier de distance
- file = fopen(filename, "rb");
+ file = fopen(filename, "r");
if (!file) {
cerr << "OConfig::LoadDistFile : Error during poids file opening" << endl;
return;
}
-
- fwrite(&height, 1, sizeof(int), file);
- fwrite(&width, 1, sizeof(int), file);
- if (*tab) delete[] *tab;
- *tab = new int[height*width];
+ int i=0;
+ while (i<3)
+ {
+ fgets(buf, 50, file);
+ if (buf[0] != '#')
+ {
+ sscanf(buf, "%i\t%i\t%i\t%i\n", &tabPoint[i][0], &tabPoint[i][1], &tabPoint[i][2], &tabPoint[i][3]);
+ i++;
+ }
+ }
- fwrite(*tab, height*width, sizeof(int), file);
fclose(file);
}
-/// Creation d'un fichier pour la table des distances
-void OConfig::CreateDistFile(char *filename, int *tab, int height, int width) {
+/// Creation d'un fichier pour la tabPointle des distances
+void OConfig::CreateDistFile(char *filename) {
- if (!tab) {
- cerr << "OConfig::CreateDistFile : tab vide\n";
+ if (!tabPoint) {
+ cerr << "OConfig::CreateDistFile : tabPoint vide\n";
return;
}
// Ecriture dans un fichier
FILE *file;
- file = fopen(filename, "wb+");
+ file = fopen(filename, "w+");
+
- fwrite(&height, 1, sizeof(int), file);
- fwrite(&width, 1, sizeof(int), file);
- fwrite(tab, height*width, sizeof(int), file);
+ fprintf(file, "#imgX\timgY\tdistX\tdistY\n");
+
+ for (int i=0; i<3; i++)
+ fprintf(file, "%i\t%i\t%i\t%i\n", tabPoint[i][0], tabPoint[i][1], tabPoint[i][2], tabPoint[i][3]);
+
fclose(file);
}
diff --git a/2004/i/nono/src/ovision/oconfig.h b/2004/i/nono/src/ovision/oconfig.h
index 32d89e7..9b3daf1 100644
--- a/2004/i/nono/src/ovision/oconfig.h
+++ b/2004/i/nono/src/ovision/oconfig.h
@@ -102,7 +102,10 @@ class OConfig {
int *index;
/// Chemin d'acces des images
- char imgPath[30];
+ char imgPath[30];
+
+ /// Points utilises pour le calcul de distance
+ int tabPoint[3][4];
/// Constructeur
OConfig (char *filename);
@@ -123,10 +126,10 @@ class OConfig {
void CreateNNFile(const char *file, int mode, int nbOutput);
/// Creatio du fichier de la table de distance
- void CreateDistFile(char *filename, int *tab, int height, int width);
+ void CreateDistFile(char *filename);
/// Chargement du fichier de la table de distance
- void LoadDistFile(char *filename, int **tab, int &height, int &width);
+ void LoadDistFile(char *filename);
protected:
/// Parse une ligne du fichier de config
diff --git a/2004/i/nono/src/ovision/space.cc b/2004/i/nono/src/ovision/space.cc
index 34fb2a6..730dea7 100644
--- a/2004/i/nono/src/ovision/space.cc
+++ b/2004/i/nono/src/ovision/space.cc
@@ -7,29 +7,20 @@
#include "space.h"
#include <math.h>
-#include "imgFile.h"
-#include "segmNN.h"
#include "group.h"
using namespace std;
-/*namespace std
-{
-struct less<TABLOC*> {
- bool operator()(TABLOC *loc1, TABLOC *loc2)
- {
- return loc1->locImageY < loc2->locImageY;
- }
-}
-*/
/// Constructeur
/// @param imgHeight hauteur de l'image
/// @param imgWidth largeur de l'image
-Space::Space (int imgHeight, int imgWidth)
+Space::Space (int imgHeight, int imgWidth, OConfig *oconfig)
{
Space::imgHeight = imgHeight;
Space::imgWidth = imgWidth;
+ Space::oconfig = oconfig;
+
aY = bY = cY = 0;
aX = aY = 0;
@@ -53,6 +44,13 @@ void Space::ShowTab()
/// Ajoute un point pour l'etalonnage
void Space::AddSetupPoint(int x, int y, int distx, int disty)
{
+ if (setupTab.size() > 3)
+ {
+ std::vector<SETUP_POINT>::iterator iter;
+ iter = setupTab.begin();
+ setupTab.erase(iter);
+ }
+
SETUP_POINT setupPoint;
setupPoint.x = x;
@@ -64,6 +62,12 @@ void Space::AddSetupPoint(int x, int y, int distx, int disty)
}
+/// Chargement des points a partir d'un fichier
+void Space::LoadFromFile()
+{
+ for (int i=0; i<3; i++)
+ AddSetupPoint(oconfig->tabPoint[i][0], oconfig->tabPoint[i][1], oconfig->tabPoint[i][2], oconfig->tabPoint[i][3]);
+}
int Space::Determinant(int matrix[][4])
{
@@ -117,6 +121,7 @@ int Space::Setup()
aY = (double)Space::CaracteristicDeterminant(matrix, 0) / det;
bY = (double)Space::CaracteristicDeterminant(matrix, 1) / det;
cY = (double)Space::CaracteristicDeterminant(matrix, 2) / det;
+ cout << "aY: " << aY << " bY: " << bY << "cY: " << cY << endl;
}
else
{
@@ -140,9 +145,6 @@ int Space::Setup()
return 1;
}
-
-
-
/// Position d'un objet dans le referentiel du robot
void Space::GetLoc(int locImgX, int locImgY, int &locX, int &locY)
{
@@ -150,21 +152,16 @@ void Space::GetLoc(int locImgX, int locImgY, int &locX, int &locY)
locY = (int)(locImgY*locImgY*aY + locImgY*bY + cY);
}
-
/// Donne la position reelle sur la table de la balle
-/// @param *vOrig position du robot sur la table
-/// @param *vDir position de la balle par rapport au robot
-/// @param angle rotation du robot par rapport a sa position d'origine
-/*void Space::GetPos(Vec *vOrig, Vec *vDir, float angle)
+/// @param locX, locY : position de la balle dans le rĂfĂrentiel du robot
+/// @param posRobotX, posRobotY, angleRobot : position du robot sur la table
+/// @param posX, posY : variable de retour pour la position de la balle sur la table
+void Space::GetPos(int locX, int locY, int posRobotX, int posRobotY, double angleRobot, int &posX, int &posY)
{
- Vec vPos;
- float sinus = sin(angle);
- float cosinus = cos(angle);
-
+ float sinus = sin(angleRobot);
+ float cosinus = cos(angleRobot);
+
// Calcul des coordonnes avec le changement de repere
- vPos.x = vOrig->x + vDir->x*cosinus - vDir->y*sinus;
- vPos.y = vOrig->y + vDir->x*sinus + vDir->y*cosinus;
-
- printf("Position: %f %f\n", vPos.x, vPos.y);
+ posX = (int)(posRobotX + locX*cosinus - locY*sinus);
+ posY = (int)(posRobotY + locX*sinus + locY*cosinus);
}
-*/
diff --git a/2004/i/nono/src/ovision/space.h b/2004/i/nono/src/ovision/space.h
index a10a913..be9686d 100644
--- a/2004/i/nono/src/ovision/space.h
+++ b/2004/i/nono/src/ovision/space.h
@@ -10,6 +10,7 @@
#define POS_ROBOT_ETALONNOGE_X 300
#include "group.h"
+#include "oconfig.h"
struct SETUP_POINT
{
@@ -21,10 +22,13 @@ struct SETUP_POINT
/// Etalonnage des distances et localisation de la balle
class Space
{
+ /// Classe config
+ OConfig *oconfig;
+
/// tableau d'index des distances
uint *tabX;
uint *tabY;
-
+
/// liste des distances etalonnees
std::vector<SETUP_POINT> setupTab;
@@ -43,7 +47,7 @@ class Space
public:
// Constructeur
- Space (int width, int height);
+ Space (int width, int height, OConfig *oconfig);
// Destructeur
~Space ();
@@ -57,6 +61,9 @@ class Space
/// Ajoute un point pour l'etalonnage
void AddSetupPoint(int x, int y, int distx, int disty);
+ /// Chargement des points a partir d'un fichier
+ void Space::LoadFromFile();
+
/// Etalonnage des distances
int Setup();
protected:
@@ -65,6 +72,9 @@ class Space
/// Calcul du determinant caracteristique
int CaracteristicDeterminant(int matrix[][4], int numRow);
+
+ /// Donne la position reelle sur la table de la balle
+ void GetPos(int locX, int locY, int posRobotX, int posRobotY, double angleRobot, int &posX, int &posY);
};
#endif // space_h
diff --git a/2004/i/nono/src/ovision/testmap.cc b/2004/i/nono/src/ovision/testmap.cc
index b6a18a6..e7675d4 100644
--- a/2004/i/nono/src/ovision/testmap.cc
+++ b/2004/i/nono/src/ovision/testmap.cc
@@ -4,19 +4,35 @@
#include "oconfig.h"
#include "group.h"
#include "space.h"
-
+//#include "imgFile.h"
int
main()
{
OConfig oconfig("rc/vision.conf");
+ // ImgFile img;
+ // img.ReadRaw("im.jpg");
+ //
+
Img img;
-// img.ReadRaw("im.jpg");
- RawLoader rawLoader("im2000.rgb", 360, 296, ImageLoader::rgb);
- img.load(rawLoader);
+
+ // RawLoader rawLoader("im2000.rgb", 360, 296, ImageLoader::rgb);
+ // img.load(rawLoader);
+
+ Video4Linux::ColorSpace cs;
+ cs = Video4Linux::yuv;
+ Video4Linux vid ("/dev/video", cs);
+ vid.calibrate ();
+ int w, h;
+ vid.getSize (w, h);
+ std::cout << w << ' ' << h << std::endl;
+ int s;
+ s = vid.getBufSize ();
+ unsigned char *buf = new unsigned char[s];
+ s = vid.read (buf, s);
img.RGBtoYUV();
-// img.WriteRGB("test.rgb");
+ // img.WriteRGB("test.rgb");
Space space(img.width, img.height);
space.AddSetupPoint (109, 36, -150, 900);
@@ -27,15 +43,14 @@ main()
SegmNN segmNN(&img, &oconfig);
segmNN.BuildNN(oconfig.nn_NbCouleurs, LOAD_FROM_FILE);
- segmNN.Segm();
-
Group group(&img, &segmNN);
+
+ Map map(&oconfig, &space);
+
+ segmNN.Segm();
group.JumpPoints(oconfig.groupColor);
- group.ShowZones();
+ // group.ShowZones();
- Map map(&oconfig, &space);
- map.ShowBalls();
map.AddBallsToMap(&group);
- map.ShowBalls();
-
- }
+// map.ShowBalls();
+}
diff --git a/2004/i/nono/src/ovision/ui.cc b/2004/i/nono/src/ovision/ui.cc
index b40990b..5e045a9 100644
--- a/2004/i/nono/src/ovision/ui.cc
+++ b/2004/i/nono/src/ovision/ui.cc
@@ -23,7 +23,7 @@ using namespace std;
/// Nombre d'items du menu
-#define NBITEMS 11
+#define NBITEMS 12
OConfig oconfig("rc/vision.conf");
@@ -35,6 +35,7 @@ char *itemsName[NBITEMS][2] = {{"Move color", "Permet d'ajuster les niveaux d'un
{"Select color goal", "Selectionne l'index de la couleur des poteaux"},
{"Training", "Entraine le reseau de neurones"},
{"New network", "Regenere de nouveaux poids pour le reseau"},
+ {"Set dist point", "Fixe les points pour la distance"},
{"Cancel changes", "Recharge le fichier de oconfig"},
{"Save changes", "Sauvegarde les changements dans le fichier"},
{"Quit", "Quitte le programme"},
@@ -742,7 +743,7 @@ UI::Menu()
menu = new_menu(item);
set_menu_mark(menu, " -> ");
set_menu_win(menu, mainWindow);
- set_menu_sub(menu, derwin(mainWindow, 10, 65, 3, 1));
+ set_menu_sub(menu, derwin(mainWindow, 13, 65, 3, 1));
set_menu_format(menu, NBITEMS, 1);
post_menu(menu);
@@ -843,8 +844,13 @@ UI::Menu()
PrintStatus("Nouveau reseau de neurones charge\n");
}
break;
+
+ case 7: // Set dist point
+ SendSignal("v\n");
+ break;
+
- case 7: // Annuler les changements
+ case 8: // Annuler les changements
// Reload du fichier de poids initial
oconfig.LoadNNFile();
@@ -856,7 +862,7 @@ UI::Menu()
PrintStatus("Les changements ont ete annules\n");
break;
- case 8: // Sauver les changements
+ case 9: // Sauver les changements
// Sauvegarde des poids dans le fichier poids
oconfig.CreateNNFile("rc/poids", oconfig.colorMode, oconfig.nn_NbCouleurs);