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

Aperta
#7,580 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start by reading TransformIndexer::Project in cpp/open3d/t/geometry/kernel/GeometryIndexer.h and Integrate in cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h, then trace the existing bounds check around the depth lookup. Reproduce with a synthetic depth map and known pose if useful; the work is done when lookup rounding matches the projection convention, bounds handling remains correct, and the sampling bias is no longer present.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
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
- 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

Lingua principale
C++
Stelle
14.3k
Fork
2.7k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di isl-org/Open3D

Tutte le issue di isl-org/Open3D

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.