Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/ImageProcessor/ImageProcessorTools/CircleCalculation.h

Go to the documentation of this file.
00001 /** 
00002 * @file CircleCalculation.h
00003 * Declaration of class CircleCalculation.
00004 *
00005 * @author <A href=mailto:juengel@informatik.hu-berlin.de>Matthias Jüngel</A>
00006 */
00007 
00008 #include "Tools/RingBufferWithSum.h"
00009 
00010 #ifndef _CircleCalculation_h_
00011 #define _CircleCalculation_h_
00012 
00013 #include "Tools/Math/Geometry.h"
00014 #include "Tools/Boundary.h"
00015 #include "Tools/Debugging/DebugDrawings.h"
00016 
00017 /**
00018 * @class CircleCalculation
00019 *
00020 *
00021 * @author <A href=mailto:juengel@informatik.hu-berlin.de>Matthias Jüngel</A>
00022 */
00023 
00024 #include "Tools/Math/Vector2.h"
00025 
00026 class CircleCalculation
00027 {
00028 public:
00029 /**
00030 * The struct represents a ball point.
00031   */
00032   struct BallPoint : Vector2<int>
00033   {
00034     bool isBottom; /**< Is the point at the lower side of the ball? */
00035   };
00036   
00037   void init();
00038   
00039   bool createCircle(int set, Geometry::Circle& circle);
00040   void addBallPoint(int set, int x, int y, bool isBottom);
00041   int getNumberOfBallPoints(int set); 
00042   bool getBoundary(Boundary<int>& ballBoundary, int set);
00043   int paintBallPoints(
00044     int set, 
00045     int minIndex, 
00046     int drawingID,
00047     Drawings::Color color, 
00048     int size);
00049 private:
00050   bool select3Points(int& point1, int& point2, int& point3, int set);
00051   
00052   Vector2<int> cutMiddlePerpendiculars(
00053     Vector2<int>& v1,
00054     Vector2<int>& v2,
00055     Vector2<int>& v3) const;
00056   
00057   enum {maxNumberOfBallPoints = 400}; /**< The maximum number of ball points. */
00058   
00059   enum {numberOfBallPointSets = 2}; /**< The number of ball point sets */
00060   
00061   BallPoint ballPoints[maxNumberOfBallPoints][numberOfBallPointSets]; /**< All sets of ball points. */
00062   int numberOfBallPoints[numberOfBallPointSets]; /**< The number of ball points in each set. */
00063 };
00064 
00065 #endif   //  _CircleCalculation_h_
00066 
00067 /*
00068 * Change log :
00069 * 
00070 * $Log: CircleCalculation.h,v $
00071 * Revision 1.1.1.1  2004/05/22 17:19:46  cvsadm
00072 * created new repository GT2004_WM
00073 *
00074 * Revision 1.3  2004/02/12 14:40:35  juengel
00075 * changed visualzation.
00076 *
00077 * Revision 1.2  2003/12/15 11:46:14  juengel
00078 * Introduced CameraInfo
00079 *
00080 * Revision 1.1  2003/12/04 09:44:23  juengel
00081 * Added CircleCalculation
00082 *
00083 *
00084 */

Generated on Thu Sep 23 19:57:29 2004 for GT2004 by doxygen 1.3.6