Go to the documentation of this file.00001
00008 #ifndef DATAMANAGERACTIVESEARCH_HPP_
00009 #define DATAMANAGERACTIVESEARCH_HPP_
00010
00011 #if 0
00012 #include "rtslam/dataManagerAbstract.hpp"
00013 #include "rtslam/activeSearch.hpp"
00014
00015 namespace jafar {
00016 namespace rtslam {
00017
00018 template< class RawSpec,class SensorSpec, class Detector, class Matcher >
00019 class DataManagerActiveSearch
00020 : public DataManagerAbstract
00021 , public SpecificChildOf<SensorSpec>
00022 {
00023 public:
00024
00025 ENABLE_LINK_TO_SPECIFIC_PARENT(SensorAbstract,SensorSpec,
00026 SensorSpec,DataManagerAbstract);
00027
00028 ENABLE_ACCESS_TO_SPECIFIC_PARENT(SensorSpec,sensorSpec);
00029
00030
00031 protected:
00032 boost::shared_ptr<Detector> detector;
00033 boost::shared_ptr<Matcher> matcher;
00034 boost::shared_ptr<ActiveSearchGrid> asGrid;
00035
00036 typedef map<double, observation_ptr_t> ObservationListSorted;
00037 ObservationListSorted obsListSorted;
00038 struct detector_params_t {
00039 int patchSize;
00040 double measStd;
00041 double measVar;
00042 } detectorParams_;
00043 struct matcher_params_t {
00044 int patchSize;
00045 double regionSigma;
00046 double threshold;
00047 double mahalanobisTh;
00048 double measStd;
00049 double measVar;
00050 } matcherParams_;
00051 struct alg_params_t {
00052 int n_updates;
00053 } algorithmParams_;
00054 public:
00055 void setDetector(const boost::shared_ptr<Detector> & _detector, int _patchSize, double _measStd){
00056 detector = _detector;
00057 detectorParams_.patchSize = _patchSize;
00058 detectorParams_.measStd = _measStd;
00059 detectorParams_.measVar = _measStd * _measStd;
00060 }
00061 detector_params_t detectorParams(){return detectorParams_;}
00062 void setMatcher(boost::shared_ptr<Matcher> & _matcher, int _patchSize, double _nSigma, double _threshold, double _mahalanobisTh, double _measStd){
00063 matcher = _matcher;
00064 matcherParams_.patchSize = _patchSize;
00065 matcherParams_.regionSigma = _nSigma;
00066 matcherParams_.threshold = _threshold;
00067 matcherParams_.mahalanobisTh = _mahalanobisTh;
00068 matcherParams_.measStd = _measStd;
00069 matcherParams_.measVar = _measStd * _measStd;
00070 }
00071 matcher_params_t matcherParams(){return matcherParams_;}
00072 void setActiveSearchGrid( boost::shared_ptr<ActiveSearchGrid> arg ) { asGrid=arg; }
00073 boost::shared_ptr<ActiveSearchGrid> activeSearchGrid( void ) { return asGrid; }
00074 void setAlgorithmParams(int n_updates){
00075 algorithmParams_.n_updates = n_updates;
00076 }
00077 alg_params_t algorithmParams(){return algorithmParams_;}
00078 protected:
00079 void detectNewObs( boost::shared_ptr<RawSpec> data );
00080 bool match(const boost::shared_ptr<RawImage> & rawPtr, const appearance_ptr_t & targetApp, image::ConvexRoi &roi, Measurement & measure, const appearance_ptr_t & app);
00081 void processKnownObs( boost::shared_ptr<RawSpec> data );
00082
00083 public:
00084 virtual ~DataManagerActiveSearch( void ) {}
00085
00086 virtual void process( boost::shared_ptr<RawAbstract> data );
00087
00088 };
00089 }
00090 }
00091
00092
00093 #include "rtslam/rawImage.hpp"
00094 #include "rtslam/sensorPinhole.hpp"
00095
00096 namespace jafar {
00097 namespace rtslam {
00098
00099
00100
00101 }
00102 }
00103
00104
00105 #include "rtslam/dataManagerActiveSearch.impl.hpp"
00106
00107 #endif
00108 #endif