Vision Touch Surface Library
 All Classes Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
KinectHandler Class Reference

The KinectHandler class is an interface to comunicate with the kinect SDK. More...

#include <kinecthandler.h>

Public Member Functions

 KinectHandler ()
 
 ~KinectHandler ()
 
virtual void init ()
 init creates the conection with the device More...
 
virtual void waitFrame ()
 waitFrame waits until there is a frame avaliable to retrieve More...
 
virtual void getDepthMap16 (Mat &depthMap)
 getDepthMap16 retrieves the depthmap of the current frame 16 precision More...
 
virtual void getDepthMap08 (Mat &depthMap)
 getDepthMap16 retrieves the depthmap of the current frame 8 precision More...
 
virtual void getImage (Mat &image)
 getImage retrieves the RGB image from the current frame More...
 
int getResWidth () const
 
void setResWidth (int value)
 
int getResHeight () const
 
void setResHeight (int value)
 

Static Public Member Functions

static void depthMapCorrection (Mat &input, Mat &output, bool interPolate=false)
 depthMapCorrection uses opencv inpaint to correct the holes from the depthmap More...
 

Protected Attributes

Context context
 
ImageGenerator g_image
 
DepthGenerator d_image
 
ImageMetaData g_imageMD
 
EnumerationErrors errors
 
XnStatus nRetVal
 
const XnDepthPixel * pDepthMap
 
const XnRGB24Pixel * pImage
 
int ResWidth
 
int ResHeight
 

Detailed Description

The KinectHandler class is an interface to comunicate with the kinect SDK.

The aim of this class is being able to make the system more modular this class is the only one needed to be modified when there are changes on the kinect SDK

Constructor & Destructor Documentation

KinectHandler::KinectHandler ( )
KinectHandler::~KinectHandler ( )

Member Function Documentation

void KinectHandler::depthMapCorrection ( Mat &  input,
Mat &  output,
bool  interPolate = false 
)
static

depthMapCorrection uses opencv inpaint to correct the holes from the depthmap

Parameters
inputis an opencv Mat of type CV_16UC1 depthmap with holes to be corrected
outputis an opencv Mat of type CV_8UC1 depthmap with corrected holes
interPolateif true the computing is interpolated for faster performance
void KinectHandler::getDepthMap08 ( Mat &  depthMap)
virtual

getDepthMap16 retrieves the depthmap of the current frame 8 precision

Parameters
depthMapi/o variable that returns the depthmap using a opencv Mat of type CV_8UC1
void KinectHandler::getDepthMap16 ( Mat &  depthMap)
virtual

getDepthMap16 retrieves the depthmap of the current frame 16 precision

Parameters
depthMapi/o variable that returns the depthmap using a opencv Mat of type CV_16UC1
void KinectHandler::getImage ( Mat &  image)
virtual

getImage retrieves the RGB image from the current frame

Parameters
imagei/o variable that returns the RGB image using a opencv Mat of type CV_8UC3
int KinectHandler::getResHeight ( ) const
int KinectHandler::getResWidth ( ) const
void KinectHandler::init ( )
virtual

init creates the conection with the device

void KinectHandler::setResHeight ( int  value)
void KinectHandler::setResWidth ( int  value)
void KinectHandler::waitFrame ( )
virtual

waitFrame waits until there is a frame avaliable to retrieve

Member Data Documentation

Context KinectHandler::context
protected
DepthGenerator KinectHandler::d_image
protected
EnumerationErrors KinectHandler::errors
protected
ImageGenerator KinectHandler::g_image
protected
ImageMetaData KinectHandler::g_imageMD
protected
XnStatus KinectHandler::nRetVal
protected
const XnDepthPixel* KinectHandler::pDepthMap
protected
const XnRGB24Pixel* KinectHandler::pImage
protected
int KinectHandler::ResHeight
protected
int KinectHandler::ResWidth
protected

The documentation for this class was generated from the following files: