From 30ea7faee31ad69f3f0886dae8bb58e1fe31a74f Mon Sep 17 00:00:00 2001 From: schodet Date: Thu, 1 May 2003 17:10:58 +0000 Subject: Ajout du module vision. --- 2003/i/buzz/src/vision/image.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 2003/i/buzz/src/vision/image.h (limited to '2003/i/buzz/src/vision/image.h') diff --git a/2003/i/buzz/src/vision/image.h b/2003/i/buzz/src/vision/image.h new file mode 100644 index 0000000..eae1d20 --- /dev/null +++ b/2003/i/buzz/src/vision/image.h @@ -0,0 +1,44 @@ +#ifndef image_h +#define image_h +// image.h - Image class +// buzz - Programme du robot Efrei Robotique I1-I2 2003 +// Copyright (C) 2003 Nicolas Schodet +#include "thresholds.h" +#include "size_thresholds.h" + +struct ImageGroup +{ + ImageGroup *next; + int x, y, w, h; + int zone, type; +}; + +class Image +{ + int m_width, m_height; + unsigned char *m_image; + unsigned char *m_zones; + ImageGroup *m_groups; + Thresholds *m_thresholds; + SizeThresholds *m_sizeThresholds; + public: + // Constructeur. + Image (const char *filename, Thresholds *thresholds, + SizeThresholds *sizeThresholds); + // Destructeur. + ~Image (void); + void filter (void); + // Fait des packets de pixels. + void group (void); + // Affiche les groupes qui on été trouvés. + void dumpGroups (void); + // Enregistre les infos trouvées. + void dump (const char *filename); + // Filtre les packets de pixels. + void groupFilter (void); + protected: + // Fait des packets de pixels sur les lignes. + void groupLine (void); +}; + +#endif // image_h -- cgit v1.2.3