diff --git a/components/rgbd-sources/include/ftl/rgbd/source.hpp b/components/rgbd-sources/include/ftl/rgbd/source.hpp index c11bc83fefeccde69d989d8b800da33cf6f4daf0..440f566edf40ed0ddb09bc301e3c571fd3823bc2 100644 --- a/components/rgbd-sources/include/ftl/rgbd/source.hpp +++ b/components/rgbd-sources/include/ftl/rgbd/source.hpp @@ -82,7 +82,7 @@ class Source : public ftl::Configurable { /** * Perform the hardware or virtual frame grab operation. */ - bool grab(); + bool grab(int N=-1, int B=-1); /** * Do any post-grab processing. This function diff --git a/components/rgbd-sources/src/source.cpp b/components/rgbd-sources/src/source.cpp index c2b5dc5a91d98f2384727abf9f84e44d94e2dab0..8747b60fbed095c9c09d264b76490d848a7f758d 100644 --- a/components/rgbd-sources/src/source.cpp +++ b/components/rgbd-sources/src/source.cpp @@ -222,14 +222,14 @@ void Source::reset() { impl_ = _createImplementation(); } -bool Source::grab() { +bool Source::grab(int N, int B) { UNIQUE_LOCK(mutex_,lk); if (!impl_ && stream_ != 0) { cudaSafeCall(cudaStreamSynchronize(stream_)); if (depth_.type() == CV_32SC1) depth_.convertTo(depth_, CV_32F, 1.0f / 1000.0f); stream_ = 0; return true; - } else if (impl_ && impl_->grab(-1,-1)) { + } else if (impl_ && impl_->grab(N,B)) { timestamp_ = impl_->timestamp_; impl_->rgb_.copyTo(rgb_); impl_->depth_.copyTo(depth_);