isl-org / isl-org/Open3D

normals all the same after estimate_normals of .las data point cloud

Open
#6,670 1 comment 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](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### Describe the issue

When using estimate_normals with a point cloud from .las data, all the normals are the same and incorrect e.g. [0,0,1].
[las_data.zip](https://github.com/isl-org/Open3D/files/14439503/las_data.zip)
![normal_histogram](https://github.com/isl-org/Open3D/assets/47403576/47b6f85a-8056-4c5c-ab8d-442fb270f8aa)

### Steps to reproduce the bug

```python
import laspy
import open3d as o3d
import numpy as np
from pathlib import Path
import matplotlib.pyplot as plt

las_file_example_path = Path(r"las_data\NEONDSSampleLiDARPointCloud_crop.las")

print(f"File exist: {las_file_example_path.exists()}")

las = laspy.read(las_file_example_path)

print(f"Las data: {las}")

print(f"Dimensions: {list(las.point_format.dimension_names)}")

point_data = np.stack([las.X, las.Y, las.Z], axis=0).transpose((1, 0))

geom = o3d.geometry.PointCloud()
geom.points = o3d.utility.Vector3dVector(point_data)

geom.estimate_normals(
search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))

o3d.visualization.draw_geometries([geom])

print(f"Normal vectors of the first 10 points: {np.asarray(geom.normals)[:10]}")

plt.hist(np.asarray(geom.normals)[:, :])
plt.title("Histogram of the Normals values")
plt.show()
```

### Error message

No error messages

### Expected behavior

A range of different normals values to match the point cloud

### Open3D, Python and System information

```markdown
- Operating system: Windows 10 64-bit
- Python version: 3.9.6
- Open3D version: output from python: 0.18.0
- System architecture: x86 / arm64
- 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.