diff --git a/applications/reconstruct/src/ilw/ilw.cpp b/applications/reconstruct/src/ilw/ilw.cpp index 93fd75a188b5e48e48e387c5ddf96ea43bcb1eec..dfa43267ed5d3ac09309a466b150c0498fb72967 100644 --- a/applications/reconstruct/src/ilw/ilw.cpp +++ b/applications/reconstruct/src/ilw/ilw.cpp @@ -144,7 +144,7 @@ ILW::~ILW() { bool ILW::process(ftl::rgbd::FrameSet &fs) { if (!enabled_) return false; - fs.upload(Channel::Colour + Channel::Depth, stream_); + //fs.upload(Channel::Colour + Channel::Depth, stream_); _phase0(fs, stream_); params_.range = value("search_range", 0.05f); diff --git a/components/renderers/cpp/src/tri_render.cpp b/components/renderers/cpp/src/tri_render.cpp index a14aa6b167748eca3532d61f50c8555d61580d12..cfd81347c6bb1c2e2d4547e0445f0a24d554185b 100644 --- a/components/renderers/cpp/src/tri_render.cpp +++ b/components/renderers/cpp/src/tri_render.cpp @@ -357,7 +357,7 @@ bool Triangular::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) { SHARED_LOCK(scene_->mtx, lk); if (!src->isReady()) return false; - scene_->upload(Channel::Colour + Channel::Depth, stream_); + //scene_->upload(Channel::Colour + Channel::Depth, stream_); const auto &camera = src->parameters(); //cudaSafeCall(cudaSetDevice(scene_->getCUDADevice())); diff --git a/components/rgbd-sources/include/ftl/rgbd/frame.hpp b/components/rgbd-sources/include/ftl/rgbd/frame.hpp index b08673c973f42253670b51a3da8e28735406c952..52bbe9022987a85c3bf4398e9e3287011943ecac 100644 --- a/components/rgbd-sources/include/ftl/rgbd/frame.hpp +++ b/components/rgbd-sources/include/ftl/rgbd/frame.hpp @@ -256,7 +256,7 @@ ftl::cuda::TextureObject<T> &Frame::createTexture(ftl::codecs::Channel c) { //LOG(INFO) << "Creating texture object"; m.tex = ftl::cuda::TextureObject<T>(m.gpu); } else if (m.tex.cvType() != ftl::traits::OpenCVType<T>::value || m.tex.width() != m.gpu.cols || m.tex.height() != m.gpu.rows || m.tex.devicePtr() != m.gpu.data) { - LOG(INFO) << "Recreating texture object for '" << ftl::codecs::name(c) << "'"; + LOG(INFO) << "Recreating texture object for '" << ftl::codecs::name(c) << "'."; m.tex.free(); m.tex = ftl::cuda::TextureObject<T>(m.gpu); } diff --git a/components/rgbd-sources/src/source.cpp b/components/rgbd-sources/src/source.cpp index 089ec65686438144a1aec5b3b314eb259005254b..6bfecc74c0ca5c404fbfad9a1496c3e527d903d7 100644 --- a/components/rgbd-sources/src/source.cpp +++ b/components/rgbd-sources/src/source.cpp @@ -313,7 +313,7 @@ void Source::notify(int64_t ts, cv::cuda::GpuMat &c1, cv::cuda::GpuMat &c2) { } // Should channel 2 be scaled? - if (c2.cols < max_width || c2.rows < max_height) { + if (!c2.empty() && (c2.cols < max_width || c2.rows < max_height)) { if (c2.type() == CV_32F) { cv::cuda::resize(c2, c2, cv::Size(max_width, max_height), 0.0, 0.0, cv::INTER_NEAREST); } else { diff --git a/components/rgbd-sources/src/sources/virtual/virtual.cpp b/components/rgbd-sources/src/sources/virtual/virtual.cpp index fbead541591bbd5398ce81d8121ae2946fd1928f..a1d1040c65caac8833397d39ef3949c7778cdebf 100644 --- a/components/rgbd-sources/src/sources/virtual/virtual.cpp +++ b/components/rgbd-sources/src/sources/virtual/virtual.cpp @@ -103,8 +103,7 @@ class VirtualImpl : public ftl::rgbd::detail::Source { cv::cuda::swap(frame.get<cv::cuda::GpuMat>(host_->getChannel()), depth_); } - auto cb = host_->callback(); - if (cb) cb(timestamp_, rgb_, depth_); + host_->notify(timestamp_, rgb_, depth_); } return true; }