Example #1
0
void
pcl::ihs::Integration::removeUnfitVertices (const MeshPtr& mesh, const bool cleanup) const
{
  for (unsigned int i=0; i<mesh->sizeVertices (); ++i)
  {
    if (pcl::ihs::countDirections (mesh->getVertexDataCloud () [i].directions) < min_directions_)
    {
      // Point dies (no need to transform it)
      mesh->deleteVertex (VertexIndex (i));
    }
  }

  if (cleanup)
  {
    mesh->cleanUp ();
  }
}