#7580·Open3D

TSDF Integrate truncates the depth lookup, biasing every sample half a pixel against its own projection

Author: patrikhuberCreated Sep 21, 2026Updated Sep 24, 2026
Labelsbug

Checklist

Describe the issue

Note: This was found by Claude Code while I was working on a related thing. I haven't traced through the whole code here myself, but I think this looks like a genuine indexing/rounding bug.

Two files in the same kernel disagree about the pixel convention.

cpp/open3d/t/geometry/kernel/GeometryIndexer.h, TransformIndexer::Project:

  *u_out = fx_ * x_in * inv_z + cx_;
  *v_out = fy_ * y_in * inv_z + cy_;

This is the standard pinhole model, in which an integer coordinate is the CENTRE of a pixel.

cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h, Integrate, then samples the depth map with:

  index_t ui = static_cast<index_t>(u);
  index_t vi = static_cast<index_t>(v);
  float depth = *depth_indexer.GetDataPtr<input_depth_t>(ui, vi) / depth_scale;

static_cast truncates. Under the centre convention the nearest pixel to u is round(u), so truncation selects the pixel to the left and above, biasing every depth lookup by -0.5 px on average, and up to -1 px.

Truncation would be correct under a corner-origin convention, but Project does not use that. So this is an internal inconsistency rather than a convention choice.

Steps to reproduce the bug

python
Read the two files above; the inconsistency is visible without running anything.

I guess to see the effect, one could integrate a synthetic depth map of a plane with a known pose, then compare the extracted surface against the analytic plane. The reconstructed surface should show displaced consistently with a half-pixel sampling bias, with the displacement growing with the depth gradient across the image.

Error message

No response

Expected behavior

The depth lookup should round rather than truncate, to match Project's convention:

  index_t ui = static_cast<index_t>(roundf(u));
  index_t vi = static_cast<index_t>(roundf(v));

with the bounds test adjusted accordingly. Claude says bilinear sampling would be better still, but rounding is the minimal fix that makes the two files consistent.

Open3D, Python and System information

markdown
- Operating system: Windows / Ubuntu 24.04 (WSL)
- Python version: 3.11.13
- Open3D version: 0.19.0
- System architecture: x86_64
- Is this a remote workstation?: no
- How did you install Open3D?: built from source & conda
Note: the source quotes above are from current main, not 0.19.0, and the lines are unchanged between them.

Additional information

No response