From 412ffefd9c339f4360eba9c87bef0785ede6016d Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Fri, 13 Sep 2019 15:37:09 +0300 Subject: [PATCH] optical flow not correctly calculated --- components/rgbd-sources/src/stereovideo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/rgbd-sources/src/stereovideo.cpp b/components/rgbd-sources/src/stereovideo.cpp index ebc72d854..d718d1f7e 100644 --- a/components/rgbd-sources/src/stereovideo.cpp +++ b/components/rgbd-sources/src/stereovideo.cpp @@ -192,9 +192,9 @@ bool StereoVideoSource::retrieve() { if (frames_[1].hasChannel(kChanLeftGray)) { - auto &left_gray_prev = frame.getChannel<cv::cuda::GpuMat>(kChanLeftGray, stream2_); + auto &left_gray_prev = frames_[1].getChannel<cv::cuda::GpuMat>(kChanLeftGray, stream2_); auto &optflow = frame.setChannel<cv::cuda::GpuMat>(kChanFlow); - nvof_->calc(left_gray, left_gray_prev, optflow_, stream2_); + nvof_->calc(left_gray, left_gray_prev, optflow, stream2_); // nvof_->upSampler() isn't implemented with CUDA // cv::cuda::resize() does not work wiht 2-channel input // cv::cuda::resize(optflow_, optflow, left.size(), 0.0, 0.0, cv::INTER_NEAREST, stream2_); -- GitLab