【发布时间】:2022-04-09 06:07:17
【问题描述】:
我有一个 2D numpy 数组(640X480),其中包含我通过渲染系统获得的每个像素的深度值。现在我想获取它的点云。我尝试了很多方法,但我遇到了旋转问题:
我尝试过的方法:
- 使用 open3d-python 库:我找到了一个示例并按照以下步骤操作:
color_raw = o3d.io.read_image("../../test_data/RGBD/color/00000.jpg")
depth_raw = o3d.io.read_image("../../test_data/RGBD/depth/00000.png")
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(
color_raw, depth_raw)
a = o3d.camera.PinholeCameraIntrinsicParameters
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(
rgbd_image,
o3d.camera.PinholeCameraIntrinsic(
o3d.camera.PinholeCameraIntrinsicParameters.Kinect2DepthCameraDefault))
o3d.visualization.draw_geometries([pcd])
```
**Problem**:
a) I do not have an rgbd image. all I have is a 2d numpy array containing depth values for each pixel which can be saved as png image and used for the parameter depth_raw.
b) I tried to create a point cloud only from depth image using the function `open3d.geometry.PointCloud.create_from_depth_image(depth, intrinsic, extrinsic=(with default value), depth_scale=1000.0, depth_trunc=1000.0, stride=1, project_valid_depth_only=True)` but I get error when I try to pass the png image. how can I pass my numpy array into the required image format.
Please help me the above doubts to proceed further.
thanks in advance
【问题讨论】:
-
我知道这不是解决方案,但您应该尝试Vedo library。如果您想要拥有交互式 3d 点云,并且想要拥有实时变化的点云,它会更容易使用。
标签: python numpy point-clouds depth open3d