PCL常见点云数据结构总结 - 记录

1.PointXYZ
成员: float x,y,z
最常见的结构,只表示的3D的xyz坐标信息:

union
{
  float data[4];
  struct
  {
    float x;
    float y;
    float z;
  };
};

可以通过points[i].data[0]points[i].x方式访问其中每个点的x坐标数据。
2.PointXYZI
成员: float x,y,z,intensity(强度)
在存储方面效率低下,但在内存对齐方面很好。(Inefficient in terms of storage, but good in terms of memory alignment.)intensity为0~1之间的数,不能和x,y,z进行同样的存储方式。

union
{
  float data[4];
  struct
  {
    float x;
    float y;
    float z;
  };
};
union
{
  struct
  {
    float intensity;
  };
  float data_c[4];
};

3.PointXYZRGBA
4.PointXYZRGB 和3是一样的
成员: float x,y,z; std::uint32_t rgba;
和PointXYZI是一样的,不过intensity变为了RGB channel【看文档不太明白一个变量怎么表示rgb信息的?】

union
{
  float data[4];
  struct
  {
    float x;
    float y;
    float z;
  };
};
union
{
  union
  {
    struct
    {
      std::uint8_t b;
      std::uint8_t g;
      std::uint8_t r;
      std::uint8_t a;
    };
    float rgb;
  };
  std::uint32_t rgba;
};

5.PointXY
成员:float x, y;
Simple 2D x-y point structure.

struct
{
  float x;
  float y;
};

6.Normal
成员:float normal[3], curvature(曲率)
法线结构表示给定点处的曲面法线和曲率度量

union
{
  float data_n[4];
  float normal[3];
  struct
  {
    float normal_x;
    float normal_y;
    float normal_z;
  };
}
union
{
  struct
  {
    float curvature;
  };
  float data_c[4];
};

7.PointNormal
成员: float x, y, z; float normal[3], curvature;
8.PointXYZRGBNormal
成员:float x, y, z, normal[3], curvature; std::uint32_t rgba;
9.PointXYZINormal
成员:float x, y, z, intensity, normal[3], curvature;
都是6结构的扩展

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值