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

Remove block overlap

parent c369db91
No related branches found
No related tags found
1 merge request!71Implements #130 for optional MLS merging
Pipeline #12344 passed
......@@ -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)
......
......@@ -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
......
......@@ -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;
......
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