diff --git a/components/operators/src/fusion/mvmls.cpp b/components/operators/src/fusion/mvmls.cpp index a444d8d1a9d2b1deb1471ce420e9fc36b1e940fd..c16b3ab43097c4bda940a2f361592cd1fb5784b3 100644 --- a/components/operators/src/fusion/mvmls.cpp +++ b/components/operators/src/fusion/mvmls.cpp @@ -47,8 +47,19 @@ bool MultiViewMLS::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cuda bool show_consistency = config()->value("show_consistency", false); bool show_adjustment = config()->value("show_adjustment", false); - if (in.frames.size() < 1) return false; - auto size = in.firstFrame().get<GpuMat>(Channel::Depth).size(); + if (in.frames.size() < 1 || in.count == 0) return false; + cv::Size size(0,0); + for (auto &f : in.frames) { + if (f.hasChannel(Channel::Depth)) { + size = f.get<GpuMat>(Channel::Depth).size(); + break; + } + } + + if (size.width == 0) { + in.firstFrame().message(ftl::data::Message::Warning_MISSING_CHANNEL, "Missing Depth Channel in MVMLS operator"); + return false; + } // Make sure we have enough buffers while (normals_horiz_.size() < in.frames.size()) { diff --git a/components/operators/src/normals.cpp b/components/operators/src/normals.cpp index 0e89ef3ed1dc2dda26627e13f5d9639f0a62d775..09618fa4805a4e171c59c32f37b54df3298d5daa 100644 --- a/components/operators/src/normals.cpp +++ b/components/operators/src/normals.cpp @@ -19,7 +19,8 @@ Normals::~Normals() { bool Normals::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) { if (!in.hasChannel(Channel::Depth)) { out.message(ftl::data::Message::Warning_MISSING_CHANNEL, "Missing Depth Channel in Normals operator"); - throw FTL_Error("Missing depth channel in Normals operator"); + //throw FTL_Error("Missing depth channel in Normals operator"); + return false; } if (out.hasChannel(Channel::Normals)) { @@ -49,7 +50,8 @@ NormalDot::~NormalDot() { bool NormalDot::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) { if (!in.hasChannel(Channel::Depth)) { out.message(ftl::data::Message::Warning_MISSING_CHANNEL, "Missing Depth Channel in Normals operator"); - throw FTL_Error("Missing depth channel in Normals operator"); + //throw FTL_Error("Missing depth channel in Normals operator"); + return false; } if (out.hasChannel(Channel::Normals)) {