Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Saving output of draw_geometries as image file without opening a window

Open n-campbell opened this issue 3 years ago • 1 comments

I'm currently using the method below to save the output of draw_geometries as in a .png file for later use in WandB. Since I have this implementation in a training loop, it is inconvenient for the visualization window to continuously pop up. Would it be possible to achieve the same resulting image without having a pop up window?

vis = o3d.visualization.Visualizer() vis.create_window() vis.add_geometry(pcd) vis.update_geometry(pcd) vis.poll_events() vis.update_renderer() vis.capture_screen_image(path) vis.destroy_window()

n-campbell avatar Jul 06 '22 18:07 n-campbell

Hi @n-campbell, Does replacing create_window() with create_window(visible=False) solve your issue?

marcelbrucker avatar Jul 14 '22 18:07 marcelbrucker

Hi, it has been one year, has anyone solved this issue?

Does replacing create_window() with create_window(visible=False) solve your issue?

In my case the program just becomes silent, no window, and no image is saved.

wzm2256 avatar Jun 30 '23 09:06 wzm2256

In my case, I need to save more than 1000 images in a script, and my work around is to put my iphone on the ESC keys so it kills the windows as soon as it pops up. I do wish to find a simpler way.

wzm2256 avatar Jun 30 '23 09:06 wzm2256

Hi, it has been one year, has anyone solved this issue?

Does replacing create_window() with create_window(visible=False) solve your issue?

In my case the program just becomes silent, no window, and no image is saved.

visible=True works on my Ubuntu 20.04. True or False seemingly depends on your system.

Ref: https://stackoverflow.com/questions/62122925/pointcloud-to-image-in-open3d

zjwzcx avatar Oct 11 '23 07:10 zjwzcx