|
Point Cloud Library (PCL)
1.7.2
|
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file. More...
#include <pcl/io/openni_camera/openni_device_oni.h>
Inheritance diagram for openni_wrapper::DeviceONI:
Collaboration diagram for openni_wrapper::DeviceONI:Public Member Functions | |
| DeviceONI (xn::Context &context, const std::string &file_name, bool repeat=false, bool streaming=true) | |
| virtual | ~DeviceONI () throw () |
| virtual void | startImageStream () |
| starts the image stream. More... | |
| virtual void | stopImageStream () |
| stops the image stream. More... | |
| virtual void | startDepthStream () |
| starts the depth stream. More... | |
| virtual void | stopDepthStream () |
| stops the depth stream. More... | |
| virtual void | startIRStream () |
| starts the IR stream. More... | |
| virtual void | stopIRStream () |
| stops the IR stream. More... | |
| virtual bool | isImageStreamRunning () const throw () |
| virtual bool | isDepthStreamRunning () const throw () |
| virtual bool | isIRStreamRunning () const throw () |
| virtual bool | isImageResizeSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const throw () |
| bool | trigger (int relative_offset=0) |
| Trigger a new frame in the ONI stream. More... | |
| bool | isStreaming () const throw () |
| bool | hasDataLeft () |
| Check if there is any data left in the ONI file to process. More... | |
Public Member Functions inherited from openni_wrapper::OpenNIDevice | |
| virtual | ~OpenNIDevice () throw () |
| virtual destructor. More... | |
| bool | findCompatibleImageMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw () |
| finds an image output mode that can be used to retrieve images in desired output mode. More... | |
| bool | findCompatibleDepthMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw () |
| finds a depth output mode that can be used to retrieve depth images in desired output mode. More... | |
| bool | isImageModeSupported (const XnMapOutputMode &output_mode) const throw () |
| returns whether a given mode is natively supported by the device or not More... | |
| bool | isDepthModeSupported (const XnMapOutputMode &output_mode) const throw () |
| returns whether a given mode is natively supported by the device or not More... | |
| const XnMapOutputMode & | getDefaultImageMode () const throw () |
| returns the default image mode, which is simply the first entry in the list of modes More... | |
| const XnMapOutputMode & | getDefaultDepthMode () const throw () |
| returns the default depth mode, which is simply the first entry in the list of modes More... | |
| const XnMapOutputMode & | getDefaultIRMode () const throw () |
| returns the default IR mode, which is simply the first entry in the list of modes More... | |
| void | setImageOutputMode (const XnMapOutputMode &output_mode) |
| sets the output mode of the image stream More... | |
| void | setDepthOutputMode (const XnMapOutputMode &output_mode) |
| sets the output mode of the depth stream More... | |
| void | setIROutputMode (const XnMapOutputMode &output_mode) |
| sets the output mode of the IR stream More... | |
| XnMapOutputMode | getImageOutputMode () const |
| XnMapOutputMode | getDepthOutputMode () const |
| XnMapOutputMode | getIROutputMode () const |
| void | setDepthRegistration (bool on_off) |
| set the depth stream registration on or off More... | |
| bool | isDepthRegistered () const throw () |
| bool | isDepthRegistrationSupported () const throw () |
| void | setSynchronization (bool on_off) |
| set the hardware synchronization between Depth and RGB stream on or off. More... | |
| bool | isSynchronized () const throw () |
| virtual bool | isSynchronizationSupported () const throw () |
| bool | isDepthCropped () const |
| void | setDepthCropping (unsigned x, unsigned y, unsigned width, unsigned height) |
| turn on cropping for the depth stream. More... | |
| bool | isDepthCroppingSupported () const throw () |
| float | getImageFocalLength (int output_x_resolution=0) const throw () |
| returns the focal length for the color camera in pixels. More... | |
| float | getDepthFocalLength (int output_x_resolution=0) const throw () |
| returns the focal length for the IR camera in pixels. More... | |
| float | getBaseline () const throw () |
| bool | hasImageStream () const throw () |
| bool | hasDepthStream () const throw () |
| bool | hasIRStream () const throw () |
| CallbackHandle | registerImageCallback (const ImageCallbackFunction &callback, void *cookie=NULL) throw () |
| registers a callback function of boost::function type for the image stream with an optional user defined parameter. More... | |
| template<typename T > | |
| CallbackHandle | registerImageCallback (void(T::*callback)(boost::shared_ptr< Image >, void *cookie), T &instance, void *cookie=NULL) throw () |
| registers a callback function for the image stream with an optional user defined parameter. More... | |
| bool | unregisterImageCallback (const CallbackHandle &callbackHandle) throw () |
| unregisters a callback function. More... | |
| CallbackHandle | registerDepthCallback (const DepthImageCallbackFunction &callback, void *cookie=NULL) throw () |
| registers a callback function of boost::function type for the depth stream with an optional user defined parameter. More... | |
| template<typename T > | |
| CallbackHandle | registerDepthCallback (void(T::*callback)(boost::shared_ptr< DepthImage >, void *cookie), T &instance, void *cookie=NULL) throw () |
| registers a callback function for the depth stream with an optional user defined parameter. More... | |
| bool | unregisterDepthCallback (const CallbackHandle &callbackHandle) throw () |
| unregisters a callback function. More... | |
| CallbackHandle | registerIRCallback (const IRImageCallbackFunction &callback, void *cookie=NULL) throw () |
| registers a callback function of boost::function type for the IR stream with an optional user defined parameter. More... | |
| template<typename T > | |
| CallbackHandle | registerIRCallback (void(T::*callback)(boost::shared_ptr< IRImage >, void *cookie), T &instance, void *cookie=NULL) throw () |
| registers a callback function for the IR stream with an optional user defined parameter. More... | |
| bool | unregisterIRCallback (const CallbackHandle &callbackHandle) throw () |
| unregisters a callback function. More... | |
| const char * | getSerialNumber () const throw () |
| returns the serial number for device. More... | |
| const char * | getConnectionString () const throw () |
| returns the connection string for current device, which has following format vendorID/productID@BusID/DeviceID. More... | |
| const char * | getVendorName () const throw () |
| const char * | getProductName () const throw () |
| unsigned short | getVendorID () const throw () |
| unsigned short | getProductID () const throw () |
| unsigned char | getBus () const throw () |
| unsigned char | getAddress () const throw () |
| void | setRGBFocalLength (float focal_length) |
| Set the RGB image focal length. More... | |
| void | setDepthFocalLength (float focal_length) |
| Set the depth image focal length. More... | |
| void | setDepthOutputFormat (const DepthMode &depth_mode=OpenNI_12_bit_depth) |
| Set the depth output format. More... | |
| XnUInt64 | getDepthOutputFormat () const |
| Get the depth output format as set by the user. More... | |
| pcl::uint16_t | shiftToDepth (pcl::uint16_t shift_value) const |
| Convert shift to depth value. More... | |
Protected Member Functions | |
| virtual boost::shared_ptr< Image > | getCurrentImage (boost::shared_ptr< xn::ImageMetaData > image_meta_data) const throw () |
| void | PlayerThreadFunction () |
Protected Member Functions inherited from openni_wrapper::OpenNIDevice | |
| OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &image_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) | |
| OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) | |
| OpenNIDevice (xn::Context &context) | |
| void | ImageDataThreadFunction () |
| void | DepthDataThreadFunction () |
| void | IRDataThreadFunction () |
| void | setRegistration (bool on_off) |
| void | Init () |
| void | InitShiftToDepthConversion () |
| void | ReadDeviceParametersFromSensorNode () |
Static Protected Member Functions | |
| static void __stdcall | NewONIDepthDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
| static void __stdcall | NewONIImageDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
| static void __stdcall | NewONIIRDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
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 () |
Protected Attributes | |
| xn::Player | player_ |
| boost::thread | player_thread_ |
| boost::mutex | player_mutex_ |
| boost::condition_variable | player_condition_ |
| bool | streaming_ |
| bool | depth_stream_running_ |
| bool | image_stream_running_ |
| bool | ir_stream_running_ |
Protected Attributes inherited from openni_wrapper::OpenNIDevice | |
| struct openni_wrapper::OpenNIDevice::ShiftConversion | shift_conversion_parameters_ |
| std::vector< pcl::uint16_t > | shift_to_depth_table_ |
| std::map< CallbackHandle, ActualImageCallbackFunction > | image_callback_ |
| std::map< CallbackHandle, ActualDepthImageCallbackFunction > | depth_callback_ |
| std::map< CallbackHandle, ActualIRImageCallbackFunction > | ir_callback_ |
| std::vector< XnMapOutputMode > | available_image_modes_ |
| std::vector< XnMapOutputMode > | available_depth_modes_ |
| xn::Context & | context_ |
| context to OpenNI driver More... | |
| xn::NodeInfo | device_node_info_ |
| node object for current device More... | |
| xn::DepthGenerator | depth_generator_ |
| Depth generator object. More... | |
| xn::ImageGenerator | image_generator_ |
| Image generator object. More... | |
| xn::IRGenerator | ir_generator_ |
| IR generator object. More... | |
| XnCallbackHandle | depth_callback_handle_ |
| XnCallbackHandle | image_callback_handle_ |
| XnCallbackHandle | ir_callback_handle_ |
| float | depth_focal_length_SXGA_ |
| focal length for IR camera producing depth information in native SXGA mode More... | |
| float | baseline_ |
| distance between the projector and the IR camera More... | |
| float | rgb_focal_length_SXGA_ |
| focal length for regular camera producing color images in native SXGA mode More... | |
| XnUInt64 | shadow_value_ |
| the value for shadow (occluded pixels) More... | |
| XnUInt64 | no_sample_value_ |
| the value for pixels without a valid disparity measurement More... | |
| OpenNIDevice::CallbackHandle | image_callback_handle_counter_ |
| OpenNIDevice::CallbackHandle | depth_callback_handle_counter_ |
| OpenNIDevice::CallbackHandle | ir_callback_handle_counter_ |
| bool | quit_ |
| boost::mutex | image_mutex_ |
| boost::mutex | depth_mutex_ |
| boost::mutex | ir_mutex_ |
| boost::condition_variable | image_condition_ |
| boost::condition_variable | depth_condition_ |
| boost::condition_variable | ir_condition_ |
| boost::thread | image_thread_ |
| boost::thread | depth_thread_ |
| boost::thread | ir_thread_ |
Friends | |
| class | OpenNIDriver |
Additional Inherited Members | |
Public Types inherited from openni_wrapper::OpenNIDevice | |
| enum | DepthMode { OpenNI_shift_values = 0, OpenNI_12_bit_depth = 1 } |
| typedef boost::function< void(boost::shared_ptr < Image >, void *cookie) > | ImageCallbackFunction |
| typedef boost::function< void(boost::shared_ptr < DepthImage >, void *cookie) > | DepthImageCallbackFunction |
| typedef boost::function< void(boost::shared_ptr < IRImage >, void *cookie) > | IRImageCallbackFunction |
| typedef unsigned | CallbackHandle |
Protected Types inherited from openni_wrapper::OpenNIDevice | |
| typedef boost::function< void(boost::shared_ptr < Image >) > | ActualImageCallbackFunction |
| typedef boost::function< void(boost::shared_ptr < DepthImage >) > | ActualDepthImageCallbackFunction |
| typedef boost::function< void(boost::shared_ptr < IRImage >) > | ActualIRImageCallbackFunction |
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file.
Definition at line 55 of file openni_device_oni.h.
| openni_wrapper::DeviceONI::DeviceONI | ( | xn::Context & | context, |
| const std::string & | file_name, | ||
| bool | repeat = false, |
||
| bool | streaming = true |
||
| ) |
|
virtual | |||||||||||||
|
protectedvirtual | ||||||||||||||
Implements openni_wrapper::OpenNIDevice.
|
inline |
Check if there is any data left in the ONI file to process.
Definition at line 87 of file openni_device_oni.h.
References player_.
|
virtual | |||||||||||||
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual | ||||||||||||||||||||||||||||
Implements openni_wrapper::OpenNIDevice.
|
virtual | |||||||||||||
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual | |||||||||||||
Reimplemented from openni_wrapper::OpenNIDevice.
| bool openni_wrapper::DeviceONI::isStreaming | ( | ) | const | |
| throw | ( | |||
| ) | ||||
|
staticprotected | ||||||||||||||||||||
|
staticprotected | ||||||||||||||||||||
|
staticprotected | ||||||||||||||||||||
|
protected |
|
virtual |
starts the depth stream.
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual |
starts the image stream.
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual |
starts the IR stream.
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual |
stops the depth stream.
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual |
stops the image stream.
Reimplemented from openni_wrapper::OpenNIDevice.
|
virtual |
stops the IR stream.
Reimplemented from openni_wrapper::OpenNIDevice.
| bool openni_wrapper::DeviceONI::trigger | ( | int | relative_offset = 0 | ) |
Trigger a new frame in the ONI stream.
| [in] | relative_offset | the relative offset in case we want to seek in the file |
|
friend |
Definition at line 57 of file openni_device_oni.h.
|
protected |
Definition at line 105 of file openni_device_oni.h.
|
protected |
Definition at line 106 of file openni_device_oni.h.
|
protected |
Definition at line 107 of file openni_device_oni.h.
|
protected |
Definition at line 100 of file openni_device_oni.h.
Referenced by hasDataLeft().
|
protected |
Definition at line 103 of file openni_device_oni.h.
|
mutableprotected |
Definition at line 102 of file openni_device_oni.h.
|
protected |
Definition at line 101 of file openni_device_oni.h.
|
protected |
Definition at line 104 of file openni_device_oni.h.