Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
openni_wrapper::DeviceKinect Class Reference

Concrete implementation of the interface OpenNIDevice for a MS Kinect device. More...

#include <openni_device_kinect.h>

Inheritance diagram for openni_wrapper::DeviceKinect:
Inheritance graph
[legend]

Public Member Functions

 DeviceKinect (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)
 
const ImageBayerGRBG::DebayeringMethodgetDebayeringMethod () const throw ()
 
virtual bool isDepthCropped () const throw (OpenNIException)
 
virtual bool isDepthCroppingSupported () const throw ()
 
virtual bool isSynchronizationSupported () const throw ()
 
virtual bool isSynchronized () const throw (OpenNIException)
 
void setDebayeringMethod (const ImageBayerGRBG::DebayeringMethod &debayering_method) throw ()
 
virtual void setDepthCropping (unsigned x, unsigned y, unsigned width, unsigned height) throw (OpenNIException)
 
virtual void setSynchronization (bool on_off) throw (OpenNIException)
 
virtual ~DeviceKinect () throw ()
 
- Public Member Functions inherited from openni_wrapper::OpenNIDevice
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 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)
 
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 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)
 
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 Member Functions

virtual void enumAvailableModes () throw (OpenNIException)
 
virtual boost::shared_ptr< ImagegetCurrentImage (boost::shared_ptr< xn::ImageMetaData > image_meta_data) const throw ()
 
virtual bool isImageResizeSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const throw ()
 
- Protected Member Functions inherited from openni_wrapper::OpenNIDevice
void DepthDataThreadFunction () throw (OpenNIException)
 
void ImageDataThreadFunction () throw (OpenNIException)
 
void Init () throw (OpenNIException)
 
void IRDataThreadFunction () throw (OpenNIException)
 
 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)
 

Protected Attributes

ImageBayerGRBG::DebayeringMethod debayering_method_
 
- Protected Attributes inherited from openni_wrapper::OpenNIDevice
std::vector< XnMapOutputMode > available_depth_modes_
 
std::vector< XnMapOutputMode > available_image_modes_
 
float baseline_
 distance between the projector and the IR camera More...
 
xn::Context & context_
 context to OpenNI driver More...
 
boost::thread_group data_threads_
 
std::map< CallbackHandle, ActualDepthImageCallbackFunctiondepth_callback_
 
XnCallbackHandle depth_callback_handle_
 
OpenNIDevice::CallbackHandle depth_callback_handle_counter_
 
boost::condition_variable depth_condition_
 
float depth_focal_length_SXGA_
 focal length for IR camera producing depth information in native SXGA mode More...
 
xn::DepthGenerator depth_generator_
 Depth generator object. More...
 
boost::mutex depth_mutex_
 
xn::NodeInfo device_node_info_
 node object for current device More...
 
std::map< CallbackHandle, ActualImageCallbackFunctionimage_callback_
 
XnCallbackHandle image_callback_handle_
 
OpenNIDevice::CallbackHandle image_callback_handle_counter_
 
boost::condition_variable image_condition_
 
xn::ImageGenerator image_generator_
 Image generator object. More...
 
boost::mutex image_mutex_
 
std::map< CallbackHandle, ActualIRImageCallbackFunctionir_callback_
 
XnCallbackHandle ir_callback_handle_
 
OpenNIDevice::CallbackHandle ir_callback_handle_counter_
 
boost::condition_variable ir_condition_
 
xn::IRGenerator ir_generator_
 IR generator object. More...
 
boost::mutex ir_mutex_
 
XnUInt64 no_sample_value_
 
bool quit_
 
XnUInt64 shadow_value_
 

Friends

class OpenNIDriver
 

Additional Inherited Members

- Public Types inherited from openni_wrapper::OpenNIDevice
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
 
- Protected Types inherited from openni_wrapper::OpenNIDevice
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
 
- Static Protected Member Functions inherited from openni_wrapper::OpenNIDevice
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 inherited from openni_wrapper::OpenNIDevice
static const float rgb_focal_length_SXGA_ = 1050
 focal length for regular camera producing color images in native SXGA mode More...
 

Detailed Description

Concrete implementation of the interface OpenNIDevice for a MS Kinect device.

Author
Suat Gedikli
Date
02.january 2011

Definition at line 53 of file openni_device_kinect.h.

Constructor & Destructor Documentation

openni_wrapper::DeviceKinect::DeviceKinect ( 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
)

Definition at line 48 of file openni_device_kinect.cpp.

openni_wrapper::DeviceKinect::~DeviceKinect ( )
throw (
)
virtual

Definition at line 80 of file openni_device_kinect.cpp.

Member Function Documentation

void openni_wrapper::DeviceKinect::enumAvailableModes ( )
throw (OpenNIException
)
protectedvirtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 96 of file openni_device_kinect.cpp.

boost::shared_ptr< Image > openni_wrapper::DeviceKinect::getCurrentImage ( boost::shared_ptr< xn::ImageMetaData >  image_meta_data) const
throw (
)
protectedvirtual

Implements openni_wrapper::OpenNIDevice.

Definition at line 114 of file openni_device_kinect.cpp.

const ImageBayerGRBG::DebayeringMethod & openni_wrapper::DeviceKinect::getDebayeringMethod ( ) const
throw (
)
inline

Definition at line 84 of file openni_device_kinect.h.

bool openni_wrapper::DeviceKinect::isDepthCropped ( ) const
throw (OpenNIException
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 135 of file openni_device_kinect.cpp.

bool openni_wrapper::DeviceKinect::isDepthCroppingSupported ( ) const
throw (
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 146 of file openni_device_kinect.cpp.

bool openni_wrapper::DeviceKinect::isImageResizeSupported ( unsigned  input_width,
unsigned  input_height,
unsigned  output_width,
unsigned  output_height 
) const
throw (
)
protectedvirtual

Implements openni_wrapper::OpenNIDevice.

Definition at line 91 of file openni_device_kinect.cpp.

bool openni_wrapper::DeviceKinect::isSynchronizationSupported ( ) const
throw (
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 130 of file openni_device_kinect.cpp.

bool openni_wrapper::DeviceKinect::isSynchronized ( ) const
throw (OpenNIException
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 125 of file openni_device_kinect.cpp.

void openni_wrapper::DeviceKinect::setDebayeringMethod ( const ImageBayerGRBG::DebayeringMethod debayering_method)
throw (
)
inline

Definition at line 79 of file openni_device_kinect.h.

void openni_wrapper::DeviceKinect::setDepthCropping ( unsigned  x,
unsigned  y,
unsigned  width,
unsigned  height 
)
throw (OpenNIException
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 140 of file openni_device_kinect.cpp.

void openni_wrapper::DeviceKinect::setSynchronization ( bool  on_off)
throw (OpenNIException
)
virtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 119 of file openni_device_kinect.cpp.

Friends And Related Function Documentation

friend class OpenNIDriver
friend

Definition at line 55 of file openni_device_kinect.h.

Member Data Documentation

ImageBayerGRBG::DebayeringMethod openni_wrapper::DeviceKinect::debayering_method_
protected

Definition at line 76 of file openni_device_kinect.h.


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


openni_camera
Author(s): Patrick Mihelich, Suat Gedikli, Radu Bogdan Rusu
autogenerated on Mon Jun 10 2019 14:15:54