我最近安装了cgal库,目前我是这个库的新手,这在我看来并不容易。不幸的是,我的时间不多了,我正在寻找快速和现有的解决方案。
在我的项目中,我需要重建由水平集函数(距离函数)的零给出的曲面的三角网格。水平集在3D笛卡尔网格的中心进行评估。我已经在python中使用了skimage库,其中使用标准的行进立方体算法将表面与三角网格进行网格划分。在视觉上,这个库似乎工作正常但是当我使用一些离散的微分几何公式(如高斯 - 发动机罩)计算曲率时,曲率不够准确。出于这个原因,我想尝试cgal库。 我问你是否可以让我指向现有的简单例子,其中使用cgal库从3D水平集矩阵重建表面。
我还有一些与编译一些cgal示例有关的问题。我试图编译示例:
我使用的编译命令:
g++ -frounding-math -I/usr/include -I/usr/local/include -lCGAL -lmpfr -lboost_thread -lgmp poisson_reconstruction_example.cpp
但是我得到了这些错误:
poisson_reconstruction_example.cpp: In function ‘int main()’:
poisson_reconstruction_example.cpp:65:47: error: no matching function for call to ‘CGAL::Poisson_reconstruction_function<CGAL::Epick>::compute_implicit_function()’
if ( ! function.compute_implicit_function() )
^
poisson_reconstruction_example.cpp:65:47: note: candidates are:
In file included from poisson_reconstruction_example.cpp:17:0:
/usr/local/include/CGAL/Poisson_reconstruction_function.h:372:8: note: template<class SparseLinearAlgebraTraits_d, class Visitor> bool CGAL::Poisson_reconstruction_function<Gt>::compute_implicit_function(SparseLinearAlgebraTraits_d, Visitor, double, double) [with SparseLinearAlgebraTraits_d = SparseLinearAlgebraTraits_d; Visitor = Visitor; Gt = CGAL::Epick]
bool compute_implicit_function(
^
/usr/local/include/CGAL/Poisson_reconstruction_function.h:372:8: note: template argument deduction/substitution failed:
poisson_reconstruction_example.cpp:65:47: note: candidate expects 4 arguments, 0 provided
if ( ! function.compute_implicit_function() )
^
In file included from poisson_reconstruction_example.cpp:17:0:
/usr/local/include/CGAL/Poisson_reconstruction_function.h:525:8: note: template<class SparseLinearAlgebraTraits_d> bool CGAL::Poisson_reconstruction_function<Gt>::compute_implicit_function(SparseLinearAlgebraTraits_d, bool) [with SparseLinearAlgebraTraits_d = SparseLinearAlgebraTraits_d; Gt = CGAL::Epick]
bool compute_implicit_function(SparseLinearAlgebraTraits_d solver, bool smoother_hole_filling = false)
^
/usr/local/include/CGAL/Poisson_reconstruction_function.h:525:8: note: template argument deduction/substitution failed:
poisson_reconstruction_example.cpp:65:47: note: candidate expects 2 arguments, 0 provided
if ( ! function.compute_implicit_function() )
提前感谢您提供的任何帮助