How to get coordinates of picked points with open3D?

23 hours ago 4
ARTICLE AD BOX

This Python 3.12 and Open3D 0.19.0 script on Ubuntu 24.04:

import open3d as o3d c = o3d.geometry.TriangleMesh.create_cylinder(2, 20) c.paint_uniform_color([0.1, 0.9, 0.1]) c.compute_vertex_normals() vis = o3d.visualization.VisualizerWithEditing() vis.create_window(window_name='Point Picker', width=800, height=600, left=50, top=50) vis.add_geometry(c) vis.run() vis.destroy_window() print(vis.get_picked_points())

allows me to pick points with Ctrl + left click as shown below (darker area):

enter image description here

but it prints an empty array []. How to get coordinates of selected points? Some tutorials call for using Shift + left click, but it has no visible effect.

Should I use a different Open3D visualizer? o3d.visualization.draw_geometries_with_editing([c]) allows for point picking, but how do I get the results?

Paul Jurczak's user avatar

Read Entire Article