isl-org / isl-org/Open3D

how to read pointcloud from realsen L515

Open
#4,936 3 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 try to read data from L515 and convert to pointcloud. Why does the create_from_rgbd_image function not work. My code is as follows
```
import open3d as o3d
import json

rs = o3d.t.io.RealSenseSensor()
config_filename = "config/realsense/camera1.json"
o3d.t.io.RealSenseSensor().list_devices()
with open(config_filename)as cf:
rs_cfg = o3d.t.io.RealSenseSensorConfig(json.load(cf))
rs.init_sensor(rs_cfg)

rs.start_capture()

try:
while (True):
trgbd = rs.capture_frame()
rgbd = trgbd.to_legacy()

intrinsics = rs.get_metadata().intrinsics
plc = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd, intrinsics)
o3d.visualization.draw_geometries([plc])

finally:
rs.stop_capture()
```

# message
'''
plc = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd, intrinsics)
RuntimeError: [Open3D Error] (static std::shared_ptr open3d::geometry::PointCloud::CreateFromRGBDImage(const open3d::geometry::RGBDImage&, const open3d::camera::PinholeCameraIntrinsic&, const Matrix4d&, bool)) /root/Open3D/cpp/open3d/geometry/PointCloudFactory.cpp:197: [CreatePointCloudFromRGBDImage] Unsupported image format.

Process finished with exit code 1
'''

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.