From d807e836f902b08eb296fd346f70d97fa4996aff Mon Sep 17 00:00:00 2001 From: gaillaro Date: Mon, 11 Apr 2005 23:33:59 +0000 Subject: detection des quilles debout/couche, fiabilite a ameliorer --- 2005/i/robert/src/ovision/see/skittle.hh | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 2005/i/robert/src/ovision/see/skittle.hh (limited to '2005/i/robert/src/ovision/see/skittle.hh') diff --git a/2005/i/robert/src/ovision/see/skittle.hh b/2005/i/robert/src/ovision/see/skittle.hh new file mode 100644 index 0000000..3ff458e --- /dev/null +++ b/2005/i/robert/src/ovision/see/skittle.hh @@ -0,0 +1,61 @@ +// robert - programme du robot 2005 +// +// Copyright (C) 2005 Olivier Gaillard +// +// Robot APB Team/Efrei 2005. +// 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 skittle_h +#define skittle_h + +#include + +#include "segm.hh" +#include "oconfig.hh" +#include "group.hh" +#include "img.hh" + +/// Reconnaissance des objets quilles +class Skittle +{ + /// Classe segmentation + Segm *segm_; + /// Classe oconfig + OConfig *oconfig_; + /// Classe img + Img *img_; + + public: + /// Constructeur + Skittle (Img *img, Segm *segm); + /// Destructeur + ~Skittle (void); + /// Analyse d'une zone + bool analyse (Zone &zone); + /// Recherche de la composante principale + void pca (Zone &zone); + /// Recherche de du côté de la courbure + enum BendType {up, down, error}; + BendType bend (Zone &zone); + /// Utilisé pour la recherche de la courbure, cherche le point le plus haut + int climb (const int startX, const int startY, const int color); + + private: +}; + +#endif // skittle_h -- cgit v1.2.3