资源简介

基于坡度和聚类的算法,提取lidar点云的地物边缘线。最终得到地物的轮廓

资源截图

代码片段和文件信息

#include 
#include 
#include 

#include 
#include 

struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};

typedef CGAL::Alpha_shape_vertex_base_3          Vb;
typedef CGAL::Alpha_shape_cell_base_3            Fb;
typedef CGAL::Triangulation_data_structure_3 Tds;
typedef CGAL::Delaunay_triangulation_3       Triangulation_3;
typedef CGAL::Alpha_shape_3        Alpha_shape_3;

typedef K::Point_3                                  Point;
typedef Alpha_shape_3::Alpha_iterator               Alpha_iterator;

int main()
{
  std::list lp;

  //read input
  std::ifstream is(“./data/bunny_1000“);
  int n;
  is >> n;
  std::cout << “Reading “ << n << “ points “ << std::endl;
  Point p;
  for( ; n>0 ; n--)    {
    is >> p;
    lp.push_back(p);
  }

  // compute alpha shape
  Alpha_shape_3 as(lp.begin()lp.end());
  std::cout << “Alpha shape computed in REGULARIZED mode by defaut“
    << std::endl;

  // find optimal alpha value
  Alpha_iterator opt = as.find_optimal_alpha(1);
  std::cout << “Optimal alpha value to get one connected component is “
    <<  *opt    << std::endl;
  as.set_alpha(*opt);
  assert(as.number_of_solid_components() == 1);
  return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-10-27 16:58  Alpha_shapes_3\
     文件     6974464  2011-11-01 09:00  Alpha_shapes_3\Alpha_shapes_3.ncb
     文件        1874  2011-10-27 13:34  Alpha_shapes_3\Alpha_shapes_3.sln
     文件         586  2007-08-26 03:01  Alpha_shapes_3\Alpha_shapes_3.sln.old
     文件       10752  2011-11-01 09:00  Alpha_shapes_3\Alpha_shapes_3.suo
     文件         612  2007-08-26 03:00  Alpha_shapes_3\README
     文件        8796  2011-10-27 13:34  Alpha_shapes_3\UpgradeLog.xml
     目录           0  2011-10-27 16:58  Alpha_shapes_3\VC\
     目录           0  2011-10-27 16:58  Alpha_shapes_3\VC\Debug\
     目录           0  2011-10-27 16:58  Alpha_shapes_3\VC\Debug\alpha_shapes_3\
     文件       11234  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\BuildLog.htm
     文件         403  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\alpha_shapes_3.exe.embed.manifest
     文件         468  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\alpha_shapes_3.exe.embed.manifest.res
     文件         385  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\alpha_shapes_3.exe.intermediate.manifest
     文件     6811373  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\alpha_shapes_3.obj
     文件          67  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\mt.dep
     文件      912384  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\vc80.idb
     文件     1667072  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3\vc80.pdb
     文件      598016  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3.exe
     文件     2121152  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3.ilk
     文件     6966272  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_3.pdb
     目录           0  2011-10-27 16:58  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\
     文件       12792  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\BuildLog.htm
     文件         403  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\alpha_shapes_with_hierarchy_3.exe.embed.manifest
     文件         468  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\alpha_shapes_with_hierarchy_3.exe.embed.manifest.res
     文件         385  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\alpha_shapes_with_hierarchy_3.exe.intermediate.manifest
     文件     5517416  2011-10-28 16:55  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\alpha_shapes_with_hierarchy_3.obj
     文件          67  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\mt.dep
     文件      920576  2011-10-28 16:55  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\vc80.idb
     文件     1658880  2011-10-28 16:55  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3\vc80.pdb
     文件      487424  2011-10-28 16:56  Alpha_shapes_3\VC\Debug\alpha_shapes_with_hierarchy_3.exe
............此处省略36个文件信息

评论

共有 条评论