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

Change mask cull defaults

parent b3bcd26e
No related branches found
No related tags found
1 merge request!280Implements #315 border masking
Pipeline #22471 passed
...@@ -85,7 +85,7 @@ CullDiscontinuity::~CullDiscontinuity() { ...@@ -85,7 +85,7 @@ CullDiscontinuity::~CullDiscontinuity() {
bool CullDiscontinuity::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) { 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; 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); unsigned int radius = config()->value("radius", 2);
bool inverted = config()->value("invert", false); bool inverted = config()->value("invert", false);
......
...@@ -109,7 +109,7 @@ __global__ void cull_mask_kernel(ftl::cuda::TextureObject<uint8_t> mask, ftl::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 x = blockIdx.x*blockDim.x + threadIdx.x;
const unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; 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; bool isdiscon = false;
#pragma unroll #pragma unroll
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment