Pointcloud visualization with viewpoint from camera
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
Hello,
A pointcloud was generated by a rgb image and a depth image, now I try to visualize it with the same viewpoint as the pictures were taken.
```python
intrinsic = o3d.camera.PinholeCameraIntrinsic(H, W, fx, fy, cx, cy)
extrinsic = P
rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(rgb, depth, convert_rgb_to_intensity=False)
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd, intrinsic)
pcd.transform([[1,0,0,0],[0,-1,0,0],[0,0,-1,0],[0,0,0,1]])
vis = o3d.visualization.Visualizer()
vis.create_window(height=intrinsic.height, width=intrinsic.width)
vis.add_geometry(pcd)
ctr = vis.get_view_control()
init_param = ctr.convert_to_pinhole_camera_parameters()
init_param.intrinsic = intrinsic
init_param.extrinsic = extrinsic
ctr.convert_from_pinhole_camera_parameters(init_param)
vis.run()
```
I get this warning:
`[Open3D WARNING] [ViewControl] ConvertFromPinholeCameraParameters() failed because window height and width do not match.`
Any idea how to fix this?
- Operating system: OSX 10.15
- Python version: Python 3.7
- Open3D version: 12.0
- Is this remote workstation?: no
- How did you install Open3D?: pip
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.