Closed chanyeong-jeong closed 1 year ago
I'm assuming with the port. Though you could try and download the PoissonRecon code directly and try yourself.
I did clone and run the code directly to confirm that PoissonRecon produces two identical triangle mesh for depth=8 width=0 and depth=8 width=1. So I'm pretty sure that open3d-ported version is to blame. Perhaps I should make an issue there. Thank you for your reply!
By the way, I came up with some curiosity as I have been testing the following testcases (1.ply is a point cloud file containing only one point):
$ ./PoissonRecon --width 0 --in ./pcd/1.ply --out ./pcd/1-w0.ply
[WARNING] Src/FEMTree.Initialize.inl (Line 199)
Initialize
Found bad data: 1
[ERROR] Src/FEMTree.System.inl (Line 2641)
solveSystem
Solver depth cannot exceed maximum depth: 8 <= 0
$ ./PoissonRecon --width 1 --in ./pcd/1.ply --out ./pcd/1-w1.ply
[WARNING] Src/PoissonRecon.cpp (Line 623)
Execute
Full depth cannot exceed system depth: 5 <= 0
Segmentation fault (core dumped)
What does it mean to set width=0 (with depth value not provided) when the width of the finest cell cannot be 0? I assume width=0 is the default setting according to this line, but how is the octree constructed then? Also, why does the program make segmentation fault when there are few points, but a different error message when --width 0
?
I believe that the code crashes in the case of a single point because the bounding box has max side lengths equal to zero, resulting in a division by zero when trying to estimate the mapping from world coordinates to the unit cube.
In terms of what width does -- I believe the code tries to find the combination of scale value and depth value so that the width of a leaf node is exactly equal to the prescribed depth. (Which won't make much sense when the width is zero.) Newer code will be a little more lax in this regard, only ensuring that the width is at least as small as the prescribed width. (Though things still won't make sense when the prescribed width is zero.)
I see. Then it would be inappropriate to set width as 0 as long as I want the code to not crash. Thanks for your clarification.
I have been running PoissonRecon ported into open3d as create_from_point_cloud_poisson. README.md file says:
However, it seems that create_from_point_cloud_poisson of open3d===0.16.0 version generates triangle mesh depending on the parameter
width
. I tried with parameter:and the two meshes created yield different results.
Moreover, consider the following error-reproducible example.
In this case, the
width
parameter value determines the behavior(how the program handles exception) of the code, which is confusing again. I expect the program to not crash by segmentation fault so that it prints a proper error message. Could it be the problem of PoissonRecon or the problem of open3d-ported version? Thank you in advance!