🌊

Open3Dのvoxelデータの保存形式

2022/12/10に公開

コード

extensions = ['nxs', 'nxz', '3ds', 'ply', 'stl', 'obj', 'off', 'wrl', 'dxf', 'dae', 'ctm', 'e57', 'xyz', 'json', 'u3d', 'idtf', 'x3d']

for ext in extensions:
    result = o3d.io.write_voxel_grid(f"sample.{ext}", voxel_grid)
    print (ext, result)

結果: plyのみ対応

MeshLabで保存できる形式のみ試してみました。objはダメなのか…

[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
nxs False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
nxz False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
3ds False
ply True
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
stl False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
obj False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
off False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
wrl False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
dxf False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
dae False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
ctm False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
e57 False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
xyz False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
json False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
u3d False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
idtf False
[Open3D WARNING] Write geometry::VoxelGrid failed: unknown file extension.
x3d False

Discussion