project_pcd to_rgbd_image, empty depth and rgb image
- 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).
### Describe the issue
I try to use the project_to_rgbd_image function on my own point cloud like in https://www.open3d.org/docs/release/python_example/geometry/point_cloud/index.html#point-cloud-to-rgbd-py . But got a depth img with all zero value
[src+data.zip](https://github.com/user-attachments/files/16596499/src%2Bdata.zip)
### Steps to reproduce the bug
```python
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
print(o3d.__version__)
if __name__ == '__main__':
# 1. read depth and color image
pcd = o3d.t.io.read_point_cloud("1.ply")
h=1080
w=1920
f=500
intr = o3d.open3d.camera.PinholeCameraIntrinsic(w, h, fx=f, fy=f, cx=w/2, cy=h/2)
rgbd_reproj = pcd.project_to_rgbd_image(w,
h,
intr.intrinsic_matrix,
depth_scale=1,
depth_max=500.0,)
print(np.max(rgbd_reproj.depth))
plt.subplot(1, 2, 1)
plt.title('chair grayscale image')
plt.imshow(rgbd_reproj.color)
plt.subplot(1, 2, 2)
plt.title('chair depth image')
plt.imshow(rgbd_reproj.depth)
plt.show()
```
### Error message
C:\Users\yiku\miniconda3\envs\hgnetv2-deeplabv3\python.exe "C:\Users\yiku\Documents\WeChat Files\wxid_1na96tsg783o21\FileStorage\File\2024-08\新建文件夹\test.py"
0.18.0
0.0

### Expected behavior
_No response_
### Open3D, Python and System information
```markdown
- Operating system: Windows 10 64-bit
- Python version: 3.9.19 (main, Mar 21 2024, 17:21:27) [MSC v.1916 64 bit (AMD64)]
- Open3D version: output from python: 0.18.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
- Compiler version (if built from source):
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.