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