andyzeng / tsdf-fusion-python

Python code to fuse multiple RGB-D images into a TSDF voxel volume.
http://andyzeng.github.io/
BSD 2-Clause "Simplified" License
1.25k stars 219 forks source link

TSDF encoding of edge cases #20

Open SirWyver opened 4 years ago

SirWyver commented 4 years ago

Hi there, shouldn't the tsdf_vol be initialized with -1, s.t in the cases when the voxel is outside view frustum or behind the camera they are regarded as 'unobserved'? self._tsdf_vol_cpu = -1 * np.ones(self._vol_dim).astype(np.float32) Depending on the context, a zero depth_value might still be best regarded as observed:

if (depth_value == 0)
{
 tsdf_vol[voxel_idx] = 1;
 return;
}