ObjectEntry.h
Go to the documentation of this file.
00001 #ifndef _H_OBJECTENTRY_H_
00002 #define _H_OBJECTENTRY_H_
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <blort/TomGine/tgPose.h>
00008 #include <blort/Tracker/TrackingStates.h>
00009 #include <boost/shared_ptr.hpp>
00010 
00011 namespace blort
00012 {
00013 
00014   struct RecogData
00015   {
00016     RecogData(){}
00017     RecogData(std::string sift_fn): sift_file(sift_fn) {}
00018     std::string sift_file;
00019     double conf;
00020     TomGine::tgPose pose;
00021   };
00022 
00023   struct ObjectEntry
00024   {
00025     std::string name;
00026     std::string ply_model;
00027     std::vector<RecogData> recog_data;
00028 
00029     // message fields of blort_msgs::TrackerConfidence
00030     double edgeConf;
00031     double confThreshold;
00032     double lostConf;
00033     double distance;
00034 
00035     // Tracker data
00036     Tracking::movement_state movement;
00037     Tracking::quality_state quality;
00038     Tracking::confidence_state tracking_conf;
00039     boost::shared_ptr<TomGine::tgPose> tr_pose; // current pose of the object used by the tracker module
00040     bool is_tracked; // whether the object should be tracked or not
00041 
00042     ObjectEntry()
00043       : is_tracked(false)
00044     {}
00045   };
00046 
00047   /*
00048  *@return the name of the sift file with the best confidence
00049  */
00050   RecogData getBest(const ObjectEntry& obj);
00051 
00052   /* This build a vector of ObjectEntry from ply_models/sift_files/model_names vector */
00053   void buildFromFiles(const std::vector<std::string> & ply_models, const std::vector<std::string> & sift_files, const std::vector<std::string> & model_names, std::vector<ObjectEntry> & out);
00054 
00055   /* Additionnaly build a sift-index */
00056   void buildFromFiles(const std::vector<std::string> & ply_models, const std::vector<std::string> & sift_files, const std::vector<std::string> & model_names, std::vector<ObjectEntry> & out, std::vector<size_t> & sift_index);
00057 
00058 } // namespace
00059 
00060 #endif


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12