Skip to content

Retrieve Picked Points - WebRTC #7218

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

Open
3 tasks done
ddkats opened this issue Apr 2, 2025 · 0 comments
Open
3 tasks done

Retrieve Picked Points - WebRTC #7218

ddkats opened this issue Apr 2, 2025 · 0 comments
Labels

Comments

@ddkats
Copy link

ddkats commented Apr 2, 2025

Checklist

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]
@ddkats ddkats added the question label Apr 2, 2025
@ddkats ddkats changed the title Summarize the question. (e.g., "How to run reconstruction system with RealSense D435i? ") Retrieve Picked Points - WebRTC Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant