31 #ifndef PCL_IO_OPENNI2_DEVICE_H_
32 #define PCL_IO_OPENNI2_DEVICE_H_
34 #include <pcl/pcl_exports.h>
36 #include "pcl/io/openni2/openni2_video_mode.h"
37 #include "pcl/io/io_exception.h"
39 #include <boost/shared_ptr.hpp>
40 #include <boost/cstdint.hpp>
41 #include <boost/bind.hpp>
42 #include <boost/function.hpp>
47 #include <pcl/io/image.h>
48 #include <pcl/io/image_depth.h>
49 #include <pcl/io/image_ir.h>
94 getUsbVendorId ()
const;
96 getUsbProductId ()
const;
105 hasIRSensor ()
const;
107 hasColorSensor ()
const;
109 hasDepthSensor ()
const;
129 isIRStreamStarted ();
131 isColorStreamStarted ();
133 isDepthStreamStarted ();
136 isImageRegistrationModeSupported ()
const;
138 setImageRegistrationMode (
bool enabled);
140 isDepthRegistered ()
const;
145 getColorVideoMode ();
147 getDepthVideoMode ();
149 const std::vector<OpenNI2VideoMode>&
150 getSupportedIRVideoModes ()
const;
151 const std::vector<OpenNI2VideoMode>&
152 getSupportedColorVideoModes ()
const;
153 const std::vector<OpenNI2VideoMode>&
154 getSupportedDepthVideoModes ()
const;
178 getDefaultIRMode ()
const;
180 getDefaultColorMode ()
const;
182 getDefaultDepthMode ()
const;
185 getIRFocalLength ()
const;
187 getColorFocalLength ()
const;
189 getDepthFocalLength ()
const;
200 setAutoExposure (
bool enable);
202 setAutoWhiteBalance (
bool enable);
207 return (openni_device_->getDepthColorSyncEnabled ());
219 return (openni_device_->isFile());
223 setSynchronization (
bool enableSync);
226 getAutoExposure ()
const;
228 getAutoWhiteBalance ()
const;
231 setUseDeviceTimer (
bool enable);
238 getDepthFrameCount ();
245 getColorFrameCount ();
262 setPlaybackSpeed (
double speed);
276 boost::shared_ptr<openni::VideoStream>
277 getIRVideoStream ()
const;
278 boost::shared_ptr<openni::VideoStream>
279 getColorVideoStream ()
const;
280 boost::shared_ptr<openni::VideoStream>
281 getDepthVideoStream ()
const;
285 processColorFrame (openni::VideoStream& stream);
287 processDepthFrame (openni::VideoStream& stream);
289 processIRFrame (openni::VideoStream& stream);
293 findCompatibleVideoMode (
const std::vector<OpenNI2VideoMode> supportedModes,
297 resizingSupported (
size_t input_width,
size_t input_height,
size_t output_width,
size_t output_height)
const;
334 #endif // PCL_IO_OPENNI2_DEVICE_H_
PCL_EXPORTS std::ostream & operator<<(std::ostream &stream, const OpenNI2Device &device)
uint64_t shadow_value_
the value for shadow (occluded pixels)
boost::shared_ptr< openni::DeviceInfo > device_info_
bool depth_video_started_
boost::shared_ptr< openni::VideoStream > color_video_stream_
uint64_t no_sample_value_
the value for pixels without a valid disparity measurement
std::vector< OpenNI2VideoMode > ir_video_modes_
std::vector< OpenNI2VideoMode > depth_video_modes_
boost::function< void(openni::VideoStream &stream)> StreamCallbackFunction
float baseline_
distance between the projector and the IR camera in meters
Class containing just a reference to IR meta data.
boost::function< void(boost::shared_ptr< Image >, void *cookie) > ImageCallbackFunction
bool color_video_started_
boost::shared_ptr< openni::VideoStream > depth_video_stream_
pcl::io::DepthImage DepthImage
boost::function< void(boost::shared_ptr< DepthImage >, void *cookie) > DepthImageCallbackFunction
boost::function< void(boost::shared_ptr< IRImage >, void *cookie) > IRImageCallbackFunction
boost::function< void(openni::VideoStream &stream)> StreamCallbackFunction
Image interface class providing an interface to fill a RGB or Grayscale image buffer.
boost::shared_ptr< openni::VideoStream > ir_video_stream_
boost::shared_ptr< OpenNI2FrameListener > color_frame_listener
std::vector< OpenNI2VideoMode > color_video_modes_
This class provides methods to fill a depth or disparity image.
bool isSynchronizationSupported()
boost::shared_ptr< openni::Device > openni_device_
boost::shared_ptr< OpenNI2FrameListener > depth_frame_listener
boost::shared_ptr< OpenNI2FrameListener > ir_frame_listener