38 #ifndef PCL_IO_REAL_SENSE_GRABBER_H
39 #define PCL_IO_REAL_SENSE_GRABBER_H
41 #include <boost/thread/thread.hpp>
42 #include <boost/thread/mutex.hpp>
44 #include <pcl/io/grabber.h>
45 #include <pcl/point_cloud.h>
46 #include <pcl/point_types.h>
47 #include <pcl/common/time.h>
55 template <
typename T>
class Buffer;
59 class RealSenseDevice;
70 void (sig_cb_real_sense_point_cloud)
74 void (sig_cb_real_sense_point_cloud_rgba)
97 Mode (
unsigned int fps);
100 Mode (
unsigned int depth_width,
unsigned int depth_height);
104 Mode (
unsigned int fps,
unsigned int depth_width,
unsigned int depth_height);
108 Mode (
unsigned int depth_width,
unsigned int depth_height,
unsigned int color_width,
unsigned int color_height);
111 Mode (
unsigned int fps,
unsigned int depth_width,
unsigned int depth_height,
unsigned int color_width,
unsigned int color_height);
120 RealSense_Median = 1,
121 RealSense_Average = 2,
142 RealSenseGrabber (
const std::string& device_id =
"",
const Mode& mode = Mode (),
bool strict =
false);
159 return (std::string (
"RealSenseGrabber"));
163 getFramesPerSecond ()
const;
170 setConfidenceThreshold (
unsigned int threshold);
180 enableTemporalFiltering (TemporalFilteringType type,
size_t window_size);
184 disableTemporalFiltering ();
188 getDeviceSerialNumber ()
const;
198 getAvailableModes (
bool only_depth =
false)
const;
205 setMode (
const Mode& mode,
bool strict =
false);
214 return (mode_selected_);
223 createDepthBuffer ();
234 computeModeScore (
const Mode& mode);
237 boost::signals2::signal<sig_cb_real_sense_point_cloud>* point_cloud_signal_;
238 boost::signals2::signal<sig_cb_real_sense_point_cloud_rgba>* point_cloud_rgba_signal_;
240 boost::shared_ptr<pcl::io::real_sense::RealSenseDevice> device_;
243 unsigned int confidence_threshold_;
245 TemporalFilteringType temporal_filtering_type_;
246 size_t temporal_filtering_window_size_;
249 Mode mode_requested_;
268 mutable boost::mutex fps_mutex_;
270 boost::thread thread_;
273 boost::shared_ptr<pcl::io::Buffer<unsigned short> > depth_buffer_;
A descriptor for capturing mode.
This file defines compatibility wrappers for low level I/O functions.
A helper class to measure frequency of a certain event.
Grabber interface for PCL 1.x device drivers.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
unsigned int color_height
const Mode & getMode() const
Get currently active capturing mode.
unsigned int depth_height
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)