Exemple #1
0
void
pcl::ihs::Integration::age (const MeshPtr& mesh, const bool cleanup) const
{
  for (Mesh::VertexIterator it = mesh->beginVertexes (); it!=mesh->endVertexes (); ++it)
  {
    if(it->age < age_max_)
    {
       // Point survives
       ++it->age;
    }
    else if(it->age == age_max_) // Judgement Day
    {
      if(it->visconf.getValue () < visconf_min_)
      {
        // Point dies (no need to transform it)
        mesh->deleteVertex (*it);
      }
      else
      {
        // Point becomes immortal
        it->age = std::numeric_limits <unsigned int>::max ();
      }
    }
  }

  if (cleanup)
  {
    mesh->cleanUp ();
  }
}
Exemple #2
0
void
pcl::ihs::Integration::age (const MeshPtr& mesh, const bool cleanup) const
{
  for (unsigned int i=0; i<mesh->sizeVertices (); ++i)
  {
    PointIHS& pt = mesh->getVertexDataCloud () [i];
    if (pt.age < max_age_)
    {
      // Point survives
      ++(pt.age);
    }
    else if (pt.age == max_age_) // Judgement Day
    {
      if (pcl::ihs::countDirections (pt.directions) < min_directions_)
      {
        // Point dies (no need to transform it)
        mesh->deleteVertex (VertexIndex (i));
      }
      else
      {
        // Point becomes immortal
        pt.age = std::numeric_limits <unsigned int>::max ();
      }
    }
  }

  if (cleanup)
  {
    mesh->cleanUp ();
  }
}
Exemple #3
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 ();
  }
}