rht_circle.h
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 class ROI;
00037
00038 class RhtCircleModel: public ShapeModel
00039 {
00040 private:
00041 std::vector<Circle> m_Circles;
00042 RhtAccumulator accumulator;
00043 static const float RHT_MIN_RADIUS;
00044 static const float RHT_MAX_RADIUS;
00045
00046 public:
00047 RhtCircleModel(void);
00048 virtual ~RhtCircleModel(void);
00049
00050 std::string getName(void) const {return std::string("RhtCircleModel");}
00051 int parseImage(unsigned char* buffer, ROI *roi);
00052 int getShapeCount(void) const;
00053 Circle* getShape(int id) const;
00054 Circle* getMostLikelyShape(void) const;
00055
00056 private:
00057 void calcCircle(
00058 const fawkes::point_t& p1,
00059 const fawkes::point_t& p2,
00060 const fawkes::point_t& p3,
00061 center_in_roi_t& center,
00062 float& radius);
00063 };
00064
00065 #endif // __FIREVISION_RHT_CIRCLE_H_
00066