Skip to content
Snippets Groups Projects

Implement #150 splat resizing

Merged Nicolas Pope requested to merge feature/150/splatknn into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -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;
Loading