mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.56k stars 425 forks source link

PoissonRecon [Found bad data] and [Solver depth cannot exceed maximum depth] #228

Closed darktrident closed 2 years ago

darktrident commented 2 years ago

Hi ! I'm using the PoissonRecon and I got the bunny reconstruction successfully. But when I using my own ply files, it goes error...

[WARNING]...\src\femtree.initialize.inl (Line 199) FEMTreeInitializer<3,float>::Initialize Found bad data: 473834 (<-That's all the points in my file... all bad?) [ERROR]...\src\femtree.system.inl (Line 2641) FEMTree<3,float>::solveSystem Solver depth cannot exceed maximum depth: 8 <= 0 I tried many commands and still these errors... What shall I do to solve these problems? Thank you! (P.S. how to paste my ply file to this thread?)

mkazhdan commented 2 years ago
  1. Can you share the data?
  2. What parameters are you running the executable with? 3
darktrident commented 2 years ago

1004G1_4_dense_final.zip

this is my ply file. a point cloud of plant.

mkazhdan commented 2 years ago

Loading your file in MeshLab, saving in ASCII format, and running "more" on the file shows that all the normals are zero.

darktrident commented 2 years ago

Loading your file in MeshLab, saving in ASCII format, and running "more" on the file shows that all the normals are zero.

Ahh.. How can I do to deal with these? To delete the normal data or to calculate it?

mkazhdan commented 2 years ago

Not sure. Estimating normals from unoriented point clouds remains a hard problem. Usually you have them because you can estimate locally-best-fit-planes and then orient them so that they are facing the camera. But if you don't have camera information the problem is harder.

darktrident commented 2 years ago

Not sure. Estimating normals from unoriented point clouds remains a hard problem. Usually you have them because you can estimate locally-best-fit-planes and then orient them so that they are facing the camera. But if you don't have camera information the problem is harder.

ok... Thanks for the help.

darktrident commented 2 years ago

Hello there, I tried to compute the normals, but the reconstruction ( leaf plant ) seems not good at all... I know the leaf is hard to recon , but how can I recon it correctly by using executable parameters ? Thank you ! 1004G1_4_dense_final_normal.zip

mkazhdan commented 2 years ago

The problem is that the dataset you have only generates samples on one side of the leaves, resulting in "ballooning" at the edges of the leaf.

You can clean those up by using the surface trimmer application. In particular, you first need to run the reconstruction code so that it outputs density information with each vertex: PoissonRecon.exe --in 1004G1_4_dense_final_normal.ply --out out.ply --depth 11 --density Then you can run the surface trimmer application to remove the ballooned regions by specifying that geometry in regions with few samples should be removed: SurfaceTrimmer--in out.ply --out trimmed.ply --trim 9

The resulting surface in trimmed.ply should only show one side of the leaves, without the ballooning regions. Looking at the results, you may also note that for three of the leaves the normals were chosen so that they were pointing upwards (so that the samples represent the top part of the leaves), while for one of the leaves the normals are chosen so that they are pointing downwards. To see all four leaves you may need to disable culling in your viewer.

darktrident commented 2 years ago

Thank you very much ! I'll have a try.