Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Problem of failing to save images after open3d visualization #3058

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmdet3d/datasets/transforms/dbsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def sample_all(self,
s_points_list.append(s_points)

gt_labels = np.array([self.cat2label[s['name']] for s in sampled],
dtype=np.long)
dtype=np.int64)

if ground_plane is not None:
xyz = sampled_gt_bboxes[:, :3]
Expand Down
4 changes: 2 additions & 2 deletions mmdet3d/visualization/local_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ def show(self,
self.view_port = \
self.view_control.convert_to_pinhole_camera_parameters() # noqa: E501
self.flag_next = False
self.o3d_vis.clear_geometries()
# self.o3d_vis.clear_geometries()
try:
del self.pcd
except (KeyError, AttributeError):
Expand All @@ -893,7 +893,7 @@ def show(self,
if not (save_path.endswith('.png')
or save_path.endswith('.jpg')):
save_path += '.png'
self.o3d_vis.capture_screen_image(save_path)
self.o3d_vis.capture_screen_image(save_path, do_render=True)
if self.flag_exit:
self.o3d_vis.destroy_window()
self.o3d_vis.close()
Expand Down