• PCL (一)点云的格式


    一、简介

    PCL点云数据格式,可用的PointT类型_岁月神偷小拳拳的博客-CSDN博客_pcl哪些操作会改变点云的有序

    点云有很多中格式,我们最长见的就是xyz的格式,下面我们大概罗列一下点云的格式:

    PointXYZPointXYZI、PointXYZRGBA、PointXYZRGB、PointXY、InterestPoint、Normal、PointNormal、PointXYZRGBNormal、PointXYZINormal、PointXYZLNormal、PointXYZL、PointXYZRGBL、PointXYZHSV、PointWithRange、PointWithViewpoint、MomentInvariants、PrincipalRadiiRSD、Boundary、PrincipalCurvatures、PFHSignature125、FPFHSignature33、VFHSignature308、Narf36、BorderDescription、IntensityGradient、Histogram、PointWithScale、PointSurfel。

    1、Point XYZ  每个点都显示固定的颜色

    成员: float x  y  z 

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };

     pcl::PointCloud::Ptr cloud (new pcl::PointCloud );

    cloud.points[i].x

    2.PointXYZI

    成员变量: float x, y, z, intensity(强度图);

    PointXYZI是在PointXYZ的基础上加上了intensity 的类型,对于兼容存储对齐,用三个额外的浮点数来填补intensity,这样在存储方面效率较低,但是符合存储对齐要求,运行效率较高。

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };
    11. union
    12. {
    13. struct
    14. {
    15. float intensity;
    16. };
    17. float data_c[4];
    18. };

    3.PointXYZRGBA

    成员变量: float x, y, z; uint32_t rgba;

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };
    11. union
    12. {
    13. struct
    14. {
    15. uint32_t rgba;
    16. };
    17. float data_c[4];
    18. };

    4.PointXYZRGB  每个点都显示各自的颜色

    成员变量:float x, y, z, rgb;

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };
    11. union
    12. {
    13. struct
    14. {
    15. float rgb;
    16. };
    17. float data_c[4];
    18. };

    5、PointXY

    6、InterestPoint

    除了strength表示关键点的强度的测量值,其它的和PointXYZI类似。

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };
    11. union
    12. {
    13. struct
    14. {
    15. float strength;
    16. };
    17. float data_c[4];
    18. };

    7 .Normal

    成员变量:float normal[3], curvature;

    Normal结构体表示给定点所在样本曲面上的法线方向,以及对应曲率的测量值

    1. union
    2. {
    3. float data_n[4];
    4. float normal[3];
    5. struct
    6. {
    7. float normal_x;
    8. float normal_y;
    9. float normal_z;
    10. };
    11. }
    12. union
    13. {
    14. struct
    15. {
    16. float curvature;
    17. };
    18. float data_c[4];
    19. }

    8.PointNormal

    成员变量:float x, y, z; float normal[3], curvature(曲率);
    PointNormal是存储XYZ数据的point结构体,并且包括采样点对应法线和曲率。

    1. union
    2. {
    3. float data[4];
    4. struct
    5. {
    6. float x;
    7. float y;
    8. float z;
    9. };
    10. };
    11. // 法线
    12. union
    13. {
    14. float data_n[4];
    15. float normal[3];
    16. struct
    17. {
    18. float normal_x;
    19. float normal_y;
    20. float normal_z;
    21. };
    22. };
    23. // 曲率
    24. union
    25. {
    26. struct
    27. {
    28. float curvature;
    29. };
    30. float data_c[4];
    31. };

    9.PointXYZRGBNormal

    成员变量:float x, y, z, rgb 颜色, normal[3] 法向量, curvature  曲率;
    PointXYZRGBNormal存储XYZ数据和RGB颜色的point结构体,并且包括曲面法线和曲率。

    1. union
    2. {
    3.     float data[4];
    4.     struct
    5.     {
    6.         float x;
    7.         float y;
    8.         float z;
    9.     };
    10. };
    11. //  法向量
    12. union
    13. {
    14.     float data_n[4];
    15.     float normal[3];
    16.     struct
    17.     {
    18.         float normal_x;
    19.         float normal_y;
    20.         float normal_z;
    21.     };
    22. }
    23. union  //固定颜色 和   曲率
    24. {
    25.     struct
    26.     {
    27.         float rgb;
    28.         float curvature;
    29.     };
    30.     float data_c[4];
    31. };

    10.PointXYZINormal

    成员变量:float x, y, z, intensity, normal[3], curvature;
    PointXYZINormal存储XYZ数据和强度值的point结构体,并且包括曲面法线和曲率。

    1. union
    2. {
    3.     float data[4];
    4.     struct
    5.     {
    6.         float x;
    7.         float y;
    8.         float z;
    9.     };
    10. };
    11. union
    12. {
    13.     float data_n[4];
    14.     float normal[3];
    15.     struct
    16.     {
    17.         float normal_x;
    18.         float normal_y;
    19.         float normal_z;
    20.     };
    21. }
    22. union
    23. {
    24.     struct
    25.     {
    26.         float intensity;
    27.         float curvature;
    28.     };
    29.     float data_c[4];
    30. };

    11.PointXYZL

    成员变量:float x, y, z, uin32_t label


     

  • 相关阅读:
    二元非洲秃鹫优化算法(Matlab代码实现)
    CKA考试笔记,仅做个人学习使用
    什么是域名解析?如何进行域名解析设置?
    Java 使用 Channel 与 Buffer 实现文件快速拷贝
    Python调用edge-tts实现在线文字转语音
    LeetCode:718. 最长重复子数组 - Python
    如何将java项目部署到github?如何将github的java项目部署到本地(通过idea)?
    【DevOps实战之k8s】使用Prometheus和Grafana监控K8S集群
    JDBC SQL Server Source Connector: 一览与实践
    Vue3较Vue2的更新内容(一)
  • 原文地址:https://blog.csdn.net/weixin_39354845/article/details/127930732