Open3D
Open3D copied to clipboard
`VoxelGrid.create_from_point_cloud_within_bounds` does not care for bounds
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).
Describe the issue
The documentation explains that the parameters min_bound and max_bound for the function
should crop the point cloud within bounds (at least in my understanding).
I don't see any impact of the bounds, as illustrated in the above example.
Steps to reproduce the bug
import open3d as o3d
import numpy as np
from open3d.web_visualizer import draw
pcd = o3d.io.read_point_cloud("/home/pguhur/src/Open3D/examples/test_data/fragment.ply")
min_bound = np.array([10,10,10])[:, None]
max_bound = np.array([10,10,10])[:, None]
voxel_grid = o3d.geometry.VoxelGrid.create_from_point_cloud_within_bounds(pcd, 0.01, min_bound, max_bound)
draw([voxel_grid])
Error message
This is providing the full point cloud:

Expected behavior
I would be expected the point cloud to be cropped instead.
Open3D, Python and System information
- Operating system: Ubuntu 20.04
- Python version: Python 3.8
- Open3D version: 0.14.1+068d833
- System type: x84
- Is this remote workstation?: yes
- How did you install Open3D?: pip
Additional information
No response
I have similar issue, voxel grid is not changed
min_bound = np.asarray([1, 2, 3]).reshape(3, 1).astype(np.float64)
max_bound = np.asarray([-1, -2, -3]).reshape(3, 1).astype(np.float64)
voxel_grid = VoxelGrid.create_from_point_cloud_within_bounds(pcd, voxel_size, min_bound,max_bound)