Loading...
Searching...
No Matches
pcl::Poisson< PointNT > Class Template Reference
Module surface

The Poisson surface reconstruction algorithm. More...

`#include <pcl/surface/poisson.h>`

Inheritance diagram for pcl::Poisson< PointNT >:

## Public Types

using | Ptr = shared_ptr<Poisson<PointNT> >
using | ConstPtr = shared_ptr<const Poisson<PointNT> >
using | PointCloudPtr = typename pcl::PointCloud<PointNT>::Ptr
using | KdTree = pcl::KdTree<PointNT>
using | KdTreePtr = typename KdTree::Ptr
Public Types inherited from pcl::SurfaceReconstruction< PointNT >
using | Ptr
using | ConstPtr
Public Types inherited from pcl::PCLSurfaceBase< PointNT >
using | Ptr
using | ConstPtr
using | KdTree
using | KdTreePtr
Public Types inherited from pcl::PCLBase< PointNT >
using | PointCloud
using | PointCloudPtr
using | PointCloudConstPtr
using | PointIndicesPtr
using | PointIndicesConstPtr

## Public Member Functions

| Poisson ()
| Constructor that sets all the parameters to working default values.
| ~Poisson () override
| Destructor.
void | performReconstruction (pcl::PolygonMesh &output) override
| Create the surface.
void | performReconstruction (pcl::PointCloud< PointNT > &points, std::vector< pcl::Vertices > &polygons) override
| Create the surface.
void | setDepth (int depth)
| Set the maximum depth of the tree that will be used for surface reconstruction.
int | getDepth ()
| Get the depth parameter.
void | setMinDepth (int min_depth)
int | getMinDepth ()
void | setPointWeight (float point_weight)
float | getPointWeight ()
void | setScale (float scale)
| Set the ratio between the diameter of the cube used for reconstruction and the diameter of the samples' bounding cube.
float | getScale ()
| Get the ratio between the diameter of the cube used for reconstruction and the diameter of the samples' bounding cube.
void | setSolverDivide (int solver_divide)
| Set the the depth at which a block Gauss-Seidel solver is used to solve the Laplacian equation.
int | getSolverDivide ()
| Get the depth at which a block Gauss-Seidel solver is used to solve the Laplacian equation.
void | setIsoDivide (int iso_divide)
| Set the depth at which a block iso-surface extractor should be used to extract the iso-surface.
int | getIsoDivide ()
| Get the depth at which a block iso-surface extractor should be used to extract the iso-surface.
void | setSamplesPerNode (float samples_per_node)
| Set the minimum number of sample points that should fall within an octree node as the octree construction is adapted to sampling density.
float | getSamplesPerNode ()
| Get the minimum number of sample points that should fall within an octree node as the octree construction is adapted to sampling density.
void | setConfidence (bool confidence)
| Set the confidence flag.
bool | getConfidence ()
| Get the confidence flag.
void | setOutputPolygons (bool output_polygons)
| Enabling this flag tells the reconstructor to output a polygon mesh (rather than triangulating the results of Marching Cubes).
bool | getOutputPolygons ()
| Get whether the algorithm outputs a polygon mesh or a triangle mesh.
void | setDegree (int degree)
| Set the degree parameter.
int | getDegree ()
| Get the degree parameter.
void | setManifold (bool manifold)
| Set the manifold flag.
bool | getManifold ()
| Get the manifold flag.
void | setThreads (int threads)
| Set the number of threads to use.
int | getThreads ()
| Get the number of threads.
Public Member Functions inherited from pcl::SurfaceReconstruction< PointNT >
| SurfaceReconstruction ()=default
| Constructor.
| ~SurfaceReconstruction () override=default
| Destructor.
void | reconstruct (pcl::PolygonMesh &output) override
| Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>.
Public Member Functions inherited from pcl::PCLSurfaceBase< PointNT >
| PCLSurfaceBase ()
| Empty constructor.
| ~PCLSurfaceBase () override=default
| Empty destructor.
void | setSearchMethod (const KdTreePtr &tree)
| Provide an optional pointer to a search object.
KdTreePtr | getSearchMethod ()
| Get a pointer to the search method used.
Public Member Functions inherited from pcl::PCLBase< PointNT >
| PCLBase ()
| Empty constructor.
virtual | ~PCLBase ()=default
| Destructor.
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a pointer to the input dataset.
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset.
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
IndicesPtr | getIndices ()
| Get a pointer to the vector of indices used.
const PointNT & | operator[] (std::size_t pos) const
| Override PointCloud operator[] to shorten code.

