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

The VisionProcessor class performs image processing to the sensor data in order to detect the hands and the fingertips. More...

#include <visionprocessor.h>

Collaboration diagram for VisionProcessor:
Collaboration graph
[legend]

Public Member Functions

 VisionProcessor ()
 
virtual void init (int wRes=1024, int hRes=768)
 init initializes the paramameters for the image processing algorithms More...
 
virtual void getScreenTransformation ()
 getScreenTransformation segments and creates the transformation for going from sensor space to screen space More...
 
virtual void createMaxDepthWithHistogram (int numFrames=200)
 createMaxDepthWithHistogram generates a noise robust background map More...
 
virtual void processFrame (FrameData &frameData, double &processingDuration)
 processFrame waits for a frame and does the processing More...
 
cv::Size2i getKinectResolution () const
 
ProjectiveMapping getKinect2screen () const
 
void setKinect2screen (const ProjectiveMapping &value)
 

Protected Member Functions

virtual int segmentScreen (const Mat &grayFrame, int Ith, float epsilon, vector< Point2i > &screenContours, Mat &maskShow)
 

Protected Attributes

KinectHandler kinect
 
Mat mask
 
Mat maxDepth
 
ProjectiveMapping kinect2screen
 
float errorTolerance
 
float thicknessHand
 
float thicknesFinger
 
int sizes [2]
 
float tolerance
 
int epsilon
 
Mat minDepthHand
 
Mat minDepthFinger
 
float minAreaContour
 
float maxAreaContour
 
Mat erodeK
 
bool useScreenSeg
 
FourierDescriptor fdDictionary
 
float maxAreaFinger
 
float minAreaFinger
 
float maxExcentricity
 
float minExcentricity
 
float maxCirc
 
float minHandExc
 
float maxDist2Class
 
int descriptorNum
 
int wResolution
 
int hResolution
 
vector< Point2f > screenContoursCorners
 

Static Protected Attributes

static const int HAND_CLASS_ID =1
 
static const double PI = 3.14159265358979323846
 

Detailed Description

The VisionProcessor class performs image processing to the sensor data in order to detect the hands and the fingertips.

Constructor & Destructor Documentation

VisionProcessor::VisionProcessor ( )

Member Function Documentation

void VisionProcessor::createMaxDepthWithHistogram ( int  numFrames = 200)
virtual

createMaxDepthWithHistogram generates a noise robust background map

Parameters
numFramesnumber of frames to generate the histogram, 200 for default
ProjectiveMapping VisionProcessor::getKinect2screen ( ) const
Size2i VisionProcessor::getKinectResolution ( ) const
void VisionProcessor::getScreenTransformation ( )
virtual

getScreenTransformation segments and creates the transformation for going from sensor space to screen space

void VisionProcessor::init ( int  wRes = 1024,
int  hRes = 768 
)
virtual

init initializes the paramameters for the image processing algorithms

Parameters
wResis the width of the resolution the screen is working on, 1024 for default
hResis the height of the resolution the screen is working on, 768 for default
void VisionProcessor::processFrame ( FrameData frameData,
double &  processingDuration 
)
virtual

processFrame waits for a frame and does the processing

Parameters
frameDatainput/output variable with the frame data processed
processingDurationoutput variable with processing time needed in seconds
int VisionProcessor::segmentScreen ( const Mat &  grayFrame,
int  Ith,
float  epsilon,
vector< Point2i > &  screenContours,
Mat &  maskShow 
)
protectedvirtual
void VisionProcessor::setKinect2screen ( const ProjectiveMapping value)

Member Data Documentation

int VisionProcessor::descriptorNum
protected
int VisionProcessor::epsilon
protected
Mat VisionProcessor::erodeK
protected
float VisionProcessor::errorTolerance
protected
FourierDescriptor VisionProcessor::fdDictionary
protected
const int VisionProcessor::HAND_CLASS_ID =1
staticprotected
int VisionProcessor::hResolution
protected
KinectHandler VisionProcessor::kinect
protected
ProjectiveMapping VisionProcessor::kinect2screen
protected
Mat VisionProcessor::mask
protected
float VisionProcessor::maxAreaContour
protected
float VisionProcessor::maxAreaFinger
protected
float VisionProcessor::maxCirc
protected
Mat VisionProcessor::maxDepth
protected
float VisionProcessor::maxDist2Class
protected
float VisionProcessor::maxExcentricity
protected
float VisionProcessor::minAreaContour
protected
float VisionProcessor::minAreaFinger
protected
Mat VisionProcessor::minDepthFinger
protected
Mat VisionProcessor::minDepthHand
protected
float VisionProcessor::minExcentricity
protected
float VisionProcessor::minHandExc
protected
const double VisionProcessor::PI = 3.14159265358979323846
staticprotected
vector<Point2f> VisionProcessor::screenContoursCorners
protected
int VisionProcessor::sizes[2]
protected
float VisionProcessor::thicknesFinger
protected
float VisionProcessor::thicknessHand
protected
float VisionProcessor::tolerance
protected
bool VisionProcessor::useScreenSeg
protected
int VisionProcessor::wResolution
protected

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