例如,我想从所有点云中选择两个点,并在它们之间画一条线。我正在使用Meshlab处理.ply文件,但我不知道该如何完成。我可以使用Meshlab或其他方式执行此操作吗?
。ply文件中找到的最惯常元素是vertex
和face
,但是.ply file format也允许使用edge
定义网段的定义,而这些细分是Meshlab支持的。这是具有两个顶点和一个边缘元素的.ply文件的最小示例
ply
format ascii 1.0
comment object: A single line
element vertex 2
property float x
property float y
property float z
element edge 1
property int vertex1
property int vertex2
end_header
0 0 0
0 0 1
0 1
这是一个更复杂的示例,每个顶点的颜色和一个立方体的角处有4条线。
ply format ascii 1.0 comment object: 4 edges with color per vertex element vertex 8 property float x property float y property float z property uchar red property uchar green property uchar blue element edge 4 property int vertex1 property int vertex2 end_header 0 0 0 255 0 0 0 0 1 255 0 0 0 1 1 255 0 0 0 1 0 255 0 0 1 0 0 0 0 255 1 0 1 0 0 255 1 1 1 0 0 255 1 1 0 0 0 255 0 4 1 5 2 6 3 7
这是网格实验室如何对上一个示例进行栅格化
正如我所说,meshlab仅部分支持edge
元素,因此存在一些问题: