我需要帮助找到树冠(森林树)的最小封闭体积以及构成该体积的点的顶点。这可以通过找到该树的 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 形状。
点云图片:
最佳答案
关于python - 树木 3d 点云中的 Alphashapes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57626670/