isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.2k stars 2.27k forks source link

Accessing specific vertices programatically using their 2d coordinates in some specific camera view? #3687

Open noamholz opened 3 years ago

noamholz commented 3 years ago

Is your feature request related to a problem? Please describe. While I am able to view my mesh from a given camera view, I'm not sure how I can access vertices by their location in the 2D image? My motivation for accessing vertices from the cameras view is to be able to modify them, e.g., paint all the points that are projected to the bottom-half of the 2d image (as rendered by the visualizer).

Describe the solution you'd like It'd be great if an api would be exposed, that allows accessing point clouds / vertices via the visualizer (like VisualizerWithEditing, but non-interactively).

An alternative I considered:

  1. deduce the xyz coordinates of points obtained from a depth image (capture_depth_float_buffer())
  2. transform these into world coordinates by using the camera extrinsics
  3. then identify the vertices in the mesh by searching at the obtained set of coordinates.

But I imagine there must be a more direct and efficient way to do that..

theNded commented 2 years ago

This tutorial might help.