Skip to content
Snippets Groups Projects
Commit 7bfd62f9 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix colour clear and timestamp

parent 15800bc3
No related branches found
No related tags found
1 merge request!109Resolves #173 remove voxel code
Pipeline #13774 passed
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment