43 #include <pcl/pcl_config.h>
44 #include <pcl/io/grabber.h>
45 #include <pcl/io/file_grabber.h>
46 #include <pcl/common/time_trigger.h>
47 #include <pcl/conversions.h>
49 #include <boost/shared_ptr.hpp>
68 ImageGrabberBase (
const std::string& directory,
float frames_per_second,
bool repeat,
bool pclzf_mode);
70 ImageGrabberBase (
const std::string& depth_directory,
const std::string& rgb_directory,
float frames_per_second,
bool repeat);
76 ImageGrabberBase (
const std::vector<std::string>& depth_image_files,
float frames_per_second,
bool repeat);
115 isRunning () const override;
119 getName () const override;
127 getFramesPerSecond () const override;
135 atLastFrame () const;
139 getCurrentDepthFileName () const;
144 getPrevDepthFileName () const;
148 getDepthFileNameAtIndex (std::
size_t idx) const;
152 getTimestampAtIndex (std::
size_t idx, std::
uint64_t ×tamp) const;
158 setRGBImageFiles (const std::vector<std::
string>& rgb_image_files);
167 setCameraIntrinsics (const
double focal_length_x,
168 const
double focal_length_y,
169 const
double principal_point_x,
170 const
double principal_point_y);
179 getCameraIntrinsics (
double &focal_length_x,
180 double &focal_length_y,
181 double &principal_point_x,
182 double &principal_point_y) const;
187 setDepthImageUnits (
float units);
192 setNumberOfThreads (
unsigned int nr_threads = 0);
211 struct ImageGrabberImpl;
212 ImageGrabberImpl* impl_;
224 float frames_per_second = 0,
226 bool pclzf_mode =
false);
229 const std::string& rgb_dir,
230 float frames_per_second = 0,
231 bool repeat =
false);
233 ImageGrabber (
const std::vector<std::string>& depth_image_files,
234 float frames_per_second = 0,
235 bool repeat =
false);
242 operator[] (std::size_t idx)
const override;
246 size ()
const override;
251 const Eigen::Vector4f& origin,
252 const Eigen::Quaternionf& orientation)
const override;
257 template<
typename Po
intT>
259 float frames_per_second,
268 template<
typename Po
intT>
270 const std::string& rgb_dir,
271 float frames_per_second,
279 template<
typename Po
intT>
281 float frames_per_second,
283 :
ImageGrabberBase (depth_image_files, frames_per_second, repeat), signal_ ()
293 Eigen::Vector4f origin;
294 Eigen::Quaternionf orientation;
295 getCloudAt (idx, blob, origin, orientation);
304 template <
typename Po
intT> std::size_t
307 return (numFrames ());
311 template<
typename Po
intT>
void
319 signal_->operator () (cloud);