## Protected Member Functions

std::string | getClassName () const override
| Class get name method.
Protected Member Functions inherited from pcl::PCLBase< PointNT >
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.

## Additional Inherited Members

Protected Attributes inherited from pcl::SurfaceReconstruction< PointNT >
bool | check_tree_
| A flag specifying whether or not the derived reconstruction algorithm needs the search object tree.
Protected Attributes inherited from pcl::PCLSurfaceBase< PointNT >
KdTreePtr | tree_
| A pointer to the spatial search object.
Protected Attributes inherited from pcl::PCLBase< PointNT >
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
bool | use_indices_
| Set to true if point indices are used.
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

## Detailed Description

template<typename PointNT>
class pcl::Poisson< PointNT >

The Poisson surface reconstruction algorithm.

Note
  Code adapted from Misha Kazhdan: http://www.cs.jhu.edu/~misha/Code/PoissonRecon/
  Based on the paper:
  - Michael Kazhdan, Matthew Bolitho, Hugues Hoppe, "Poisson surface reconstruction", SGP '06 Proceedings of the fourth Eurographics symposium on Geometry processing

Author
  Alexandru-Eugen Ichim

Definition at line 61 of file poisson.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointNT>

using pcl::Poisson< PointNT >::ConstPtr = shared_ptr<const Poisson<PointNT> >

Definition at line 65 of file poisson.h.

## KdTree

template<typename PointNT>

using pcl::Poisson< PointNT >::KdTree = pcl::KdTree<PointNT>

Definition at line 72 of file poisson.h.

## KdTreePtr

template<typename PointNT>

using pcl::Poisson< PointNT >::KdTreePtr = typename KdTree::Ptr

Definition at line 73 of file poisson.h.

## PointCloudPtr

template<typename PointNT>

using pcl::Poisson< PointNT >::PointCloudPtr = typename pcl::PointCloud<PointNT>::Ptr

Definition at line 70 of file poisson.h.

## Ptr

template<typename PointNT>

using pcl::Poisson< PointNT >::Ptr = shared_ptr<Poisson<PointNT> >

Definition at line 64 of file poisson.h.

## Constructor & Destructor Documentation

## Poisson()

template<typename PointNT>

pcl::Poisson< PointNT >::Poisson | ( |  | ) |

default

Constructor that sets all the parameters to working default values.

## ~Poisson()

template<typename PointNT>

pcl::Poisson< PointNT >::~Poisson | ( |  | ) |

override default

Destructor.

## Member Function Documentation

## getClassName()

template<typename PointNT>

std::string pcl::Poisson< PointNT >::getClassName | ( |  | ) | const

inline override protected virtual

Class get name method.

Reimplemented from pcl::PCLSurfaceBase< PointNT >.

Definition at line 236 of file poisson.h.

## getConfidence()

template<typename PointNT>

bool pcl::Poisson< PointNT >::getConfidence | ( |  | ) |

inline

Get the confidence flag.

Definition at line 184 of file poisson.h.

## getDegree()

template<typename PointNT>

int pcl::Poisson< PointNT >::getDegree | ( |  | ) |

inline

Get the degree parameter.

Definition at line 205 of file poisson.h.

## getDepth()

template<typename PointNT>

int pcl::Poisson< PointNT >::getDepth | ( |  | ) |

inline

Get the depth parameter.

Definition at line 106 of file poisson.h.

## getIsoDivide()

template<typename PointNT>

int pcl::Poisson< PointNT >::getIsoDivide | ( |  | ) |

inline

Get the depth at which a block iso-surface extractor should be used to extract the iso-surface.

Definition at line 157 of file poisson.h.

## getManifold()

template<typename PointNT>

bool pcl::Poisson< PointNT >::getManifold | ( |  | ) |

inline

