Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
objectLoader.hpp
00001 /* $Id$ */
00002 
00003 #ifndef _OBJECT_LOADER_HPP
00004 #define _OBJECT_LOADER_HPP
00005 
00006 #include "kernel/jafarException.hpp"
00007 #include "kernel/csvFile.hpp"
00008 #include "image/Image.hpp"
00009 #include "jmath/jblas.hpp"
00010 #include "premodeler/ifManager.hpp"
00011 #include "premodeler/engine.hpp"
00012 #include "gfm/GroupsMatcher.hpp"
00013 #include "gfm/MatchingResult.hpp"
00014 #include "gfm/DetectionResult.hpp"
00015 #include "gfm/Detector.hpp"
00016 #include "gfm/HarrisDetector.hpp"
00017 #include "gfm/HarrisDescriptor.hpp"
00018 #include "gfm/DoubleDescriptor.hpp"
00019 #include "sift/SiftDetector.hpp"
00020 #include "surf/SurfDetector.hpp"
00021 
00022 namespace jafar {
00023   
00024   namespace oracle {
00029     class ObjectLoader : public kernel::CSVFileLoad {
00030 
00031       /*
00032        * private attributes and methodes 
00033        */
00034       private:
00036       premodeler::SequenceMR smr;
00038       premodeler::IFLists trackers;
00040       gfm::Detector *m_detector;
00042       gfm::GroupsMatcher* m_matcher;
00044       std::map<std::string, image::Image> imagesMap;
00046       premodeler::Engine::DetectorType m_type;
00048       std::map<int, gfm::DetectionResult> detectionResults;
00050       std::map<int, jblas::vec3> m_interestFeaturesCoordinates;
00051       public:
00053       ObjectLoader() : kernel::CSVFileLoad() { m_matcher = new gfm::GroupsMatcher(); };
00057       ObjectLoader(const std::string& modelFileName);
00059       ~ObjectLoader();
00061       inline gfm::Detector* detector() const {
00062         return m_detector;
00063       }
00065       inline gfm::GroupsMatcher* matcher() const {
00066         return m_matcher;
00067       }
00071       inline std::map<int, jblas::vec3> interestFeaturesCoordinates() const {
00072         return m_interestFeaturesCoordinates;
00073       }
00075       inline premodeler::SequenceMR sequenceMatchingResult() const {
00076         return smr;
00077       }
00079       inline premodeler::Engine::DetectorType detectorType() const{
00080         return m_type;
00081       }
00082       private:
00084       jafar::image::Image const& imageReference(const std::string& imgFileName);
00086       gfm::Detector* loadDetector(const kernel::CSVFile& file, 
00087                                   const int& detectorDataLine);
00089       gfm::GroupsMatcher* loadMatcher(const kernel::CSVFile& file, 
00090                                       const int& matcherDataLine);
00092       premodeler::IFList loadFeature(const kernel::CSVFile& file, 
00093                                      const int& featureDataLine);
00097       void insertFeature(const int& viewIndex, gfm::InterestFeature* feature);
00098 
00099       protected:
00100       void loadCSVFile(kernel::CSVFile& csvFile);
00101     };//class ObjectLoader
00102 
00103   }//namespace oracle
00104 
00105 }//namespace jafar
00106 
00107 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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