KINECT STATS GENERATOR FOR SPORTS VISUALISATION  1.0
Kinect.h
Go to the documentation of this file.
00001 #ifndef __KINECT_H__
00002 #define __KINECT_H__
00003 
00004 #include "libfreenect.hpp"
00005 #include <vector>
00006 #include "Mutex.h"
00007 #include <QObject>
00008 /* thanks to Yoda---- from IRC */
00009 class Kinect : public Freenect::FreenectDevice
00010 {
00011 public:
00012   Kinect(freenect_context *_ctx, int _index);
00013   ~Kinect(){;}
00014     // Do not call directly even in child
00015   void VideoCallback(void* _rgb, uint32_t timestamp);
00016 
00017   void DepthCallback(void* _depth, uint32_t timestamp) ;
00018   bool getRGB(std::vector<uint8_t> &buffer);
00019 
00020   bool getDepth(std::vector<uint8_t> &buffer);
00021 public :
00022   void setAngle(double _angle);
00023   void setRedLed();
00024   void setGreenLed();
00025   void setYellowLed();
00026   void setRedLedFlash();
00027   void setGreenLedFlash();
00028   void setYellowLedFlash();
00029   void setVideoMode(int _mode);
00030   void resetAngle();
00031 private:
00032   std::vector<uint8_t> m_buffer_depth;
00033   std::vector<uint8_t> m_buffer_video;
00034   std::vector<uint16_t> m_gamma;
00035   Mutex m_rgb_mutex;
00036   Mutex m_depth_mutex;
00037   bool m_new_rgb_frame;
00038   bool m_new_depth_frame;
00039 
00040 };
00041 #endif // KINECT_H
 All Classes Files Functions Variables Enumerations Enumerator