Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
EngineCustom.hpp
00001 /* $Id$*/
00002 
00003 #ifndef _GFM_ENGINECUSTOM_HPP_
00004 #define _GFM_ENGINECUSTOM_HPP_
00005 
00006 #include <image/Image.hpp>
00007 
00008 #include "fdetect/InterestFeature.hpp"
00009 #include "fdetect/DetectionResult.hpp"
00010 #include "fdetect/Descriptor.hpp"
00011 #include "fdetect/Detector.hpp"
00012 #include "gfm/Matcher.hpp"
00013 #include "gfm/MatchingResult.hpp"
00014 
00015 #include "kernel/dataLog.hpp"
00016 #include <boost/noncopyable.hpp>
00017 
00018 namespace jafar {
00019   namespace gfm {
00020     class MatchSourceInfo;
00021     class DescriptorFactory;
00022     class Detector;
00023     class Matcher;
00028     class EngineCustom :
00029       public jafar::kernel::DataLoggable, public boost::noncopyable
00030     {
00031     public:
00032       EngineCustom(jafar::fdetect::Detector* detector, jafar::gfm::Matcher* matcher, jafar::gfm::Matcher* stereomatcher = 0, jafar::fdetect::DescriptorFactory* descriptor = 0, bool robustifyDetection = false) : m_detector(detector), m_descriptorFactory(descriptor), m_matcher(matcher),  m_stereoMatcher(stereomatcher), m_sourceInfoRef(0), robustifyDetection(robustifyDetection),
00033                                                      detect_time(0), match_time(0), stereo_time(0), ndetected(0), nmatched(0), nstereoed(0) { }
00034       ~EngineCustom();
00035     public:
00036       const jafar::fdetect::DetectionResult& currentPoints() const;
00042       jafar::fdetect::DetectionResult detect(jafar::image::Image const& image_ref);
00048       void initTracking(jafar::image::Image const& image_ref, 
00049       jafar::fdetect::DetectionResult& points_ref);
00057       jafar::gfm::MatchingResult track(jafar::image::Image const& image_match, 
00058                jafar::fdetect::DetectionResult& points_match);
00067       jafar::gfm::MatchingResult match(jafar::image::Image const& image_ref, 
00068                jafar::fdetect::DetectionResult& points_ref,
00069                jafar::image::Image const& image_match, 
00070                jafar::fdetect::DetectionResult& points_match);
00078       jafar::gfm::MatchingResult matchWithStereo(jafar::image::Image const& image_match,
00079              jafar::fdetect::DetectionResult& points_match);
00080       virtual void writeLogHeader(jafar::kernel::DataLogger& log) const;
00081       virtual void writeLogData(jafar::kernel::DataLogger& log) const;
00082     protected:
00083       inline MatchSourceInfo* sourceInfoRef() const { return m_sourceInfoRef; }
00084       inline Matcher* matcher() { return m_matcher; }
00085       inline fdetect::DescriptorFactory* descriptorFactory() { return m_descriptorFactory; }
00086       inline fdetect::Detector* detector() { return m_detector; }
00087     private:
00088       fdetect::Detector* m_detector;
00089       fdetect::DescriptorFactory* m_descriptorFactory;
00090       Matcher* m_matcher;
00091       Matcher* m_stereoMatcher;
00092       MatchSourceInfo* m_sourceInfoRef;
00093       bool robustifyDetection;
00094       image::Image buffer;
00095         
00096       long detect_time;
00097       long match_time;
00098       long stereo_time;
00099       int ndetected;
00100       int nmatched;
00101       int nstereoed;
00102     };
00103 
00104   }
00105 }
00106 
00107 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:20 for Jafar by doxygen 1.7.6.1
LAAS-CNRS