cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Friends | List of all members
osaOpenNI Class Reference

#include <osaOpenNI.h>

Public Types

enum  Errno { ESUCCESS, EFAILURE }
 

Public Member Functions

 osaOpenNI (int numUsers=0)
 Default Constructor. More...
 
 osaOpenNI (int numUsers, char usrPath)
 Constructor for Predefined Skeleton Calibration FIles. More...
 
 ~osaOpenNI ()
 Default DeConstructor. More...
 
void CleanupExit ()
 Clean Up and Exit. More...
 
void Configure (const std::string &devname="")
 Configure. More...
 
void Update (int type)
 Update All. More...
 
void InitSkeletons ()
 Init skeletons. More...
 
osaOpenNI::Errno GetRangeData (vctDynamicMatrix< double > &rangedata, const std::vector< vctFixedSizeVector< unsigned short, 2 > > &pixels)
 Get range data. More...
 
osaOpenNI::Errno GetRangeData (vctDynamicMatrixRef< vctFloat3 > rangedata)
 
osaOpenNI::Errno GetDepthImageRaw (vctDynamicMatrix< double > &depthimage)
 Get Raw Depth Image. More...
 
osaOpenNI::Errno GetDepthImageRaw (vctDynamicMatrixRef< unsigned short > depthimage)
 
void GetDepthImage (vctDynamicMatrix< double > &placeHolder)
 Get Depth Image. More...
 
osaOpenNI::Errno GetRGBImage (vctDynamicMatrix< unsigned char > &RGBinterlaced)
 Get (interlaced) RGB image. More...
 
osaOpenNI::Errno GetRGBImage (vctDynamicMatrixRef< unsigned char > RGBinterlaced)
 
osaOpenNI::Errno GetRGBPlanarImage (vctDynamicNArray< unsigned char, 3 > &RGBplanar)
 Get (planar) RGB image. More...
 
std::vector< osaOpenNISkeleton * > & UpdateAndGetUserSkeletons (void)
 Get Current User Skeletons. More...
 
void UpdateUserSkeletons (void)
 Get Current User Skeletons. More...
 
std::vector< osaOpenNISkeleton * > & GetUserSkeletons (void)
 Get Current User Skeletons. More...
 
osaOpenNI::Errno Convert3DToProjectiveMask (const vctDynamicMatrix< double > &rangedata, vctDynamicMatrix< bool > &mask)
 
void Convert3DToProjective (const vctFloat3 &point3d, vctFloat3 &point2d)
 

Friends

class osaOpenNISkeleton
 

Member Enumeration Documentation

Enumerator
ESUCCESS 
EFAILURE 

Constructor & Destructor Documentation

osaOpenNI::osaOpenNI ( int  numUsers = 0)

Default Constructor.

osaOpenNI::osaOpenNI ( int  numUsers,
char  usrPath 
)

Constructor for Predefined Skeleton Calibration FIles.

osaOpenNI::~osaOpenNI ( )

Default DeConstructor.

Member Function Documentation

void osaOpenNI::CleanupExit ( )

Clean Up and Exit.

void osaOpenNI::Configure ( const std::string &  devname = "")

Configure.

Creates all nodes, populates callback lists and establishes contexts for depth, rgbImage and users.

void osaOpenNI::Convert3DToProjective ( const vctFloat3 point3d,
vctFloat3 point2d 
)
osaOpenNI::Errno osaOpenNI::Convert3DToProjectiveMask ( const vctDynamicMatrix< double > &  rangedata,
vctDynamicMatrix< bool > &  mask 
)
void osaOpenNI::GetDepthImage ( vctDynamicMatrix< double > &  placeHolder)

Get Depth Image.

Query the depth generator to obtain a depth image. Resulting image as 11-bit depth. The value at each pixel represents the depth of the picture element. This method is non-const due to updating the context.

osaOpenNI::Errno osaOpenNI::GetDepthImageRaw ( vctDynamicMatrix< double > &  depthimage)

Get Raw Depth Image.

Query the depth generator to obtain a depth image. Resulting image as 8-bit depth. The value at each pixel represents the depth of the picture element. This method is non-const due to updating the context.

osaOpenNI::Errno osaOpenNI::GetDepthImageRaw ( vctDynamicMatrixRef< unsigned short >  depthimage)
osaOpenNI::Errno osaOpenNI::GetRangeData ( vctDynamicMatrix< double > &  rangedata,
const std::vector< vctFixedSizeVector< unsigned short, 2 > > &  pixels 
)

Get range data.

Query the depth generator to obtain a depth image and convert the image to a points cloud. If the depth image is MxN, then the point cloud is a matrix of size 3x(MxN) where each column are the X-Y-Z coordinate of a point. This method is non-const due to updating the context.

Returns
A 3x(MxN) point cloud.
osaOpenNI::Errno osaOpenNI::GetRangeData ( vctDynamicMatrixRef< vctFloat3 rangedata)
osaOpenNI::Errno osaOpenNI::GetRGBImage ( vctDynamicMatrix< unsigned char > &  RGBinterlaced)

Get (interlaced) RGB image.

osaOpenNI::Errno osaOpenNI::GetRGBImage ( vctDynamicMatrixRef< unsigned char >  RGBinterlaced)
osaOpenNI::Errno osaOpenNI::GetRGBPlanarImage ( vctDynamicNArray< unsigned char, 3 > &  RGBplanar)

Get (planar) RGB image.

std::vector<osaOpenNISkeleton*>& osaOpenNI::GetUserSkeletons ( void  )

Get Current User Skeletons.

void osaOpenNI::InitSkeletons ( )

Init skeletons.

void osaOpenNI::Update ( int  type)

Update All.

Calls the wait and update all method of the XN wrapper. This needs to be called each iteration.

std::vector<osaOpenNISkeleton*>& osaOpenNI::UpdateAndGetUserSkeletons ( void  )

Get Current User Skeletons.

void osaOpenNI::UpdateUserSkeletons ( void  )

Get Current User Skeletons.

Friends And Related Function Documentation

friend class osaOpenNISkeleton
friend

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