Skip to content

Commit

Permalink
andyzeng#24 workaround to more or less fix the double sided effect
Browse files Browse the repository at this point in the history
  • Loading branch information
remmel committed Jun 27, 2021
1 parent 3f22a94 commit f8482b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def get_point_cloud(self):
tsdf_vol, color_vol = self.get_volume()

# Marching cubes
verts = measure.marching_cubes_lewiner(tsdf_vol, level=0)[0]
verts = measure.marching_cubes(tsdf_vol, mask=np.logical_and(tsdf_vol > -0.5,tsdf_vol < 0.5), level=0)[0]
verts_ind = np.round(verts).astype(int)
verts = verts*self._voxel_size + self._vol_origin

Expand All @@ -325,7 +325,7 @@ def get_mesh(self):
tsdf_vol, color_vol = self.get_volume()

# Marching cubes
verts, faces, norms, vals = measure.marching_cubes_lewiner(tsdf_vol, level=0)
verts, faces, norms, vals = measure.marching_cubes(tsdf_vol, mask=np.logical_and(tsdf_vol > -0.5,tsdf_vol < 0.5), level=0)
verts_ind = np.round(verts).astype(int)
verts = verts*self._voxel_size+self._vol_origin # voxel grid coordinates to world coordinates

Expand Down

0 comments on commit f8482b8

Please sign in to comment.