isl-org / ZoeDepth

Metric depth estimation from a single image
MIT License
2.36k stars 216 forks source link

How to achieve corresponding 2D points for each 3D points? #128

Closed HardikJain02 closed 3 months ago

HardikJain02 commented 3 months ago

I want to map each corresponding points in the point cloud to its 2d counterpart.

khaxis commented 3 months ago

If you use open3D:

  1. first create RGBD image: https://www.open3d.org/docs/release/python_api/open3d.geometry.RGBDImage.html#open3d.geometry.RGBDImage.create_from_color_and_depth
  2. create the cloud https://www.open3d.org/docs/release/python_api/open3d.geometry.PointCloud.html#open3d.geometry.PointCloud.create_from_rgbd_image

You can also do it manually. Here's a video where they do it un numpy https://www.youtube.com/watch?v=2Jl-ZeQJzwI&t=1699s

Oh, and you'd likely need the calibration matrix

HardikJain02 commented 3 months ago

Thanks for your answer. I was referring to the Zoedepth codebase. I found it within the code. Thanks again for your help!