summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/skittle.hh
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/skittle.hh')
-rw-r--r--2005/i/robert/src/ovision/see/skittle.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/2005/i/robert/src/ovision/see/skittle.hh b/2005/i/robert/src/ovision/see/skittle.hh
index 3ff458e..d2c5dbe 100644
--- a/2005/i/robert/src/ovision/see/skittle.hh
+++ b/2005/i/robert/src/ovision/see/skittle.hh
@@ -41,21 +41,26 @@ class Skittle
Img *img_;
public:
+ /// debout/couché/erreur
+ enum BendType {up, down, error};
/// Constructeur
Skittle (Img *img, Segm *segm);
/// Destructeur
~Skittle (void);
/// Analyse d'une zone
bool analyse (Zone &zone);
+
+ private:
/// 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:
+ /// Renvoie le minimum en fonction d'une bordure
+ inline int minWithBorder (int n, int min) {return n > min ? n : min;}
+ /// Renvoie le maximum en fonction d'une bordure
+ inline int maxWithBorder (int n, int max) {return n < max ? n : max;}
};
#endif // skittle_h