isl-org / isl-org/Open3D

Cropping a cropped PCD returns empty

Open
#5,087 4 comments 0 reactions 0 assignees View on GitHub
boundingbox 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 am trying to extract a cropped part of my point cloud, which is already cropped from a much larger point cloud.
When I perform the second crop using:
crop = point_cloud.crop(bbox)
it returns an empty point cloud, even though the object is clearly inside the bbox.
This might be an error on my end, but I assume it is a bug in some way?

Original cropped point cloud:
![first_crop_res](https://user-images.githubusercontent.com/24861628/167367129-ff6a8b06-7a06-4b53-aeba-af9c396d23a7.JPG)

Point cloud with the bbox to be cropped, clearly some points are inside:
![second_crop_res](https://user-images.githubusercontent.com/24861628/167367147-d8eca09c-1526-4f2f-a1bd-9dd4f2f33d56.JPG)

Result of cropping the cropped point cloud, nothing:
![third_crop_res](https://user-images.githubusercontent.com/24861628/167367067-b4e36dca-095b-4791-b0ba-0712caec441f.JPG)

Any help is much appreciated.

### Steps to reproduce the bug

```python
Running this on a point cloud returned from another crop:

crop_bounding_box = o3d.geometry.AxisAlignedBoundingBox(min_bound=min_bound_bbox, max_bound=max_bound_bbox)
crop_bounding_box.color = [255,255,0]
o3d.visualization.draw_geometries([point_cloud, crop_bounding_box])
cropped_pcd = point_cloud.crop(crop_bounding_box)
o3d.visualization.draw_geometries([cropped_pcd])
```

### Error message

_No response_

### Expected behavior

The object within the bbox appears in the cropped point cloud

### Open3D, Python and System information

```markdown
- Operating system: Windows 10 64-bit
- Python version: 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)]
- Open3D version: 0.15.1
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```

### 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.