点云数据文件常用格式

44 篇文章 5 订阅

点云数据文件常用格式

文件类型汇总#

  • 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

 

Copy

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 格式描述的例子:

 

Copy

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/

 

Copy

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/

 

Copy

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 文件头加上:

 

Copy

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 点云文件头部格式:

 

Copy

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 文件相同,相比之下,强度值 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦 做了归一化处理。

PTX 是一种点云数据的交换格式,使用 ASCII 编码。它使用单独扫描的概念,将每个扫描点都定义在自己的坐标系中,然后将所有这些点"注册"到单个坐标系中。每个点的数据存储在它的原始坐标系中,点云的转换矩阵作为文件的标头信息提供。

5. XYZ - Based on Cartesian coordinates#

XYZ 文件格式,是一种非标准化的文件格式。它基于笛卡尔坐标 (x, y, z),以 ASCII 文本行形式传递数据。

虽然使用 XYZ 文件的程序之间具有广泛的兼容性,但是由于缺乏标准化的单元和规范,除非提供额外的信息,否则使用这种数据格式存在根本性的缺陷。

XYZ 的一种格式实例:XYZ format - MIT

 

Copy

X1,Y1,Z1,value X2,Y2,Z2,value X3,Y3,Z3,value etc.

stackoverflow 推荐的 ASCII 点云加载程序:http://www.danielgm.net/cc/

原回答:https://stackoverflow.com/questions/41267210/point-cloud-xyz-format-specification

6. LAS/LAZ - The most common format for exchanging points clouds#

LAS/LAZ 参考文档 https://www.usna.edu/Users/oceano/pguth/md_help/html/las_format.htm

  • LAS 格式旨在作为激光扫描仪点云数据的交换格式。它由美国摄影测量和遥感学会(ASPRS)维护。

  • LAZ 文件格式则是 LAS 的无损压缩版本,为了提高效率。LAS 文件格式是二进制的。

LAS 是遥感行业使用最广泛的点云数据文件格式。由 ASPRS 维护的官方网站在这里。目前 ASPRS LAS 规范的维护转移到了GitHub

References#

作者: CrayonSea

出处:https://www.cnblogs.com/crayonsea/p/12819823.html

版权:本文采用「署名-非商业性使用-相同方式共享 4.0 国际」知识共享许可协议进行许可。

  • 4
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值