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

WIP output reset

parent ed006938
No related branches found
No related tags found
1 merge request!71Implements #130 for optional MLS merging
......@@ -29,6 +29,9 @@ __global__ void mls_smooth_kernel(ftl::cuda::TextureObject<float> output, HashDa
const DepthCameraCUDA &mainCamera = c_cameras[cam];
if (x < width && y < height) {
output(x,y) = 1000.0f;
__syncthreads();
float depth = tex2D<float>(mainCamera.depth2, x, y);
float3 wpos = make_float3(0.0f);
......@@ -67,7 +70,12 @@ __global__ void mls_smooth_kernel(ftl::cuda::TextureObject<float> output, HashDa
wpos /= weights;
}
output(x,y) = (weights >= 20.0f) ? (mainCamera.poseInverse * wpos).z : 1000.0f;
wpos = mainCamera.poseInverse * wpos;
const uint2 screenPos = make_uint2(mainCamera.params.cameraToKinectScreenInt(wpos));
if (screenPos.x < output.width() && screenPos.y < output.height()) {
output(screenPos.x,screenPos.y) = (weights >= hashParams.m_confidenceThresh) ? wpos.z : 1000.0f;
//output(x,y) = (weights >= hashParams.m_confidenceThresh) ? wpos.z : 1000.0f;
}
}
}
......
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