summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/ovision/group.h
diff options
context:
space:
mode:
Diffstat (limited to '2004/i/nono/src/ovision/group.h')
-rw-r--r--2004/i/nono/src/ovision/group.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/2004/i/nono/src/ovision/group.h b/2004/i/nono/src/ovision/group.h
index f7f41cf..878b583 100644
--- a/2004/i/nono/src/ovision/group.h
+++ b/2004/i/nono/src/ovision/group.h
@@ -1,8 +1,27 @@
+// nono2 - programme du robot 2005
+//
+// Copyright (C) 2004 Olivier Gaillard
+//
+// Robot APB Team/Efrei 2004.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
#ifndef group_h
#define group_h
-// group.h - classe Group
-// nono - Programme du robot Efrei Robotique I1-I2 2004
-// Copyright (C) 2004 Olivier Gaillard
#include "img.h"
#include "segmNN.h"
@@ -12,6 +31,8 @@
#define BALL 1
#define GOAL 2
+#define IS_SET 255
+
/// Liste chainee des zones trouvees par la classe group
struct ZONE {
/// bornes de la zone pour x
@@ -49,12 +70,6 @@ class Group {
OConfig *oconfig;
- /// largeur de l'image a analyser
- int width;
-
- /// longueur de l'image a analyser
- int height;
-
public:
/// pointeur vers l'image segmentee
unsigned char *tabSegm;
@@ -78,7 +93,7 @@ class Group {
void JumpPoints(unsigned char numColorBall, unsigned char numColorGoal = 255);
/// Creation du tableau de RGB pour faire une image
- void TabOut();
+ void TabOut (int type = BALL, bool init = true);
/// Affiche les zones trouvees
void ShowZones();
@@ -95,7 +110,11 @@ class Group {
void Plague(int type, unsigned char numColor, int x, int y);
/// Supprime la liste des groupes
- void Group::FreeGroups ();
+ void FreeGroups ();
+
+ /// Ajoute une balle ou un poteau à la liste de groupes
+
+ void AddGroup (int type, int numColor, int xmin, int xmax, int ymin, int ymax, int centerx, int centery, ZONE *pLast);
};