38 #include <pcl/pcl_config.h>
41 #ifndef __PCL_IO_ONI_PLAYER__
42 #define __PCL_IO_ONI_PLAYER__
44 #include <pcl/io/eigen.h>
45 #include <pcl/io/boost.h>
46 #include <pcl/io/grabber.h>
47 #include <pcl/io/openni_camera/openni_driver.h>
48 #include <pcl/io/openni_camera/openni_device_oni.h>
49 #include <pcl/io/openni_camera/openni_image.h>
50 #include <pcl/io/openni_camera/openni_depth_image.h>
51 #include <pcl/io/openni_camera/openni_ir_image.h>
54 #include <pcl/common/synchronizer.h>
77 typedef void (sig_cb_openni_image) (
const boost::shared_ptr<openni_wrapper::Image>&);
78 typedef void (sig_cb_openni_depth_image) (
const boost::shared_ptr<openni_wrapper::DepthImage>&);
79 typedef void (sig_cb_openni_ir_image) (
const boost::shared_ptr<openni_wrapper::IRImage>&);
80 typedef void (sig_cb_openni_image_depth_image) (
const boost::shared_ptr<openni_wrapper::Image>&,
const boost::shared_ptr<openni_wrapper::DepthImage>&,
float constant) ;
81 typedef void (sig_cb_openni_ir_depth_image) (
const boost::shared_ptr<openni_wrapper::IRImage>&,
const boost::shared_ptr<openni_wrapper::DepthImage>&,
float constant) ;
82 typedef void (sig_cb_openni_point_cloud) (
const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZ> >&);
83 typedef void (sig_cb_openni_point_cloud_rgb) (
const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGB> >&);
84 typedef void (sig_cb_openni_point_cloud_rgba) (
const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&);
85 typedef void (sig_cb_openni_point_cloud_i) (
const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZI> >&);
92 ONIGrabber (
const std::string& file_name,
bool repeat,
bool stream);
123 getFramesPerSecond () const;
129 return (device_->hasDataLeft ());
135 imageCallback (boost::shared_ptr<openni_wrapper::Image> image,
void* cookie);
139 depthCallback (boost::shared_ptr<openni_wrapper::DepthImage> depth_image,
void* cookie);
143 irCallback (boost::shared_ptr<openni_wrapper::IRImage> ir_image,
void* cookie);
147 imageDepthImageCallback (
const boost::shared_ptr<openni_wrapper::Image> &image,
148 const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image);
152 irDepthImageCallback (
const boost::shared_ptr<openni_wrapper::IRImage> &image,
153 const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image);
156 boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> >
157 convertToXYZPointCloud (
const boost::shared_ptr<openni_wrapper::DepthImage> &depth)
const;
160 boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >
161 convertToXYZRGBPointCloud (
const boost::shared_ptr<openni_wrapper::Image> &image,
162 const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image)
const;
165 boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >
166 convertToXYZRGBAPointCloud (
const boost::shared_ptr<openni_wrapper::Image> &image,
167 const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image)
const;
170 boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> >
171 convertToXYZIPointCloud (
const boost::shared_ptr<openni_wrapper::IRImage> &image,
172 const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image)
const;
181 boost::shared_ptr<openni_wrapper::DeviceONI>
device_;
203 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
208 #endif // __PCL_IO_ONI_PLAYER__
209 #endif // HAVE_OPENNI
Synchronizer< boost::shared_ptr< openni_wrapper::IRImage >, boost::shared_ptr< openni_wrapper::DepthImage > > ir_sync_
synchronizer object to synchronize IR and depth streams
boost::signals2::signal< sig_cb_openni_depth_image > * depth_image_signal_
boost::signals2::signal< sig_cb_openni_ir_depth_image > * ir_depth_image_signal_
openni_wrapper::OpenNIDevice::CallbackHandle depth_callback_handle
boost::signals2::signal< sig_cb_openni_point_cloud_i > * point_cloud_i_signal_
boost::signals2::signal< sig_cb_openni_point_cloud_rgb > * point_cloud_rgb_signal_
/brief This template class synchronizes two data streams of different types.
Grabber interface for PCL 1.x device drivers.
Synchronizer< boost::shared_ptr< openni_wrapper::Image >, boost::shared_ptr< openni_wrapper::DepthImage > > rgb_sync_
synchronizer object to synchronize image and depth streams
std::string depth_frame_id_
boost::signals2::signal< sig_cb_openni_ir_image > * ir_image_signal_
openni_wrapper::OpenNIDevice::CallbackHandle image_callback_handle
boost::signals2::signal< sig_cb_openni_point_cloud > * point_cloud_signal_
boost::signals2::signal< sig_cb_openni_image_depth_image > * image_depth_image_signal_
PointCloud represents the base class in PCL for storing collections of 3D points. ...
boost::signals2::signal< sig_cb_openni_image > * image_signal_
std::string rgb_frame_id_
boost::shared_ptr< openni_wrapper::DeviceONI > device_
the actual openni device
boost::signals2::signal< sig_cb_openni_point_cloud_rgba > * point_cloud_rgba_signal_
openni_wrapper::OpenNIDevice::CallbackHandle ir_callback_handle