Get the manifold flag.

Definition at line 217 of file poisson.h.

## getMinDepth()

template<typename PointNT>

int pcl::Poisson< PointNT >::getMinDepth | ( |  | ) |

inline

Definition at line 112 of file poisson.h.

## getOutputPolygons()

template<typename PointNT>

bool pcl::Poisson< PointNT >::getOutputPolygons | ( |  | ) |

inline

Get whether the algorithm outputs a polygon mesh or a triangle mesh.

Definition at line 195 of file poisson.h.

## getPointWeight()

template<typename PointNT>

float pcl::Poisson< PointNT >::getPointWeight | ( |  | ) |

inline

Definition at line 118 of file poisson.h.

## getSamplesPerNode()

template<typename PointNT>

float pcl::Poisson< PointNT >::getSamplesPerNode | ( |  | ) |

inline

Get the minimum number of sample points that should fall within an octree node as the octree construction is adapted to sampling density.

Definition at line 172 of file poisson.h.

## getScale()

template<typename PointNT>

float pcl::Poisson< PointNT >::getScale | ( |  | ) |

inline

Get the ratio between the diameter of the cube used for reconstruction and the diameter of the samples' bounding cube.

Definition at line 131 of file poisson.h.

## getSolverDivide()

template<typename PointNT>

int pcl::Poisson< PointNT >::getSolverDivide | ( |  | ) |

inline

Get the depth at which a block Gauss-Seidel solver is used to solve the Laplacian equation.

Definition at line 144 of file poisson.h.

## getThreads()

template<typename PointNT>

int pcl::Poisson< PointNT >::getThreads | ( |  | ) |

inline

Get the number of threads.

Definition at line 228 of file poisson.h.

## performReconstruction() [1/2]

template<typename PointNT>

void pcl::Poisson< PointNT >::performReconstruction | ( | pcl::PointCloud< PointNT > & | points,
|  | std::vector< pcl::Vertices > & | polygons )

override

Create the surface.

Parameters

  [out] | points | the vertex positions of the resulting mesh
  [out] | polygons | the connectivity of the resulting mesh

Definition at line 222 of file poisson.hpp.

References pcl::poisson::Point3D< Real >::coords, pcl::poisson::CoredMeshData::inCorePoints, pcl::poisson::CoredVectorMeshData::nextOutOfCorePoint(), pcl::poisson::CoredVectorMeshData::nextPolygon(), pcl::poisson::CoredVectorMeshData::outOfCorePointCount(), pcl::poisson::CoredVectorMeshData::polygonCount(), pcl::PointCloud< PointT >::resize(), and pcl::Vertices::vertices.

## performReconstruction() [2/2]

template<typename PointNT>

void pcl::Poisson< PointNT >::performReconstruction | ( | pcl::PolygonMesh & | output | ) |

override virtual

Create the surface.

Parameters

  [out] | output | the resultant polygonal mesh

Implements pcl::SurfaceReconstruction< PointNT >.

Definition at line 142 of file poisson.hpp.

References pcl::PolygonMesh::cloud, pcl::poisson::Point3D< Real >::coords, pcl::poisson::CoredMeshData::inCorePoints, pcl::poisson::CoredVectorMeshData::nextOutOfCorePoint(), pcl::poisson::CoredVectorMeshData::nextPolygon(), pcl::poisson::CoredVectorMeshData::outOfCorePointCount(), pcl::poisson::CoredVectorMeshData::polygonCount(), pcl::PolygonMesh::polygons, pcl::PointCloud< PointT >::resize(), pcl::toPCLPointCloud2(), and pcl::Vertices::vertices.

## setConfidence()

template<typename PointNT>

void pcl::Poisson< PointNT >::setConfidence | ( | bool | confidence | ) |

inline

Set the confidence flag.

Note
  Enabling this flag tells the reconstructor to use the size of the normals as confidence information. When the flag is not enabled, all normals are normalized to have unit-length prior to reconstruction.

Parameters

  [in] | confidence | the given flag

Definition at line 180 of file poisson.h.

## setDegree()

template<typename PointNT>

void pcl::Poisson< PointNT >::setDegree | ( | int | degree | ) |

inline

