From 78c5ed3c857f27105b2c6b6f46099eb4d806cfc4 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 7 Aug 2019 14:50:52 +0300 Subject: [PATCH] Add not empty check to compute --- components/rgbd-sources/src/stereovideo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/rgbd-sources/src/stereovideo.cpp b/components/rgbd-sources/src/stereovideo.cpp index 35992872b..0d20780c2 100644 --- a/components/rgbd-sources/src/stereovideo.cpp +++ b/components/rgbd-sources/src/stereovideo.cpp @@ -172,6 +172,8 @@ void StereoVideoSource::swap() { bool StereoVideoSource::compute(int n, int b) { const ftl::rgbd::channel_t chan = host_->getChannel(); + if (left_.empty() || right_.empty()) return false; + if (chan == ftl::rgbd::kChanDepth) { //lsrc_->get(left_, right_, stream_); if (depth_tmp_.empty()) depth_tmp_ = cv::cuda::GpuMat(left_.size(), CV_32FC1); -- GitLab