isl-org / isl-org/Open3D

VoxelGrid connot create from Octree, vice versa.

Open
#5,301 5 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Describe the issue

I use Python API.

`Octree` cannot `to_voxel_grid`.
`VoxelGrid` cannot `create_from_octree`
Both return a VoxelGrid with only 1 voxels.

### Steps to reproduce the bug

```python
import open3d as o3d
import numpy as np

eagle = o3d.data.EaglePointCloud()
pcd = o3d.io.read_point_cloud(eagle.path)
print(pcd)

octree = o3d.geometry.Octree(max_depth=10)
octree.convert_from_point_cloud(pcd)
print(octree)

voxel_from = o3d.geometry.VoxelGrid()
voxel_from.create_from_octree(octree)
voxel_to = octree.to_voxel_grid()
print(voxel_to)
print(voxel_from)
```

### Error message

Outputs:
PointCloud with 796825 points.
Octree with origin: [-2.93248, -1.54948, -2.94431], size: 8.7113, max_depth: 10
VoxelGrid with 1 voxels.
VoxelGrid with 1 voxels.

### Expected behavior

VoxelGrid should not be only 1 voxels.

### Open3D, Python and System information

```markdown
- Operating system: Windows 11 64-bit
- Python version: 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
- Open3D version: 0.15.2+3e8cfb6
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip (latest dev wheel file)
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.