From 0821d01aea29a67bf5caafa37141051a33f9ad5f Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Sat, 29 Feb 2020 22:47:00 +0200 Subject: [PATCH] Change mask cull defaults --- components/operators/src/mask.cpp | 2 +- components/operators/src/mask.cu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/operators/src/mask.cpp b/components/operators/src/mask.cpp index 15bd8c85a..31038b7bb 100644 --- a/components/operators/src/mask.cpp +++ b/components/operators/src/mask.cpp @@ -85,7 +85,7 @@ CullDiscontinuity::~CullDiscontinuity() { bool CullDiscontinuity::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) { if (!in.hasChannel(Channel::Depth) || !in.hasChannel(Channel::Mask)) return false; - uint8_t maskID = config()->value("mask_id", (unsigned int)ftl::cuda::Mask::kMask_Discontinuity); + uint8_t maskID = config()->value("mask_id", (unsigned int)(ftl::cuda::Mask::kMask_Discontinuity | ftl::cuda::Mask::kMask_Bad)); unsigned int radius = config()->value("radius", 2); bool inverted = config()->value("invert", false); diff --git a/components/operators/src/mask.cu b/components/operators/src/mask.cu index 4205be4ae..85fde5190 100644 --- a/components/operators/src/mask.cu +++ b/components/operators/src/mask.cu @@ -109,7 +109,7 @@ __global__ void cull_mask_kernel(ftl::cuda::TextureObject<uint8_t> mask, ftl::cu const unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; const unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; - if (x < depth.width()-RADIUS && y < depth.height()-RADIUS) { + if (x < depth.width() && y < depth.height()) { bool isdiscon = false; #pragma unroll -- GitLab