What is the role of min_bound and max_bound when voxel_down_sample_and_trace?It doesn't seem to work.
- 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
Hello,there is a question.What is the role of min_bound and max_bound when voxel_down_sample_and_trace? This should be by controlling the sampling range of the point cloud, so as to control the number of downsampled point clouds, right? But that doesn't seem to be the case in my project, and I'm not sure if this is a bug. I will reduce the doubts to the following example, why are downpcd2 and downpcd3 the same number of points?###
### Steps to reproduce the bug
```python
import numpy as np
import open3d as o3d
pcd = o3d.geometry.PointCloud()
x = np.linspace(-1, 1, 50)
y = np.linspace(-1, 1, 50)
points = np.stack(np.meshgrid(x, y), axis=-1).reshape((-1, 2))
points = np.concatenate([points, np.zeros((points.shape[0], 1))], axis=-1)
pcd.points = o3d.utility.Vector3dVector(points)
# o3d.io.write_point_cloud("ori.pcd", pcd)
voxel_size = 0.5
# down_pcd1 = pcd.voxel_down_sample(voxel_size=voxel_size)
# o3d.io.write_point_cloud("down1.pcd", down_pcd1)
down_pcd2, _, _ = pcd.voxel_down_sample_and_trace(
voxel_size=voxel_size,
min_bound=pcd.get_min_bound(),
max_bound=pcd.get_max_bound(),
)
# o3d.io.write_point_cloud("down2.pcd", down_pcd2)
print(len(down_pcd2.points)) # 25
down_pcd3, _, _ = pcd.voxel_down_sample_and_trace(
voxel_size=voxel_size,
min_bound=pcd.get_min_bound(),
max_bound=pcd.get_min_bound() + voxel_size - 0.001,
)
# o3d.io.write_point_cloud("down3.pcd", down_pcd3)
print(len(down_pcd3.points)) # 25
```
### Error message
none
### Expected behavior
Controls the extent of the point cloud that is downsampled.
### Open3D, Python and System information
```markdown
- Operating system: Windows 10 64-bit
- Python version: Python 3.8
- Open3D version: output from python: 0.15.1, 0.17.0
- System architecture: arm64
- Is this a remote workstation?: no
- How did you install Open3D?: pip
- Compiler version (if built from source): no
```
### Additional information
none
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.