我有一个 numpy 数组,它是形状(高度、宽度、3)的彩色图像“img”,还有一个形状(高度、宽度)的深度 numpy 数组。我想创建一个 RGBD 图像并显示它,为此我正在执行以下操作:
o3d.geometry.RGBDImage.create_from_color_and_depth(img, depth)
但我收到错误:
TypeError: create_from_color_and_depth(): incompatible function arguments. The following argument types are supported:
1. (color: open3d.open3d_pybind.geometry.Image, depth: open3d.open3d_pybind.geometry.Image, depth_scale: float = 1000.0, depth_trunc: float = 3.0, convert_rgb_to_intensity: bool = True) -> open3d.open3d_pybind.geometry.RGBDImage
如何解决这个问题?如果它需要一个 Image 类型,那么如何将 numpy 数组转换为 Image 类型?
即使我像这样将 numpy 数组传递给 o3d.geometry.Image 构造函数:
o3d.geometry.RGBDImage.create_from_color_and_depth(o3d.geometry.Image(img), o3d.geometry.Image(depth))
我收到错误:
TypeError: create_from_color_and_depth(): incompatible function arguments. The following argument types are supported:
1. (color: open3d.open3d_pybind.geometry.Image, depth: open3d.open3d_pybind.geometry.Image, depth_scale: float = 1000.0, depth_trunc: float = 3.0, convert_rgb_to_intensity: bool = True) -> open3d.open3d_pybind.geometry.RGBDImage
如何解决这个问题并从 rgb numpy 数组和深度 numpy 数组创建 RGBD 图像?
收到一只叮咚
扬帆大鱼
蓝山帝景
相关分类