crayonsea

文件类型汇总

  • OFF - Object File Format
  • PLY - Polygon File Format also known as the Stanford Triangle Format
  • PTS - Laser scan data format
  • PTX - ASCII based interchange format for point cloud data
  • XYZ - Based on Cartesian coordinates
  • LAS/LAZ - The most common format for exchanging points clouds

文件格式介绍

1. OFF - Object File Format

OFF 文件格式文档 https://shape.cs.princeton.edu/benchmark/documentation/off_format.html

OFF numVertices numFaces numEdges
x y z
x y z
... numVertices like above
NVertices v1 v2 v3 ... vN
MVertices v1 v2 v3 ... vM
... numFaces like above

立方体使用 OFF 格式描述的例子:

OFF
8 6 0
-0.500000 -0.500000 0.500000
0.500000 -0.500000 0.500000
-0.500000 0.500000 0.500000
0.500000 0.500000 0.500000
-0.500000 0.500000 -0.500000
0.500000 0.500000 -0.500000
-0.500000 -0.500000 -0.500000
0.500000 -0.500000 -0.500000
4 0 1 3 2
4 2 3 5 4
4 4 5 7 6
4 6 7 1 0
4 1 7 5 3
4 6 0 2 4

2. PLY - Polygon File Format also known as the Stanford Triangle Format

PLY 文件格式文档 http://paulbourke.net/dataformats/ply/

ply
format ascii 1.0           { ascii/binary, format version number }
comment made by Greg Turk  { comments keyword specified, like all lines }
comment this file is a cube
element vertex 8           { define "vertex" element, 8 of them in file }
property float x           { vertex contains float "x" coordinate }
property float y           { y coordinate is also a vertex property }
property float z           { z coordinate, too }
element face 6             { there are 6 "face" elements in the file }
property list uchar int vertex_index { "vertex_indices" is a list of ints }
end_header                 { delimits the end of the header }
0 0 0                      { start of vertex list }
0 0 1
0 1 1
0 1 0
1 0 0
1 0 1
1 1 1
1 1 0
4 0 1 2 3                  { start of face list }
4 7 6 5 4
4 0 4 5 1
4 1 5 6 2
4 2 6 7 3
4 3 7 4 0

3. PTS - Laser scan data format

PTS 文件格式文档 http://paulbourke.net/dataformats/pts/

253730194 
-0.41025 -2.0806 8.00981 55 52 44 65
-0.63016 -1.84527 6.59447 228 228 230 225
-0.4766 -2.14446 7.91288 60 56 54 68
-0.52017 -1.51698 7.91458 60 58 50 71
    :        :        :
    :        :        :
    :        :        :

使用 MeshLab 打开 PTS 文件的方法 https://sourceforge.net/p/meshlab/discussion/499532/thread/6a658695/

PTS 文件无法用 MeshLab 直接打开,而 PLY 文件可以,所以可以手动将 PTS 文件转换为 PLY 文件,便可以在 MeshLab 中查看。转换方式:在 PTS 文件头加上:

ply
format ascii 1.0
element vertex [pts_file_vertex_num]
property float x
property float y
property float z
end_header

4. PTX - ASCII based interchange format for point cloud data

PTX 文件格式参考文档 https://sites.google.com/site/matterformscanner/learning-references/ptx-format

PTX 点云文件头部格式:

number of rows 
number of columns 
st1 st2 st3 ; scanner registered position 
sx1 sx2 sx3 ; scanner registered axis \'X\' 
sy1 sy2 sy3 ; scanner registered axis \'Y\' 
sz1 sz2 sz3 ; scanner registered axis \'Z\' 
r11 r12 r13 0 ; transformation matrix 
r21 r22 r23 0 ; this is a simple rotation and translation 4x4 matrix 
r31 r32 r33 0 ; just apply to each point to get the transformed coordinate 
tr1 tr2 tr3 1 ; use double-precision variables 

PTX 文件中单个点的信息与 PTS 文件相同,相比之下,强度值

分类:

技术点:

相关文章: