Vision Touch Surface Library
 All Classes Files Functions Variables Pages
kinecthandler.h
Go to the documentation of this file.
1 #ifndef KINECTHANDLER_H
2 #define KINECTHANDLER_H
3 
4 #include <iostream>
5 
6 #include <XnOpenNI.h>
7 
8 #include <XnCppWrapper.h>
9 
10 #include <opencv2/opencv.hpp>
11 #include <highgui.h>
12 
13 
14 using namespace std;
15 using namespace cv;
16 using namespace xn;
17 
24 {
25 private:
26 
27 protected:
28  Context context;
29  ImageGenerator g_image;
30  DepthGenerator d_image;
31  ImageMetaData g_imageMD;
32  EnumerationErrors errors;
33  XnStatus nRetVal;
34  const XnDepthPixel* pDepthMap;
35  const XnRGB24Pixel* pImage;
36 
37  int ResWidth,ResHeight;
38 
39 
40 
41  //virtual void findKeypointsUsingBlobs(Mat & touch, vector<cv::KeyPoint> & keypoints,int minArea, int maxArea );
42 
43 public:
44  KinectHandler();
45  ~KinectHandler();
46 
50  virtual void init();
51 
55  virtual void waitFrame();
56 
61  virtual void getDepthMap16( Mat & depthMap );
62 
67  virtual void getDepthMap08( Mat & depthMap );
68 
73  virtual void getImage( Mat & image );
74 
81  static void depthMapCorrection(Mat & input, Mat & output , bool interPolate = false);
82 
83  int getResWidth() const;
84  void setResWidth(int value);
85  int getResHeight() const;
86  void setResHeight(int value);
87 };
88 
89 #endif // KinectHandler_H