Skip to content
Snippets Groups Projects

Implements #146 upsampling option

Merged Nicolas Pope requested to merge feature/146/upsample into master
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -81,12 +81,12 @@ __device__ inline bool isStable(const float3 &previous, const float3 &estimate,
// Make an initial estimate of the points location
// Use centroid depth as estimate...?
const float3 point = params.m_viewMatrix * ftl::cuda::upsampled_point(camera.points, make_float2(x+u*interval, y+v*interval));
const float3 point = params.m_viewMatrix * ftl::cuda::upsampled_point(camera.points, make_float2(float(x)+float(u)*interval, float(y)+float(v)*interval));
const float d = point.z;
const uint2 screenPos = params.camera.cameraToKinectScreen(point);
const unsigned int cx = screenPos.x+u;
const unsigned int cy = screenPos.y+v;
const unsigned int cx = screenPos.x;//+u;
const unsigned int cy = screenPos.y;//+v;
if (d > params.camera.m_sensorDepthWorldMin && d < params.camera.m_sensorDepthWorldMax && cx < depth.width() && cy < depth.height()) {
// Transform estimated point to virtual cam space and output z
atomicMin(&depth(cx,cy), d * 1000.0f);
Loading