$search
00001 00002 00003 #ifndef _CAMERA_THREAD_H_ 00004 #define _CAMERA_THREAD_H_ 00005 00006 #include <blort/ThreadObject/Thread.h> 00007 #include <blort/TomGine/tgTimer.h> 00008 #include <opencv/cv.h> 00009 #include <opencv/highgui.h> 00010 00011 class CCameraThread : public CThread 00012 { 00013 private: 00014 bool m_new_image; 00015 int m_camID; 00016 int m_width; 00017 int m_height; 00018 00019 TomGine::tgTimer m_timer; 00020 00021 CvCapture* m_capture; 00022 IplImage* m_image; 00023 00024 CEventClass m_evData; 00025 00026 public: 00027 CCameraThread(int camID, int width, int height); 00028 ~CCameraThread(); 00029 00030 virtual BOOL OnTask(); 00031 00032 bool GetImage(IplImage* image); 00033 void GetSize(int &width, int &height){ width = m_width; height = m_height; } 00034 00035 }; 00036 00037 #endif /* _CAMERA_THREAD_H_ */ 00038