Skip to content
Snippets Groups Projects
Commit 412ffefd authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

optical flow not correctly calculated

parent d117c563
No related branches found
No related tags found
1 merge request!105CUDA optical flow smoothing
Pipeline #13577 passed
...@@ -192,9 +192,9 @@ bool StereoVideoSource::retrieve() { ...@@ -192,9 +192,9 @@ bool StereoVideoSource::retrieve() {
if (frames_[1].hasChannel(kChanLeftGray)) 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); 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 // nvof_->upSampler() isn't implemented with CUDA
// cv::cuda::resize() does not work wiht 2-channel input // 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_); // cv::cuda::resize(optflow_, optflow, left.size(), 0.0, 0.0, cv::INTER_NEAREST, stream2_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment