Minimal example O3DVisualizer with KITTI data
- 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](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### My Question
Hello,
I got the problem to visualize a normal point cloud with gt labels. I got the order of O3DVisualizer initialisation from one of the examples here.
```python
def draw_demo_scenesO3D(points, gt_boxes=None, ref_boxes=None, ref_labels=None, ref_scores=None, point_colors=None, draw_origin=True, vc=None):
if isinstance(points, torch.Tensor):
points = points.cpu().numpy()
if isinstance(gt_boxes, torch.Tensor):
gt_boxes = gt_boxes.cpu().numpy()
if isinstance(ref_boxes, torch.Tensor):
ref_boxes = ref_boxes.cpu().numpy()
app = open3d.visualization.gui.Application.instance
app.initialize()
vis = open3d.visualization.O3DVisualizer('Open3D - O3DVisualizer', 640, 480)
vis.show_settings = True
vis.point_size = 1
vis.set_background((0, 0, 0, 1), None) # RGBA
# draw origin (x = Forward, y = Left ,z = Upward)
if draw_origin:
axis_pcd = open3d.geometry.TriangleMesh.create_coordinate_frame(size=1.0, origin=[0, 0, 0])
vis.add_geometry("Axis", axis_pcd)
pts = open3d.geometry.PointCloud()
pts.points = open3d.utility.Vector3dVector(points[:, :3]) # x, y, z
vis.add_geometry("Points", pts)
if point_colors is None:
pts.colors = open3d.utility.Vector3dVector(np.ones((points.shape[0], 3)))
else:
pts.colors = open3d.utility.Vector3dVector(point_colors)
if gt_boxes is not None:
vis = draw_demo_boxO3D(vis, gt_boxes, keypoint_color=(0, 0, 1))
app.add_window(vis)
app.run()
vis.close()
return vis
```

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.