简体   繁体   English

树的 3d 点云中的 Alphashapes

[英]Alphashapes in 3d point cloud of trees

I need help finding the smallest enclosing volume of the crown of a tree (forest tree) and the vertices of the points that compose that volume.我需要帮助找到树(林木)树冠的最小封闭体积以及构成该体积的点的顶点。 This can be solved by finding an alpha shape (a concave hull) for that tree.这可以通过为那棵树找到一个 alpha 形状(凹壳)来解决。 I don't know c++ so CGAL and PCL are out of question.我不知道 c++,所以 CGAL 和 PCL 是不可能的。 Is there a handy way to do this in python?有没有一种方便的方法可以在 python 中做到这一点?

I have used ConvexHull from scipy我使用了 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'])

I was hoping there is a similar procedure, but that will render me an alpha shape.我希望有一个类似的程序,但这会使我呈现一个 alpha 形状。

point cloud img:点云 img:

在此处输入图片说明

Yes, have a look at Alpha Shape Toolbox at pypi.org :是的,看看pypi.org上的Alpha Shape Toolbox


无花果
Plate Carree Projection 板卡里投影


声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM