point-cloud-librarypoisson

How to specify boundary condition as DIRICHLET in pcl poisson surface reconstruction?


I'm doing a job of surface reconstruction. But I met an issue :

I want to use the DIRICHLET boundary condition in poisson, but it seems that the poisson of pcl doesn't support specifying boundary condition, it just uses NEUMANN boundary condition always.

So I wonder how to use the DIRICHLET boundary condition in pcl poisson.

BTW:My goal is to calculate the volume of a container. But my pointcloud isn't watertight, so I need the algorithm to 'image' the surface of holes. CloudCompare supports specifying boundary condition, and it works well. But in pcl, the effect of NEUMANN boundary condition is terrible.


Solution

  • The original PoissonRecon code is at this github repository. You can also find there prebuild executables for window command line (--bType to set the conidtion). This is available in the command line executable starting from version 9.0.

    [--bType ] This integer specifies the boundary type for the finite elements. Valid values are: 1: Free boundary constraints 2: Dirichlet boundary constraints 3: Neumann boundary constraints The default value for this parameter is 3 (Neumann).

    CloudCompare uses version 7.

    PCL (1.12.0 at the moment of this post) uses version 4 of PoissonRecon.

    Open3D (0.14.1 at the moment of this post) includes a wrapper over version 12, which supports both boundary conditions. It is however hard-coded to use NEUMANN. You should be able to easily change the enum and compile a version of Open3D that uses DIRICHLET condition (never tried this myself).


    Alternatively (if you can't use the original console app or recompile Open3D), you can try to work with what you've got.

    1. You can try to identify the "imaginary faces" based on the area of the faces (smaller density - larger triangle area) and remove them. The original repository offers a SurfaceTrimmer tool (another console project) that does just that (based on density value).
    2. Close the remaining open mesh using either some hole-closing-method or convex-hull.