isl-org / isl-org/Open3D

How to run online point cloud generation using RealSenseD435?

Open
#5,313 1 comment 1 reaction 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 wanted to run a simple example to use Realsense D435 camera to generate a continuously refreshing pointcloud. I went so far:
```
import open3d as o3d
import matplotlib.pyplot as plt
rs = o3d.t.io.RealSenseSensor()
rs.start_capture(True) # true: start recording with capture

while True:
im_rgbd = rs.capture_frame(True, True) # wait for frames and align them
img = o3d.geometry.RGBDImage.create_from_color_and_depth(im_rgbd.color, im_rgbd.depth)
cam = o3d.camera.PinholeCameraIntrinsic()
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(im_rgbd, cam)
rs.stop_capture()

```
When I run this, I get the error:
```
Traceback (most recent call last):
File "test.py", line 10, in
img = o3d.geometry.RGBDImage.create_from_color_and_depth(im_rgbd.color, im_rgbd.depth)
TypeError: create_from_color_and_depth(): incompatible function arguments. The following argument types are supported:
1. (color: open3d.cpu.pybind.geometry.Image, depth: open3d.cpu.pybind.geometry.Image, depth_scale: float = 1000.0, depth_trunc: float = 3.0, convert_rgb_to_intensity: bool = True) -> open3d.cpu.pybind.geometry.RGBDImage

Invoked with: Image[size={480,640}, channels=3, UInt8, CPU:0], Image[size={480,640}, channels=1, UInt16, CPU:0]
```

What am I doing wrong?

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.