Set the degree parameter.

Parameters

  [in] | degree | the given degree

Definition at line 201 of file poisson.h.

## setDepth()

template<typename PointNT>

void pcl::Poisson< PointNT >::setDepth | ( | int | depth | ) |

inline

Set the maximum depth of the tree that will be used for surface reconstruction.

Note
  Running at depth d corresponds to solving on a voxel grid whose resolution is no larger than 2^d x 2^d x 2^d. Note that since the reconstructor adapts the octree to the sampling density, the specified reconstruction depth is only an upper bound.

Parameters

  [in] | depth | the depth parameter

Definition at line 102 of file poisson.h.

## setIsoDivide()

template<typename PointNT>

void pcl::Poisson< PointNT >::setIsoDivide | ( | int | iso_divide | ) |

inline

Set the depth at which a block iso-surface extractor should be used to extract the iso-surface.

Note
  Using this parameter helps reduce the memory overhead at the cost of a small increase in extraction time. (In practice, we have found that for reconstructions of depth 9 or higher a subdivide depth of 7 or 8 can greatly reduce the memory usage.)

Parameters

  [in] | iso_divide | the given parameter value

Definition at line 153 of file poisson.h.

## setManifold()

template<typename PointNT>

void pcl::Poisson< PointNT >::setManifold | ( | bool | manifold | ) |

inline

Set the manifold flag.

Note
  Enabling this flag tells the reconstructor to add the polygon barycenter when triangulating polygons with more than three vertices.

Parameters

  [in] | manifold | the given flag

Definition at line 213 of file poisson.h.

## setMinDepth()

template<typename PointNT>

void pcl::Poisson< PointNT >::setMinDepth | ( | int | min_depth | ) |

inline

Definition at line 109 of file poisson.h.

## setOutputPolygons()

template<typename PointNT>

void pcl::Poisson< PointNT >::setOutputPolygons | ( | bool | output_polygons | ) |

inline

Enabling this flag tells the reconstructor to output a polygon mesh (rather than triangulating the results of Marching Cubes).

Parameters

  [in] | output_polygons | the given flag

Definition at line 191 of file poisson.h.

## setPointWeight()

template<typename PointNT>

void pcl::Poisson< PointNT >::setPointWeight | ( | float | point_weight | ) |

inline

Definition at line 115 of file poisson.h.

## setSamplesPerNode()

template<typename PointNT>

void pcl::Poisson< PointNT >::setSamplesPerNode | ( | float | samples_per_node | ) |

inline

Set the minimum number of sample points that should fall within an octree node as the octree construction is adapted to sampling density.

Note
  For noise-free samples, small values in the range [1.0 - 5.0] can be used. For more noisy samples, larger values in the range [15.0 - 20.0] may be needed to provide a smoother, noise-reduced, reconstruction.

Parameters

  [in] | samples_per_node | the given parameter value

Definition at line 166 of file poisson.h.

## setScale()

template<typename PointNT>

void pcl::Poisson< PointNT >::setScale | ( | float | scale | ) |

inline

Set the ratio between the diameter of the cube used for reconstruction and the diameter of the samples' bounding cube.

Parameters

  [in] | scale | the given parameter value

Definition at line 125 of file poisson.h.

## setSolverDivide()

template<typename PointNT>

void pcl::Poisson< PointNT >::setSolverDivide | ( | int | solver_divide | ) |

inline

Set the the depth at which a block Gauss-Seidel solver is used to solve the Laplacian equation.

Note
  Using this parameter helps reduce the memory overhead at the cost of a small increase in reconstruction time. (In practice, we have found that for reconstructions of depth 9 or higher a subdivide depth of 7 or 8 can greatly reduce the memory usage.)

Parameters

  [in] | solver_divide | the given parameter value

Definition at line 140 of file poisson.h.

## setThreads()

template<typename PointNT>

void pcl::Poisson< PointNT >::setThreads | ( | int | threads | ) |

Set the number of threads to use.

Parameters

  [in] | threads | the number of threads

Definition at line 71 of file poisson.hpp.

The documentation for this class was generated from the following files:

- pcl/surface/poisson.h
- pcl/surface/impl/poisson.hpp