diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index 72cdfe5704b27bc9444f7173700bceeea571b6e0..f7cdf4d3784c2e5acd271b459fcc7024ddaf1806 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -104,7 +104,8 @@ static void run(ftl::Configurable *root) { ftl::ILW *align = ftl::create<ftl::ILW>(root, "merge"); // Generate virtual camera render when requested by streamer - virt->onRender([splat,virt](ftl::rgbd::Frame &out) { + virt->onRender([splat,virt,&scene_B](ftl::rgbd::Frame &out) { + virt->setTimestamp(scene_B.timestamp); splat->render(virt, out); }); stream->add(virt); diff --git a/components/renderers/cpp/src/splat_render.cpp b/components/renderers/cpp/src/splat_render.cpp index 25dc21c0149f1d1c1e7a6bc9a4d8065288f5cc08..55ddbe490d544ba1646701aab456d78cd7f77aac 100644 --- a/components/renderers/cpp/src/splat_render.cpp +++ b/components/renderers/cpp/src/splat_render.cpp @@ -76,6 +76,8 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out, cuda // Clear all channels to 0 or max depth temp_.get<GpuMat>(Channel::Depth).setTo(cv::Scalar(0x7FFFFFFF), cvstream); temp_.get<GpuMat>(Channel::Depth2).setTo(cv::Scalar(0x7FFFFFFF), cvstream); + temp_.get<GpuMat>(Channel::Colour).setTo(cv::Scalar(0.0f,0.0f,0.0f,0.0f), cvstream); + temp_.get<GpuMat>(Channel::Contribution).setTo(cv::Scalar(0.0f), cvstream); out.get<GpuMat>(Channel::Depth).setTo(cv::Scalar(1000.0f), cvstream); out.get<GpuMat>(Channel::Colour).setTo(cv::Scalar(76,76,76), cvstream); diff --git a/components/rgbd-sources/include/ftl/rgbd/virtual.hpp b/components/rgbd-sources/include/ftl/rgbd/virtual.hpp index f0ab3a93bdb0c7bbf81fe61b4724000f3b020b31..ed3530258d64b14427802f8e56375635ab26a24a 100644 --- a/components/rgbd-sources/include/ftl/rgbd/virtual.hpp +++ b/components/rgbd-sources/include/ftl/rgbd/virtual.hpp @@ -13,6 +13,8 @@ class VirtualSource : public ftl::rgbd::Source { void onRender(const std::function<void(ftl::rgbd::Frame &)> &); + void setTimestamp(int64_t ts) { timestamp_ = ts; } + /** * Write frames into source buffers from an external renderer. Virtual * sources do not have an internal generator of frames but instead have diff --git a/components/rgbd-sources/src/streamer.cpp b/components/rgbd-sources/src/streamer.cpp index 2b43f97a73b1f323ec1deec0a765283fce866c22..3691c36fd34fadded926680169f9b4c16ec9faf6 100644 --- a/components/rgbd-sources/src/streamer.cpp +++ b/components/rgbd-sources/src/streamer.cpp @@ -47,7 +47,7 @@ Streamer::Streamer(nlohmann::json &config, Universe *net) hq_devices_ = (value("disable_hardware_encode", false)) ? device_t::Software : device_t::Any; //group_.setFPS(value("fps", 20)); - group_.setLatency(10); + group_.setLatency(3); compress_level_ = value("compression", 1);