#ifndef __APP__ #define __APP__ #include #include #include #include #include using namespace Microsoft::WRL; class Kinect { private: // Sensor ComPtr kinect; // Reader ComPtr multiSourceFrameReader; // Color Buffer std::vector colorBuffer; int colorWidth; int colorHeight; unsigned int colorBytesPerPixel; cv::Mat colorMat; // Depth Buffer std::vector depthBuffer; int depthWidth; int depthHeight; unsigned int depthBytesPerPixel; cv::Mat depthMat; public: // Constructor Kinect(); // Destructor ~Kinect(); // Processing void run(); private: // Initialize void initialize(); // Initialize Sensor inline void initializeSensor(); // Initialize Multi Source inline void initializeMultiSource(); // Initialize Color inline void initializeColor(); // Initialize Depth inline void initializeDepth(); // Finalize void finalize(); // Update Data void update(); // Update Color inline void updateColor( const ComPtr& multiSourceFrame ); // Update Depth inline void updateDepth( const ComPtr& multiSourceFrame ); // Draw Data void draw(); // Draw Color inline void drawColor(); // Draw Depth inline void drawDepth(); // Show Data void show(); // Show Color inline void showColor(); // Show Depth inline void showDepth(); }; #endif // __APP__