简体   繁体   English

算法3D点云体积计算

[英]algorithm 3D point cloud volume calculation

I´m searching for a method to calculate the volume of a three-dimensional irregular object in either python or R. I have a time series of files (around 50 per sequence), equally spaced in time. 我正在寻找一种方法来计算python或R中三维不规则物体的体积。我有一个时间序列的文件(每个序列大约50个),它们在时间上等距。 They consist of a triangular mesh representation of the object with a fixed number of triangles. 它们由具有固定数量三角形的对象的三角形网格表示组成。 The vertices have known x,y,z-coordinates. 顶点具有已知的x,y,z坐标。 There is no need for regenerating the mesh. 无需重新生成网格。 And no need for visualization. 无需可视化。 The triangles have indices, the points as well. 三角形具有索引和点。 The object is not necessarily completely convex. 对象不一定是完全凸的。 But there are no unnecessary points. 但是没有不必要的要点。 All known points are part of the hull. 所有已知点都是船体的一部分。 Now, I would like to calculate the volume of the object at each time point. 现在,我想计算每个时间点的对象体积。

After some googling I found that this algorithm should do the trick for the closed mesh you are describing: iterate over all your triangles and sum up dot(v0, cross(v1, v2)) / 6 where v0 , v1 , and v2 are the coordinates of the triangle's vertices. 经过一番谷歌搜索后,我发现该算法应该可以解决您所描述的闭合网格的问题:遍历所有三角形并求和dot(v0, cross(v1, v2)) / 6 ,其中v0v1v2是三角形顶点的坐标。

Source 资源

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

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