isl-org / isl-org/Open3D

What is the most efficient way to visualize point clouds in real-time?

Open
#6,025 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

I want to visualize a point cloud sequence (recorded with 10Hz) with ~100.000 points/frame in real-time. Here's what I tried to far:

1) My first approach was to use the `o3d.visualization.Visualizer` class (and also the `o3d.visualization.VisualizerWithKeyCallback` class since I need key callbacks as well). However, I first encountered very slow `o3d.geometry.PointCloud` construction times. But after searching through the issues here I found that I need to cast the numpy array to float64. This made a huge difference in performance. The visualization takes ~45ms on my machine using Open3D 0.13.0.
2) When I used the code from 1) with open3d-cpu 0.17.0 or open3d 0.17.0 the visualization latency dropped from ~45ms to ~200ms.
3) My main issue with the `o3d.visualization.Visualizer` approach was that I also want to show 3d labels in my scene. Hence, I changed the visualization to use ` o3d.visualization.rendering.Open3DScene`. Now the 3d labels worked but the latency was still ~200ms. Moreover I got the following warnings `[entity=92, primitive @ 0] missing required attributes (0xd), declared=0x5`. I researched this warning and that seems to be an issue with the `MaterialRecord` of the bounding boxes that I added to the visualization. After removing these boxes, the warning was gone but the latency was still ~200ms.
4) I also tried the `o3d.visualization.O3DVisualizer` class which is also able to visualize 3D labels.
5) I then found an example that was using CUDA in Open3D. I was hoping that this would speed up my use-case as my point clouds are already available as PyTorch tensors on the `cuda:0` device. However, in order to construct `o3d.geometry.PointCloud` objects, I still needed to first copy the tensor from the GPU to the CPU and convert it to a numpy array. I was only able to construct a `o3d.core.Tensor` from the PyTorch tensor and from this a `o3d.t.geometry.PointCloud` object without copying the data to the CPU. However, this class is missing functions that I require, such as `compute_point_cloud_distance`.

Now my question is, what is the most efficient and recommended way to visualize a point cloud in Open3D?

Frankly, I am a lit bit confused by the different options to draw a point cloud (`o3.visualization.Visualizer`, `o3d.visualization.rendering.Open3DScene`, `o3d.visualization.O3DVisualizer`) and their different functionality (e.g. whether they are able to plot 3D labels or not). The same accounts for the various `geometry.PointCloud` classes. Which one should I use?

I hope somebody can give me some advice here.

Thanks a lot in advance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.