From 2751da1f740b16be06b441c7cad3fc3da6582d71 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Mon, 10 Feb 2020 10:21:26 +0200 Subject: [PATCH] Fix recon high res colour bug --- components/operators/src/colours.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/operators/src/colours.cpp b/components/operators/src/colours.cpp index b3b3d0d33..bdcbeedbd 100644 --- a/components/operators/src/colours.cpp +++ b/components/operators/src/colours.cpp @@ -15,8 +15,6 @@ ColourChannels::~ColourChannels() { } bool ColourChannels::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) { - //auto cvstream = cv::cuda::StreamAccessor::wrapStream(stream); - auto &col = in.get<cv::cuda::GpuMat>(Channel::Colour); // Convert colour from BGR to BGRA if needed @@ -51,12 +49,13 @@ bool ColourChannels::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStre if (in.hasChannel(Channel::Depth)) { auto &depth = in.get<cv::cuda::GpuMat>(Channel::Depth); if (depth.size() != col.size()) { - /*auto &col2 = in.create<cv::cuda::GpuMat>(Channel::ColourHighRes); + auto cvstream = cv::cuda::StreamAccessor::wrapStream(stream); + auto &col2 = in.create<cv::cuda::GpuMat>(Channel::ColourHighRes); cv::cuda::resize(col, col2, depth.size(), 0.0, 0.0, cv::INTER_LINEAR, cvstream); in.createTexture<uchar4>(Channel::ColourHighRes, true); - in.swapChannels(Channel::Colour, Channel::ColourHighRes);*/ + in.swapChannels(Channel::Colour, Channel::ColourHighRes); - throw FTL_Error("Depth and colour channels and different resolutions: " << depth.rows << " vs " << col.rows); + //throw FTL_Error("Depth and colour channels and different resolutions: " << depth.rows << " vs " << col.rows); } // Ensure right channel is also downsized -- GitLab