TRI-ML / packnet-sfm

TRI-ML Monocular Depth Estimation Repository
https://tri-ml.github.io/packnet-sfm/
MIT License
1.24k stars 243 forks source link

how to draw point cloud with depth result? #10

Closed lucasjinreal closed 4 years ago

lucasjinreal commented 4 years ago

Any scripts convert depth result to point cloud?

VitorGuizilini-TRI commented 4 years ago

You can project the 2D pixels to 3D using the predicted depth and camera intrinsics (you can use our camera class, it contains the .reconstruct() method that does that). We are also working on a visualization tool that will soon be available, I will let you know once that is out!

EmreOzkose commented 4 years ago

@jinfagang there is a very basic Ros&Rviz implementation here: 3D-ros-visualization-of-depth-maps with a clear and basic explanation. If you are a beginner, it may help you untill the official release for visualization.

kwea123 commented 4 years ago

I used to use also ROS to visualize point cloud sequence which was both fast and easy-to-manipulate, but I find it somewhat inconvenient because of the need to install ROS (I change PC often so installation is quite tedious..), it would be great to have a python-only tool that can do it.

btw, @EmreOzkose there's a message type called PointCloud2 which is exactly for point cloud visualization, I think it's much faster than creating lots of point messages, and much concise. My python script to render kitti pointcloud looks like this. Also your formula to convert uvdepth to xyz is totally wrong, it should involve the intrinsics and the correct formula is xyz = K^-1(uv1)*d in camera coordinate...

davidalford commented 4 years ago

Did anything every come of the visualization tool?