diff --git a/applications/reconstruct/src/dibr.cu b/applications/reconstruct/src/dibr.cu index 93ea413e49b77904e7df46ec94eaef32803c823f..423de0d4e30a8e740635a839112cf1b7d0d397f3 100644 --- a/applications/reconstruct/src/dibr.cu +++ b/applications/reconstruct/src/dibr.cu @@ -550,7 +550,7 @@ __device__ inline float warpMin(float e) { if (maxenergy >= ENERGY_THRESHOLD) return; // Move to next possible surface... - clusterBase = minDepth + 0.01f; + clusterBase = minDepth + SMOOTHING_MULTIPLIER_B*(minDepth / params.camera.fx); }; } @@ -613,7 +613,7 @@ __global__ void dibr_attribute_contrib_kernel( const float3 nearest = params.camera.kinectDepthToSkeleton((int)(screenPos.x+u),(int)(screenPos.y+v),d); // What is contribution of our current point at this pixel? - const float weight = ftl::cuda::spatialWeighting(length(nearest - camPos), SPATIAL_SMOOTHING); + const float weight = ftl::cuda::spatialWeighting(length(nearest - camPos), SMOOTHING_MULTIPLIER_B*(nearest.z/params.camera.fx)); if (screenPos.x+u < colour_out.width() && screenPos.y+v < colour_out.height() && weight > 0.0f) { // TODO: Use confidence threshold here const float4 wcolour = colour * weight; const float4 wnormal = normal * weight;