Class representing an astract device for Primesense or MS Kinect devices. More...
#include <openni_device.h>
Public Types | |
typedef unsigned | CallbackHandle |
typedef boost::function< void(boost::shared_ptr< DepthImage >, void *cookie) > | DepthImageCallbackFunction |
typedef boost::function< void(boost::shared_ptr< Image >, void *cookie) > | ImageCallbackFunction |
typedef boost::function< void(boost::shared_ptr< IRImage >, void *cookie) > | IRImageCallbackFunction |
Public Member Functions | |
virtual bool | findCompatibleDepthMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw (OpenNIException) |
virtual bool | findCompatibleImageMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw (OpenNIException) |
unsigned char | getAddress () const throw () |
float | getBaseline () const throw () |
unsigned char | getBus () const throw () |
const char * | getConnectionString () const throw () |
returns the connectionstring for current device, which has following format vendorID/productID@BusID/DeviceID More... | |
virtual const XnMapOutputMode & | getDefaultDepthMode () const throw () |
virtual const XnMapOutputMode & | getDefaultImageMode () const throw () |
virtual const XnMapOutputMode & | getDefaultIRMode () const throw () |
float | getDepthFocalLength (int output_x_resolution=0) const throw () |
returns the focal length for the IR camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the depth image. More... | |
XnMapOutputMode | getDepthOutputMode () const throw (OpenNIException) |
float | getImageFocalLength (int output_x_resolution=0) const throw () |
returns the focal length for the color camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the image. More... | |
XnMapOutputMode | getImageOutputMode () const throw (OpenNIException) |
XnMapOutputMode | getIROutputMode () const throw (OpenNIException) |
unsigned short | getProductID () const throw () |
const char * | getProductName () const throw () |
const char * | getSerialNumber () throw () |
returns the serial number for device. More... | |
unsigned short | getVendorID () const throw () |
const char * | getVendorName () const throw () |
bool | hasDepthStream () const throw () |
bool | hasImageStream () const throw () |
bool | hasIRStream () const throw () |
virtual bool | isDepthCropped () const throw (OpenNIException) |
virtual bool | isDepthCroppingSupported () const throw () |
virtual bool | isDepthModeSupported (const XnMapOutputMode &output_mode) const throw (OpenNIException) |
bool | isDepthRegistered () const throw (OpenNIException) |
virtual bool | isDepthRegistrationSupported () const throw (OpenNIException) |
virtual bool | isDepthStreamRunning () const throw (OpenNIException) |
virtual bool | isImageModeSupported (const XnMapOutputMode &output_mode) const throw (OpenNIException) |
virtual bool | isImageStreamRunning () const throw (OpenNIException) |
virtual bool | isIRStreamRunning () const throw (OpenNIException) |
virtual bool | isSynchronizationSupported () const throw () |
virtual bool | isSynchronized () const throw (OpenNIException) |
CallbackHandle | registerDepthCallback (const DepthImageCallbackFunction &callback, void *cookie=NULL) throw () |
template<typename T > | |
CallbackHandle | registerDepthCallback (void(T::*callback)(boost::shared_ptr< DepthImage >, void *cookie), T &instance, void *cookie=NULL) throw () |
CallbackHandle | registerImageCallback (const ImageCallbackFunction &callback, void *cookie=NULL) throw () |
template<typename T > | |
CallbackHandle | registerImageCallback (void(T::*callback)(boost::shared_ptr< Image >, void *cookie), T &instance, void *cookie=NULL) throw () |
CallbackHandle | registerIRCallback (const IRImageCallbackFunction &callback, void *cookie=NULL) throw () |
template<typename T > | |
CallbackHandle | registerIRCallback (void(T::*callback)(boost::shared_ptr< IRImage >, void *cookie), T &instance, void *cookie=NULL) throw () |
virtual void | setDepthCropping (unsigned x, unsigned y, unsigned width, unsigned height) throw (OpenNIException) |
virtual void | setDepthOutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException) |
virtual void | setDepthRegistration (bool on_off) throw (OpenNIException) |
virtual void | setImageOutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException) |
virtual void | setIROutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException) |
virtual void | setSynchronization (bool on_off) throw (OpenNIException) |
void | shutdown () |
virtual void | startDepthStream () throw (OpenNIException) |
virtual void | startImageStream () throw (OpenNIException) |
virtual void | startIRStream () throw (OpenNIException) |
virtual void | stopDepthStream () throw (OpenNIException) |
virtual void | stopImageStream () throw (OpenNIException) |
virtual void | stopIRStream () throw (OpenNIException) |
bool | unregisterDepthCallback (const CallbackHandle &callbackHandle) throw () |
bool | unregisterImageCallback (const CallbackHandle &callbackHandle) throw () |
bool | unregisterIRCallback (const CallbackHandle &callbackHandle) throw () |
virtual | ~OpenNIDevice () throw () |
Protected Types | |
typedef boost::function< void(boost::shared_ptr< DepthImage >) > | ActualDepthImageCallbackFunction |
typedef boost::function< void(boost::shared_ptr< Image >) > | ActualImageCallbackFunction |
typedef boost::function< void(boost::shared_ptr< IRImage >) > | ActualIRImageCallbackFunction |
Protected Member Functions | |
void | DepthDataThreadFunction () throw (OpenNIException) |
virtual void | enumAvailableModes () throw (OpenNIException) |
virtual boost::shared_ptr< Image > | getCurrentImage (boost::shared_ptr< xn::ImageMetaData > image_data) const =0 throw () |
void | ImageDataThreadFunction () throw (OpenNIException) |
void | Init () throw (OpenNIException) |
void | IRDataThreadFunction () throw (OpenNIException) |
virtual bool | isImageResizeSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const =0 throw () |
OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &image_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) throw (OpenNIException) | |
OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) throw (OpenNIException) | |
OpenNIDevice (xn::Context &context) throw (OpenNIException) | |
void | setRegistration (bool on_off) throw (OpenNIException) |
Static Protected Member Functions | |
static void __stdcall | NewDepthDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
static void __stdcall | NewImageDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
static void __stdcall | NewIRDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
Static Protected Attributes | |
static const float | rgb_focal_length_SXGA_ = 1050 |
focal length for regular camera producing color images in native SXGA mode More... | |
Class representing an astract device for Primesense or MS Kinect devices.
Definition at line 66 of file openni_device.h.
|
protected |
Definition at line 164 of file openni_device.h.
|
protected |
Definition at line 163 of file openni_device.h.
|
protected |
Definition at line 165 of file openni_device.h.
typedef unsigned openni_wrapper::OpenNIDevice::CallbackHandle |
Definition at line 72 of file openni_device.h.
typedef boost::function<void(boost::shared_ptr<DepthImage>, void* cookie) > openni_wrapper::OpenNIDevice::DepthImageCallbackFunction |
Definition at line 70 of file openni_device.h.
typedef boost::function<void(boost::shared_ptr<Image>, void* cookie) > openni_wrapper::OpenNIDevice::ImageCallbackFunction |
Definition at line 69 of file openni_device.h.
typedef boost::function<void(boost::shared_ptr<IRImage>, void* cookie) > openni_wrapper::OpenNIDevice::IRImageCallbackFunction |
Definition at line 71 of file openni_device.h.
|
virtual |
Definition at line 128 of file openni_device.cpp.
|
protected |
Definition at line 54 of file openni_device.cpp.
|
protected |
Definition at line 92 of file openni_device.cpp.
|
protected |
Definition at line 122 of file openni_device.cpp.
|
protected |
Definition at line 522 of file openni_device.cpp.
|
protectedvirtual |
Reimplemented in openni_wrapper::DeviceKinect, openni_wrapper::DeviceXtionPro, and openni_wrapper::DevicePrimesense.
Definition at line 812 of file openni_device.cpp.
|
virtual |
Definition at line 782 of file openni_device.cpp.
|
virtual |
Definition at line 752 of file openni_device.cpp.
unsigned char openni_wrapper::OpenNIDevice::getAddress | ( | ) | const | |
throw | ( | |||
) |
Definition at line 728 of file openni_device.cpp.
|
inline |
Definition at line 260 of file openni_device.h.
unsigned char openni_wrapper::OpenNIDevice::getBus | ( | ) | const | |
throw | ( | |||
) |
Definition at line 716 of file openni_device.cpp.
const char * openni_wrapper::OpenNIDevice::getConnectionString | ( | ) | const | |
throw | ( | |||
) |
returns the connectionstring for current device, which has following format vendorID/productID@BusID/DeviceID
Definition at line 679 of file openni_device.cpp.
|
protectedpure virtual |
|
virtual |
Definition at line 875 of file openni_device.cpp.
|
virtual |
Definition at line 870 of file openni_device.cpp.
|
virtual |
Definition at line 880 of file openni_device.cpp.
|
inline |
returns the focal length for the IR camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the depth image.
Definition at line 248 of file openni_device.h.
XnMapOutputMode openni_wrapper::OpenNIDevice::getDepthOutputMode | ( | ) | const | |
throw | ( | OpenNIException | ||
) |
Definition at line 938 of file openni_device.cpp.
|
inline |
returns the focal length for the color camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the image.
Definition at line 239 of file openni_device.h.
XnMapOutputMode openni_wrapper::OpenNIDevice::getImageOutputMode | ( | ) | const | |
throw | ( | OpenNIException | ||
) |
Definition at line 925 of file openni_device.cpp.
XnMapOutputMode openni_wrapper::OpenNIDevice::getIROutputMode | ( | ) | const | |
throw | ( | OpenNIException | ||
) |
Definition at line 951 of file openni_device.cpp.
unsigned short openni_wrapper::OpenNIDevice::getProductID | ( | ) | const | |
throw | ( | |||
) |
Definition at line 701 of file openni_device.cpp.
const char * openni_wrapper::OpenNIDevice::getProductName | ( | ) | const | |
throw | ( | |||
) |
Definition at line 746 of file openni_device.cpp.
const char * openni_wrapper::OpenNIDevice::getSerialNumber | ( | ) | ||
throw | ( | |||
) |
returns the serial number for device.
Definition at line 656 of file openni_device.cpp.
unsigned short openni_wrapper::OpenNIDevice::getVendorID | ( | ) | const | |
throw | ( | |||
) |
Definition at line 684 of file openni_device.cpp.
const char * openni_wrapper::OpenNIDevice::getVendorName | ( | ) | const | |
throw | ( | |||
) |
Definition at line 740 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::hasDepthStream | ( | ) | const | |
throw | ( | |||
) |
Definition at line 340 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::hasImageStream | ( | ) | const | |
throw | ( | |||
) |
Definition at line 333 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::hasIRStream | ( | ) | const | |
throw | ( | |||
) |
Definition at line 347 of file openni_device.cpp.
|
protected |
Definition at line 492 of file openni_device.cpp.
|
protected |
Definition at line 162 of file openni_device.cpp.
|
protected |
Definition at line 554 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 456 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 450 of file openni_device.cpp.
|
virtual |
Definition at line 860 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::isDepthRegistered | ( | ) | const | |
throw | ( | OpenNIException | ||
) |
Definition at line 382 of file openni_device.cpp.
|
virtual |
Definition at line 396 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 321 of file openni_device.cpp.
|
virtual |
Definition at line 850 of file openni_device.cpp.
|
protectedpure virtual |
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 315 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 327 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 404 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 436 of file openni_device.cpp.
|
staticprotected |
Definition at line 586 of file openni_device.cpp.
|
staticprotected |
Definition at line 592 of file openni_device.cpp.
|
staticprotected |
Definition at line 598 of file openni_device.cpp.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerDepthCallback | ( | const DepthImageCallbackFunction & | callback, |
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 621 of file openni_device.cpp.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerDepthCallback | ( | void(T::*)(boost::shared_ptr< DepthImage >, void *cookie) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 271 of file openni_device.h.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerImageCallback | ( | const ImageCallbackFunction & | callback, |
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 604 of file openni_device.cpp.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerImageCallback | ( | void(T::*)(boost::shared_ptr< Image >, void *cookie) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 265 of file openni_device.h.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerIRCallback | ( | const IRImageCallbackFunction & | callback, |
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 639 of file openni_device.cpp.
OpenNIDevice::CallbackHandle openni_wrapper::OpenNIDevice::registerIRCallback | ( | void(T::*)(boost::shared_ptr< IRImage >, void *cookie) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | |||
throw | ( | ||
) |
Definition at line 277 of file openni_device.h.
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 472 of file openni_device.cpp.
|
virtual |
Definition at line 899 of file openni_device.cpp.
|
virtual |
Definition at line 353 of file openni_device.cpp.
|
virtual |
Definition at line 886 of file openni_device.cpp.
|
virtual |
Definition at line 912 of file openni_device.cpp.
|
protected |
|
virtual |
Reimplemented in openni_wrapper::DeviceKinect.
Definition at line 411 of file openni_device.cpp.
void openni_wrapper::OpenNIDevice::shutdown | ( | ) |
Definition at line 133 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DevicePrimesense, openni_wrapper::DeviceXtionPro, and openni_wrapper::DeviceONI.
Definition at line 247 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DevicePrimesense, and openni_wrapper::DeviceONI.
Definition at line 215 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 281 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 264 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 231 of file openni_device.cpp.
|
virtual |
Reimplemented in openni_wrapper::DeviceONI.
Definition at line 298 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::unregisterDepthCallback | ( | const CallbackHandle & | callbackHandle | ) | |
throw | ( | ||||
) |
Definition at line 630 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::unregisterImageCallback | ( | const CallbackHandle & | callbackHandle | ) | |
throw | ( | ||||
) |
Definition at line 613 of file openni_device.cpp.
bool openni_wrapper::OpenNIDevice::unregisterIRCallback | ( | const CallbackHandle & | callbackHandle | ) | |
throw | ( | ||||
) |
Definition at line 648 of file openni_device.cpp.
|
protected |
Definition at line 195 of file openni_device.h.
|
protected |
Definition at line 194 of file openni_device.h.
|
protected |
distance between the projector and the IR camera
Definition at line 216 of file openni_device.h.
|
protected |
context to OpenNI driver
Definition at line 198 of file openni_device.h.
|
protected |
Definition at line 236 of file openni_device.h.
|
protected |
Definition at line 191 of file openni_device.h.
|
protected |
Definition at line 209 of file openni_device.h.
|
protected |
Definition at line 226 of file openni_device.h.
|
protected |
Definition at line 234 of file openni_device.h.
|
protected |
focal length for IR camera producing depth information in native SXGA mode
Definition at line 214 of file openni_device.h.
|
protected |
Depth generator object.
Definition at line 203 of file openni_device.h.
|
mutableprotected |
Definition at line 231 of file openni_device.h.
|
protected |
node object for current device
Definition at line 200 of file openni_device.h.
|
protected |
Definition at line 190 of file openni_device.h.
|
protected |
Definition at line 210 of file openni_device.h.
|
protected |
Definition at line 225 of file openni_device.h.
|
protected |
Definition at line 233 of file openni_device.h.
|
protected |
Image generator object.
Definition at line 205 of file openni_device.h.
|
mutableprotected |
Definition at line 230 of file openni_device.h.
|
protected |
Definition at line 192 of file openni_device.h.
|
protected |
Definition at line 211 of file openni_device.h.
|
protected |
Definition at line 227 of file openni_device.h.
|
protected |
Definition at line 235 of file openni_device.h.
|
protected |
IR generator object.
Definition at line 207 of file openni_device.h.
|
mutableprotected |
Definition at line 232 of file openni_device.h.
|
protected |
the value for pixels without a valid disparity measurement
Definition at line 223 of file openni_device.h.
|
protected |
Definition at line 229 of file openni_device.h.
|
staticprotected |
focal length for regular camera producing color images in native SXGA mode
Definition at line 218 of file openni_device.h.
|
protected |
the value for shadow (occluded pixels)
Definition at line 221 of file openni_device.h.