python - 树木 3d 点云中的 Alphashapes

标签 python geometry point-clouds convex-hull lidar

我需要帮助找到树冠(森林树)的最小封闭体积以及构成该体积的点的顶点。这可以通过找到该树的 alpha 形状(凹壳)来解决。我不懂c++,所以CGAL和PCL是不可能的。在 python 中是否有方便的方法来做到这一点?

我使用了 scipy 中的 ConvexHull

dataframe = pd.read_csv(base + direct + '\\' + file)
      #dataframe = pd.read_csv('C:\\Users\\jpps_\\Documents\\Projeto_Novo\\Cylinders_Eucaliptos_Pinheiros_Veg_Acima_15m\\cilnr19.0.csv')
        trees= dataframe[(dataframe['raw_classification']!=30) & (dataframe['intensity']!=64)][['X','Y','Z','intensity']].reset_index(drop=True)
        points = np.array(trees[['X','Y','Z']].values)            
        hull = ConvexHull(points)
        indices = hull.vertices
        vertices = points[indices]
        vert_df = pd.DataFrame(vertices,columns = ['X','Y','Z'])

我希望有一个类似的过程,但这会给我一个 alpha 形状。

点云图片:

enter image description here

最佳答案

是的,看看Alpha Shape Toolbox在 pypi.org 上:

<小时/> Fig
平板卡里投影

<小时/>

关于python - 树木 3d 点云中的 Alphashapes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57626670/

相关文章:

python - 如何在给定参数和键值的情况下创建 M2Crypto DSA 对象?

python - 如何使用 python 脚本在目录之间进行 "cd"

python - 运行最安全的python代码

python - 如何在for循环python中使用计数器

java - 检查投影到线段上的点是否不在线段之外

c++ - 从 Eigen::Vector 转换为 Eigen::Affine3f

ios - 使用 SceneKit 和 SCNGeometryPrimitiveTypePoint 制作自定义几何体时如何调用 glPointSize() (或 SceneKit 等效项)

specifications - 是否有 PCD 文件格式的规范?

c++ - DirectX 11 制作一个正方形。

c# - 我如何找到两点/像素之间的距离?