Skip to content

Commit

Permalink
Fix the depth slider update.
Browse files Browse the repository at this point in the history
  • Loading branch information
nburrus committed Jun 20, 2022
1 parent 69231f1 commit 7807032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stereodemo/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ def _update_rendering (self, names_to_update=None):
if self._scene.scene.has_geometry(name):
self._scene.scene.remove_geometry(name)

self._scene.scene.show_geometry(name, name == selected_name)

o3d_color = o3d.geometry.Image(cv2.cvtColor(stereo_output.color_image_bgr, cv2.COLOR_BGR2RGB))
o3d_depth = o3d.geometry.Image(depth_meters)
Expand All @@ -446,6 +445,7 @@ def _update_rendering (self, names_to_update=None):
stereo_output.point_cloud = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd, self.o3dCameraIntrinsic)
stereo_output.point_cloud.transform([[1,0,0,0],[0,-1,0,0],[0,0,-1,0],[0,0,0,1]])
self._scene.scene.add_geometry(name, stereo_output.point_cloud, rendering.MaterialRecord())
self._scene.scene.show_geometry(name, name == selected_name)

def _run_current_method(self):
if self.executor_future is not None:
Expand Down

0 comments on commit 7807032

Please sign in to comment.