00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __FIREVISION_RHT_CIRCLE_H_
00026 #define __FIREVISION_RHT_CIRCLE_H_
00027
00028 #include <vector>
00029 #include <iostream>
00030
00031 #include <utils/math/types.h>
00032 #include <fvutils/base/types.h>
00033 #include <models/shape/circle.h>
00034 #include <models/shape/accumulators/ht_accum.h>
00035
00036 namespace firevision {
00037 #if 0
00038 }
00039 #endif
00040
00041 class ROI;
00042
00043 class RhtCircleModel: public ShapeModel
00044 {
00045 private:
00046 std::vector<Circle> m_Circles;
00047 RhtAccumulator accumulator;
00048 static const float RHT_MIN_RADIUS;
00049 static const float RHT_MAX_RADIUS;
00050
00051 public:
00052 RhtCircleModel(void);
00053 virtual ~RhtCircleModel(void);
00054
00055 std::string getName(void) const {return std::string("RhtCircleModel");}
00056 int parseImage(unsigned char* buffer, ROI *roi);
00057 int getShapeCount(void) const;
00058 Circle* getShape(int id) const;
00059 Circle* getMostLikelyShape(void) const;
00060
00061 private:
00062 void calcCircle(
00063 const fawkes::point_t& p1,
00064 const fawkes::point_t& p2,
00065 const fawkes::point_t& p3,
00066 center_in_roi_t& center,
00067 float& radius);
00068 };
00069
00070 }
00071
00072 #endif // __FIREVISION_RHT_CIRCLE_H_
00073