isl-org / isl-org/Open3D

orient_normals_consistent_tangent_plane() Infinite Loop

Open
#4,983 3 comments 0 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 have been trying to estimate normal vectors for some various point clouds and the method `orient_normals_consistent_tangent_plane()` seems to throw the program into an infinite loop. I have tried updating the number of neighbors `k` to be a smaller value 5 but still have not achieved any improved results.

The method works well for the point clouds
* _foam_square_short.ply_

However, it fails for the following point clouds:
* _cube_single_hole.ply_
* _cube_multiple_holes.ply_
* _pyramid_hole.ply_
* _frame_fillet.ply_
* _frame_outer_fillet.ply_

### Steps to reproduce the bug

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

def estimate_normals(config):
input_filename = io_util.get_scan_filename(config)
pcd = o3d.io.read_point_cloud(input_filename)

knn = config['parameters']['nearestNeighbors']
search = o3d.geometry.KDTreeSearchParamKNN(knn=knn)

if (config['parameters']['useNormals']):
pcd.estimate_normals(search_param=search)
pcd.orient_normals_consistent_tangent_plane(k=knn)
normals = np.asarray(pcd.normals)
```

### Error message

_No response_

### Expected behavior

The method `orient_normals_consistent_tangent_plane()` should perform consistently for all of the attached point clouds without throwing the program into an infinite loop.

### Open3D, Python and System information

```markdown
- Operating system: Windows 10 64-bit
- Python version: Python 3.9.10
- Open3D version: output from python: 0.15.1
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```

### Additional information

* _scan_foam_square.ply_
image

* _cube_single_hole.ply_
image

* _cube_multiple_holes.ply_
image

* _pyramid_hole.ply_
image

* _frame_fillet.ply_
image

* _frame_outer_fillet.ply_
image

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.