简体   繁体   English

从点云创建不规则的3D几何

[英]Create an irregular 3D geometry from a cloud of points

I have a large set of 3D points which are equally spaced in each axis. 我有大量的3D点,它们在每个轴上均等间隔。 Many of these points are culled based on some criteria, and I'd like to create a 3D geometry to help visualize what's left. 其中许多点是根据某些标准进行剔除的,我想创建一个3D几何图形以帮助可视化剩余的内容。

I have looked at some algorithms to create a triangle mesh such as Delaunay Triangulations or a convex hull, but I'm worried that some excluded points might get caught inside the geometry. 我看过一些创建三角形网格的算法,例如Delaunay Triangulations或凸包,但是我担心某些排除的点可能会陷入几何图形中。 For example, a 2D slice might look like: 例如,二维切片可能看起来像:

0 0 0 1 1 0 0   
0 0 1 1 1 1 0   
0 1 1 1 1 1 1   
1 1 0 1 0 1 1   
0 1 0 0 0 1 0  

Where "1"s are included and "0"s are excluded. 其中包括“ 1”而排除“ 0”。 In this case I'm worried that the algorithm will accidentally include the "0"s on the bottom rows because they have "1"s bordering them on both sides. 在这种情况下,我担心算法会在底部的行中意外包含“ 0”,因为它们在两侧都带有“ 1”边框。 Note that the "0"s will always be on the edge, so we don't have to worry about holes in the geometry. 请注意,“ 0”将始终在边缘上,因此我们不必担心几何图形中的孔。

Afterwards, I will need to be able to rotate the geometry and find its intersection with a plane. 之后,我将需要能够旋转几何图形并找到其与平面的交点。 I'm pretty sure I can handle the rotation and intersection part, but please keep that in mind. 我很确定我可以处理旋转和相交部分,但是请记住这一点。

I could brute force the problem by creating every triangle possible for all points on the surface, and then manually culling out any triangles that contain an excluded point. 我可以通过为曲面上所有点创建所有可能的三角形,然后手动剔除所有包含排除点的三角形,来蛮力解决问题。 But the data set can be very large, so I hope there's a more elegant solution to this. 但是数据集可能非常大,所以我希望对此有一个更优雅的解决方案。

If you are only interested in closed geometries and each are on a plane do you need a mesh/triangualtion or simply a set of polygons? 如果您只对封闭的几何感兴趣,并且每个几何都在平面上,您需要网格/三角剖分还是仅需要一组多边形?

Converting the 0,1 data into a binary image and running a contour algorithm on would be very simple see OPENCV 将0,1数据转换为二进制图像并运行轮廓算法非常简单,请参见OPENCV

我认为您正在寻找点云库

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

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