Open
Description
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
main
branch).
My Question
Is there a way to implement the functionality of picking points on a point cloud and retrieving the array of selected points using WebRTC? Or is there another workaround?
def pick_points(pcd):
"""Allows the user to pick points interactively in the Open3D viewer."""
o3d.visualization.webrtc_server.enable_webrtc()
print("Please pick points to define a region. Press 'Q' to finish.")
vis = o3d.visualization.VisualizerWithEditing()
vis.create_window()
vis.add_geometry(pcd)
vis.run()
picked_indices = vis.get_picked_points()
vis.destroy_window()
return np.asarray(pcd.points)[picked_indices]