RecognizerThread.h
Go to the documentation of this file.
00001 
00002 
00003 #ifndef _RECOGNIZER_THREAD_H_
00004 #define _RECOGNIZER_THREAD_H_
00005 
00006 #include <blort/ThreadObject/Thread.h>
00007 #include <blort/Recognizer3D/Recognizer3D.h>
00008 #include <vector>
00009 #include <opencv2/core/core.hpp>
00010 
00011 class CRecognizerThread : public CThread
00012 {
00013 private:
00014         enum Command{
00015                 RECOGNIZE,
00016                 LEARN,
00017                 LOAD,
00018                 SAVE,
00019                 GETSIFT,
00020                 GETLASTSIFT,
00021                 IDLE,
00022         };
00023         Command cmd;
00024         
00025         CEventClass m_evCmd, m_evData;
00026         CMutexClass m_running;
00027         
00028         bool m_quit;
00029         float m_conf;
00030         std::string m_sift_file;
00031         blortRecognizer::CameraParameter m_params;
00032         TomGine::tgPose m_pose; 
00033         TomGine::tgModel m_model;
00034         IplImage* m_image;
00035         std::vector<blortRecognizer::Siftex> m_lastsiftexlist;
00036         std::vector<blortRecognizer::Siftex> m_siftexlist;
00037 
00038         //BENCE
00039         cv::Mat result;
00040         std::string config_root;
00041         
00042 public:
00043         CRecognizerThread(const blortRecognizer::CameraParameter& params, std::string config_root="");
00044         ~CRecognizerThread();
00045         
00046         void Recognize(IplImage* image, TomGine::tgPose& pose, float& conf);
00047         
00048         void LearnSifts(IplImage* image,  TomGine::tgModel &model, TomGine::tgPose& pose);
00049         
00050         void LoadSiftModel(const std::string sift_file);
00051         
00052         void SaveSiftModel(const std::string sift_file);
00053         
00054         void GetSifts(std::vector<blortRecognizer::Siftex>& sl);
00055         
00056         void GetLastSifts(std::vector<blortRecognizer::Siftex>& sl);
00057         
00058         virtual BOOL OnTask();
00059                 
00060         //BENCE
00061         cv::Mat getImage(){ return result; }
00062 };
00063 
00064 #endif /* _RECOGNIZER_THREAD_H_ */
00065 


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Thu Jan 2 2014 11:38:25