For example, I want to choose two points from all the point clouds, and draw a line between them. I'm using Meshlab to deal with .ply files but I don't know how to accomplish this. Can I do this using Meshlab or other ways?
OPENING POINT CLOUDS IN MESHLAB Point clouds can be open by double-clicking in a PLY file (if you associate this file format to MeshLab.
The system supports input/output in the following formats: PLY, STL, OFF, OBJ, 3DS, VRML 2.0, X3D and COLLADA.
There is a way to add lines to .ply files. The most habitual elements found in .ply files are vertex
and face
, but the .ply file format also allows the definition of segments using the edge
which are only partially supported by Meshlab.
This is a minimal example of a .ply file with two vertex and one edge element
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
And this is a more complex example, with color per vertex and 4 lines in the corners of a cube.
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
This is how previous example is rastered by meshlab
As I said, meshlab supports edge
element just partially, so it has some problems:
Meshlab has problems representing files with both edge
and face
elements. It will only correctly plot them if edges are in a separate layer from faces (as show in image below). So, if you need to plot a .ply file with both faces and lines, you will have to:
edge
elements come visible on that layer. The face
elements are still visible in the original layer.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With