From e52095f79306b2bed8bba8f7e0468dc00e1b3ca5 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Sun, 21 Jul 2019 22:12:11 +0300 Subject: [PATCH] Remove block overlap --- applications/reconstruct/include/ftl/voxel_hash.hpp | 2 +- applications/reconstruct/src/integrators.cu | 4 +++- applications/reconstruct/src/splat_render.cu | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/reconstruct/include/ftl/voxel_hash.hpp b/applications/reconstruct/include/ftl/voxel_hash.hpp index acad30d41..d35df92d2 100644 --- a/applications/reconstruct/include/ftl/voxel_hash.hpp +++ b/applications/reconstruct/include/ftl/voxel_hash.hpp @@ -37,7 +37,7 @@ typedef signed char schar; #include <ftl/depth_camera.hpp> #define SDF_BLOCK_SIZE 8 -#define SDF_BLOCK_SIZE_OLAP 7 +#define SDF_BLOCK_SIZE_OLAP 8 #ifndef MINF #define MINF __int_as_float(0xff800000) diff --git a/applications/reconstruct/src/integrators.cu b/applications/reconstruct/src/integrators.cu index 203b19801..49b7ffcea 100644 --- a/applications/reconstruct/src/integrators.cu +++ b/applications/reconstruct/src/integrators.cu @@ -185,7 +185,7 @@ __global__ void integrateDepthMapsKernel(HashData hashData, HashParams hashParam } } -#define WINDOW_RADIUS 7 +#define WINDOW_RADIUS 5 __global__ void integrateMLSKernel(HashData hashData, HashParams hashParams, int numcams) { __shared__ uint voxels[16]; @@ -215,6 +215,7 @@ __global__ void integrateMLSKernel(HashData hashData, HashParams hashParams, int float3 wnorm = make_float3(0.0f); float weights = 0.0f; + //uint cam=0; for (uint cam=0; cam<numcams; ++cam) { const ftl::voxhash::DepthCameraCUDA &camera = c_cameras[cam]; const uint height = camera.params.m_imageHeight; @@ -223,6 +224,7 @@ __global__ void integrateMLSKernel(HashData hashData, HashParams hashParams, int float3 pf = camera.poseInverse * pfb; uint2 screenPos = make_uint2(camera.params.cameraToKinectScreenInt(pf)); + #pragma unroll for (int v=-WINDOW_RADIUS; v<=WINDOW_RADIUS; ++v) { for (int u=-WINDOW_RADIUS; u<=WINDOW_RADIUS; ++u) { // For this voxel in hash, get its screen position and check it is on screen diff --git a/applications/reconstruct/src/splat_render.cu b/applications/reconstruct/src/splat_render.cu index 9fcb55de0..486ee7f85 100644 --- a/applications/reconstruct/src/splat_render.cu +++ b/applications/reconstruct/src/splat_render.cu @@ -111,7 +111,7 @@ __global__ void isosurface_image_kernel(ftl::voxhash::HashData hashData, Texture //__syncthreads(); //if (voxels[j].weight == 0) continue; - if (vp.x == 7 || vp.y == 7 || vp.z == 7) continue; + //if (vp.x == 7 || vp.y == 7 || vp.z == 7) continue; int edgeX = (vp.x == 0 ) ? 1 : 0; -- GitLab