PoissonRecon output should not depend on 'width' param if 'depth' is given
- 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
[Readme file from original PoissonRecon repo](https://github.com/mkazhdan/PoissonRecon/blob/master/README.md) and the [release documentation of open3d](http://www.open3d.org/docs/release/python_api/open3d.geometry.TriangleMesh.html?highlight=create_from_point_cloud_poisson#open3d.geometry.TriangleMesh.create_from_point_cloud_poisson) says that --width param is ignored if --depth is specified. However, according to [this issue](https://github.com/mkazhdan/PoissonRecon/issues/251), the open3d porting is highly assumed to be responsible for the --width inconsistency as the original C++ code made reproducible mesh regardless of --width value (with --depth specified, obviously).
### Steps to reproduce the bug
```python
def test_min_num_points(depth, width, scale):
for i in range(10, 0, -1):
sampled_pcl = o3d.geometry.PointCloud()
sampled_pcl.points = o3d.utility.Vector3dVector(np.arange(3 * i).reshape((-1, 3)))
sampled_pcl.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(
radius=50, max_nn=100))
try:
(
poisson_mesh,
densities,
) = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(
sampled_pcl,
depth=depth,
width=width,
scale=scale,
linear_fit=True,
n_threads=-1)
except Exception as e:
print("Exception message:", e)
print("Number of input points:", i)
return
>>> test_min_num_points(7, 5, 1)
>>> test_min_num_points(7, 0, 1)
```
### Error message
```python
>>> test_min_num_points(7, 5, 1)
Exception message: [Open3D Error] (void open3d::geometry::poisson::Execute(const open3d::geometry::PointCloud&, std::shared_ptr&, std::vector&, int, float, float, bool, UIntPack) [with Real = float; SampleData = {}; unsigned int ...FEMSigs = {5, 5, 5}]) /root/Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:519: depth (=1) has to be >= 2
Number of input points: 4
>>> test_min_num_points(7, 0, 1)
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.Initialize.inl (Line 192)
Initialize
Found out-of-bound points: 1
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.Initialize.inl (Line 192)
Initialize
Found out-of-bound points: 1
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.Initialize.inl (Line 192)
Initialize
Found out-of-bound points: 1
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.Initialize.inl (Line 192)
Initialize
Found out-of-bound points: 1
Segmentation fault (core dumped)
**Python interpreter crashes**
```
### Expected behavior
Triangle mesh created from o3d.geometry.TriangleMesh.create_from_point_cloud_poisson should yield identical output for various width value as long as depth param is specified.
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.8.13
- Open3D version: 0.16.0
- 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.