Jafar
|
00001 /* $Id$ */ 00002 00003 #ifndef _ENGINE_HPP 00004 #define _ENGINE_HPP 00005 00006 #include "kernel/jafarException.hpp" 00007 #include "kernel/jafarMacro.hpp" 00008 #include "image/Image.hpp" 00009 #include "gfm/GroupsMatcher.hpp" 00010 #include "gfm/MatchingResult.hpp" 00011 #include "gfm/EngineTracking.hpp" 00012 #include "fdetect/Detector.hpp" 00013 #include "fdetect/DetectionResult.hpp" 00014 #include "premodeler/premodelerException.hpp" 00015 00016 namespace jafar { 00017 00018 namespace premodeler { 00019 00023 struct ViewMR { 00024 ViewMR(): 00025 vIndex(-1), vMatchingResult() 00026 { 00027 } 00028 ViewMR(int _vIndex, 00029 gfm::MatchingResult _vMatchingResult) : 00030 vIndex(_vIndex), vMatchingResult(_vMatchingResult) 00031 { 00032 } 00034 int vIndex; 00036 gfm::MatchingResult vMatchingResult; 00037 }; 00038 00042 typedef std::vector<premodeler::ViewMR*> SequenceMR; 00043 typedef SequenceMR::iterator smrIterator; 00052 class Engine { 00053 public : 00057 enum DetectorType { 00058 HARRIS, 00059 SIFT, 00060 SURF 00061 };//DetectorType 00062 /* 00063 * private attributes and methodes 00064 */ 00065 protected: 00067 DetectorType m_type; 00069 fdetect::Detector *m_detector; 00071 gfm::GroupsMatcher* m_matcher; 00073 gfm::EngineTracking* m_tracker; 00075 premodeler::SequenceMR smr; 00077 bool isInitialised; 00078 unsigned int m_GlobalId; 00079 protected: 00081 fdetect::DetectionResult processImage(const image::Image& image); 00082 00083 public: 00085 Engine(); 00087 Engine(const Engine::DetectorType& _type); 00089 ~Engine(); 00091 void setDetectorType(const Engine::DetectorType& _type); 00093 void init(const image::Image& start); 00095 void process(const image::Image& next, const int& nextId); 00097 void print(); 00099 std::vector<unsigned int> detectedFeaturesInImage(const int& imageIndex); 00101 inline gfm::EngineTracking* tracker() const { 00102 return m_tracker; 00103 } 00105 inline fdetect::Detector* detector() const { 00106 return m_detector; 00107 } 00109 inline SequenceMR result() const { 00110 return smr; 00111 } 00113 inline DetectorType type() const { 00114 return m_type; 00115 } 00117 inline gfm::GroupsMatcher* matcher() const { 00118 return m_matcher; 00119 } 00120 00121 }; //class Engine 00122 00123 } //namespace premodeler 00124 00125 }//namespace jafar 00126 00127 #endif
Generated on Wed Oct 15 2014 00:37:20 for Jafar by doxygen 1.7.6.1 |