Open3D
Open3D copied to clipboard
From NUMPY RGBD To o3d.RGBD
Checklist
- [x] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
masterbranch).
My Question
RuntimeError: [Open3D Error] (static std::shared_ptropen3d::geometry::RGBDImage open3d::geometry::RGBDImage::CreateFromColorAndDepth(const open3d::geometry::Image&, const open3d::geometry::Image&, double, double, bool)) /root/Open3D/cpp/open3d/geometry/RGBDImageFactory.cpp:42: [CreateFromColorAndDepth] Unsupported image format.
radius_normal = voxel_size * 2
color_raw = Image.open(path+"/color/0000"+str(i)+".jpg")
depth_raw = Image.open(path+"/depth/0000"+str(i)+".png")
color =255*rgb_transform(color_raw)
depth = dep_transform(np.asarray(depth_raw),dims)
color_o3d = o3d.geometry.Image(color.detach().numpy().astype(np.uint8))
depth_o3d = o3d.geometry.Image((depth.detach().numpy()).astype(np.uint16))
print('color_o3d.shape: ',(np.asarray(color_o3d)).max())
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(color_o3d,depth_o3d)
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd_image, pinhole_camera_intrinsic)
OK,this problem is solved by myself. I'd want to paste the solution! All the problems come from unsupported formats.The map type and shaped should be converted to the following format:
