Search code examples
c++windowspoint-cloud-library3d-reconstruction

Removing the wrong surface after running Poisson Reconstruction in PCL


I have a similar problem like link. But I used the Poisson Reconstruction algorithm in PCL instead of MeshLab to reconstruct a box. I got a mesh with some extened surface as shown in this image.I want to remove the extened surface now. enter image description here

I do not understand the answer to the above question,and I don't want to modify the source code of PCL. Is there any other way to solve this problem? The version of PCL in my computer is 1.10.

Any suggestions will be appreciated.


Solution

  • As the answer in your link mentions, this artifact is the results of the Neumann boundary condition. PCL however doesn't allow you to specify the boundary condition.

    The original PossionRecon library (on which PCL implementation is based on) does allow you to specify the boundary condition - and has binary executable available. The above link also includes a detailed description of all command line arguments.

    Please note however that Dirichlet boundary condition creates a water-tight surface, so you will still have "imagined" faces where there is missing data.

    The "imagined" surface is characterized by low vertex density - which can be used to remove these faces. PossionRecon also offers a SurfaceTrimmer executable (see same link above), which does that. It requires the PLY to have a density property, which you can get by using the PossionRecon tool with --density option.

    Alternatively, you can approximate the density of the vertices with the area of the faces - and write your own code to remove faces with large area.